| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
package jalview.ws.datamodel.alphafold; |
| 22 |
|
|
| 23 |
|
import java.awt.Color; |
| 24 |
|
import java.util.ArrayList; |
| 25 |
|
import java.util.BitSet; |
| 26 |
|
|
| 27 |
|
import jalview.datamodel.ContactListI; |
| 28 |
|
import jalview.datamodel.ContactListImpl; |
| 29 |
|
import jalview.datamodel.ContactListProviderI; |
| 30 |
|
import jalview.datamodel.ContactMatrixI; |
| 31 |
|
import jalview.datamodel.GroupSet; |
| 32 |
|
import jalview.datamodel.GroupSetI; |
| 33 |
|
import jalview.datamodel.Mapping; |
| 34 |
|
import jalview.datamodel.SequenceI; |
| 35 |
|
import jalview.util.MapList; |
| 36 |
|
import jalview.ws.datamodel.MappableContactMatrixI; |
| 37 |
|
|
| |
|
| 77% |
Uncovered Elements: 55 (239) |
Complexity: 80 |
Complexity Density: 0.62 |
|
| 38 |
|
public abstract class MappableContactMatrix<T extends MappableContactMatrix<T>> |
| 39 |
|
implements MappableContactMatrixI |
| 40 |
|
{ |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
protected ContactMatrixI mappedMatrix = null; |
| 45 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 46 |
5127 |
public ContactListI getContactList(int column)... |
| 47 |
|
{ |
| 48 |
5127 |
return mappedMatrix.getContactList(column); |
| 49 |
|
} |
| 50 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 51 |
230 |
public float getMin()... |
| 52 |
|
{ |
| 53 |
230 |
return mappedMatrix.getMin(); |
| 54 |
|
} |
| 55 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 56 |
237 |
public float getMax()... |
| 57 |
|
{ |
| 58 |
237 |
return mappedMatrix.getMax(); |
| 59 |
|
} |
| 60 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 61 |
3370 |
public int getWidth()... |
| 62 |
|
{ |
| 63 |
3370 |
return mappedMatrix.getWidth(); |
| 64 |
|
} |
| 65 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 66 |
103457 |
public int getHeight()... |
| 67 |
|
{ |
| 68 |
103457 |
return mappedMatrix.getHeight(); |
| 69 |
|
} |
| 70 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 71 |
0 |
@Override... |
| 72 |
|
public ContactMatrixI getMappedMatrix() |
| 73 |
|
{ |
| 74 |
0 |
return mappedMatrix; |
| 75 |
|
} |
| 76 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 77 |
21414 |
@Override... |
| 78 |
|
public GroupSetI getGroupSet() |
| 79 |
|
{ |
| 80 |
21414 |
return mappedMatrix.getGroupSet(); |
| 81 |
|
}; |
| 82 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 83 |
2 |
@Override... |
| 84 |
|
public void setGroupSet(GroupSet makeGroups) |
| 85 |
|
{ |
| 86 |
2 |
mappedMatrix.setGroupSet(makeGroups); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
SequenceI refSeq = null; |
| 94 |
|
|
| 95 |
|
MapList toSeq = null; |
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
int length; |
| 101 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 102 |
212931 |
@Override... |
| 103 |
|
public boolean hasReferenceSeq() |
| 104 |
|
{ |
| 105 |
212933 |
return (refSeq != null); |
| 106 |
|
} |
| 107 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 108 |
171 |
@Override... |
| 109 |
|
public SequenceI getReferenceSeq() |
| 110 |
|
{ |
| 111 |
171 |
return refSeq; |
| 112 |
|
} |
| 113 |
|
|
| |
|
| 56.2% |
Uncovered Elements: 7 (16) |
Complexity: 6 |
Complexity Density: 0.75 |
|
| 114 |
29 |
@Override... |
| 115 |
|
public MapList getMapFor(SequenceI mapSeq) |
| 116 |
|
{ |
| 117 |
29 |
if (refSeq != null) |
| 118 |
|
{ |
| 119 |
41 |
while (mapSeq != refSeq && mapSeq.getDatasetSequence() != null) |
| 120 |
|
{ |
| 121 |
12 |
mapSeq = mapSeq.getDatasetSequence(); |
| 122 |
|
} |
| 123 |
29 |
if (mapSeq != refSeq) |
| 124 |
|
{ |
| 125 |
0 |
return null; |
| 126 |
|
} |
| 127 |
|
} |
| 128 |
|
else |
| 129 |
|
{ |
| 130 |
0 |
if (mapSeq != null) |
| 131 |
|
{ |
| 132 |
|
|
| 133 |
0 |
return null; |
| 134 |
|
} |
| 135 |
|
} |
| 136 |
|
|
| 137 |
29 |
return toSeq; |
| 138 |
|
} |
| 139 |
|
|
| 140 |
|
|
| 141 |
|
|
| 142 |
|
|
| 143 |
|
|
| 144 |
|
@param |
| 145 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
| 146 |
263 |
public void setRefSeq(SequenceI _refSeq)... |
| 147 |
|
{ |
| 148 |
263 |
refSeq = _refSeq; |
| 149 |
283 |
while (refSeq.getDatasetSequence() != null) |
| 150 |
|
{ |
| 151 |
20 |
refSeq = refSeq.getDatasetSequence(); |
| 152 |
|
} |
| 153 |
263 |
length = _refSeq.getEnd() - _refSeq.getStart() + 1; |
| 154 |
|
|
| 155 |
|
{ |
| 156 |
263 |
toSeq = new MapList( |
| 157 |
|
new int[] |
| 158 |
|
{ _refSeq.getStart(), _refSeq.getEnd() }, |
| 159 |
|
new int[] |
| 160 |
|
{ 0, length - 1 }, 1, 1); |
| 161 |
|
} |
| 162 |
|
} |
| 163 |
|
|
| |
|
| 80% |
Uncovered Elements: 9 (45) |
Complexity: 10 |
Complexity Density: 0.37 |
|
| 164 |
53 |
public T liftOver(SequenceI newRefSeq, Mapping sp2sq)... |
| 165 |
|
{ |
| 166 |
53 |
if (sp2sq.getMappedWidth() != sp2sq.getWidth()) |
| 167 |
|
{ |
| 168 |
|
|
| 169 |
|
|
| 170 |
0 |
throw new Error( |
| 171 |
|
"liftOver currently not implemented for transfer of annotation between different types of seqeunce"); |
| 172 |
|
} |
| 173 |
53 |
boolean mapIsTo = (sp2sq != null) ? (sp2sq.getTo() == refSeq) : false; |
| 174 |
|
|
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 178 |
53 |
int[] refMap = toSeq.locateInFrom(0, length - 1); |
| 179 |
53 |
ArrayList<Integer> newFromMap = new ArrayList<Integer>(); |
| 180 |
53 |
int last = -1; |
| 181 |
106 |
for (int i = 0; i < refMap.length; i += 2) |
| 182 |
|
{ |
| 183 |
|
|
| 184 |
|
|
| 185 |
|
|
| 186 |
53 |
int[] sp2map = mapIsTo |
| 187 |
|
? sp2sq.getMap().locateInFrom(refMap[i], refMap[i + 1]) |
| 188 |
|
: sp2sq.getMap().locateInTo(refMap[i], refMap[i + 1]); |
| 189 |
53 |
if (sp2map == null) |
| 190 |
|
{ |
| 191 |
0 |
continue; |
| 192 |
|
} |
| 193 |
|
|
| 194 |
107 |
for (int spm = 0; spm < sp2map.length; spm += 2) |
| 195 |
|
{ |
| 196 |
|
|
| 197 |
54 |
if (last > -1) |
| 198 |
|
{ |
| 199 |
1 |
if (sp2map[spm] != last + 1) |
| 200 |
|
{ |
| 201 |
1 |
newFromMap.add(sp2map[spm]); |
| 202 |
|
} |
| 203 |
|
else |
| 204 |
|
{ |
| 205 |
0 |
newFromMap.remove(newFromMap.size() - 1); |
| 206 |
|
} |
| 207 |
|
} |
| 208 |
|
else |
| 209 |
|
{ |
| 210 |
53 |
newFromMap.add(sp2map[spm]); |
| 211 |
|
} |
| 212 |
54 |
last = sp2map[spm + 1]; |
| 213 |
54 |
newFromMap.add(last); |
| 214 |
|
} |
| 215 |
|
} |
| 216 |
53 |
if ((newFromMap.size() % 2) != 0) |
| 217 |
|
{ |
| 218 |
|
|
| 219 |
0 |
throw new Error("PAEMatrix liftover failed."); |
| 220 |
|
} |
| 221 |
53 |
int fromIntMap[] = new int[newFromMap.size()]; |
| 222 |
53 |
int ipos = 0; |
| 223 |
53 |
for (Integer i : newFromMap) |
| 224 |
|
{ |
| 225 |
108 |
fromIntMap[ipos++] = i; |
| 226 |
|
} |
| 227 |
53 |
MapList newFromMapList = new MapList(fromIntMap, |
| 228 |
|
new int[] |
| 229 |
|
{ 0, length - 1 }, 1, 1); |
| 230 |
|
|
| 231 |
53 |
T newCM = newMappableContactMatrix(newRefSeq, newFromMapList); |
| 232 |
53 |
return newCM; |
| 233 |
|
} |
| 234 |
|
|
| 235 |
|
protected abstract T newMappableContactMatrix(SequenceI newRefSeq, |
| 236 |
|
MapList newFromMapList); |
| 237 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 238 |
5 |
@Override... |
| 239 |
|
public int[] getMappedPositionsFor(final SequenceI localFrame, |
| 240 |
|
final int column) |
| 241 |
|
{ |
| 242 |
5 |
return getMappedPositionsFor(localFrame, column, column); |
| 243 |
|
} |
| 244 |
|
|
| |
|
| 70% |
Uncovered Elements: 9 (30) |
Complexity: 9 |
Complexity Density: 0.56 |
|
| 245 |
5 |
@Override... |
| 246 |
|
public int[] getMappedPositionsFor(final SequenceI localFrame, int from, |
| 247 |
|
int to) |
| 248 |
|
{ |
| 249 |
5 |
if (localFrame == null) |
| 250 |
|
{ |
| 251 |
0 |
throw new Error("Unimplemented when no local sequence given."); |
| 252 |
|
} |
| 253 |
5 |
SequenceI lf = localFrame, uf = refSeq; |
| 254 |
|
|
| 255 |
|
|
| 256 |
|
|
| 257 |
|
|
| 258 |
6 |
while (lf.getDatasetSequence() != null |
| 259 |
|
|| uf.getDatasetSequence() != null) |
| 260 |
|
{ |
| 261 |
1 |
if (lf.getDatasetSequence() != null) |
| 262 |
|
{ |
| 263 |
1 |
lf = lf.getDatasetSequence(); |
| 264 |
|
} |
| 265 |
1 |
if (uf.getDatasetSequence() != null) |
| 266 |
|
{ |
| 267 |
0 |
uf = uf.getDatasetSequence(); |
| 268 |
|
} |
| 269 |
|
} |
| 270 |
5 |
if (lf != uf) |
| 271 |
|
{ |
| 272 |
|
|
| 273 |
0 |
throw new Error("This Matrix associated with '" + refSeq.getName() |
| 274 |
|
+ "' is not mappable for the given localFrame sequence. (" |
| 275 |
|
+ localFrame.getName() + ")"); |
| 276 |
|
} |
| 277 |
|
|
| 278 |
|
|
| 279 |
|
|
| 280 |
5 |
if (toSeq == null) |
| 281 |
|
{ |
| 282 |
|
|
| 283 |
0 |
return new int[] { from, to }; |
| 284 |
|
} |
| 285 |
|
|
| 286 |
|
|
| 287 |
|
|
| 288 |
5 |
int[] mappedPositions = toSeq.locateInFrom(from, to); |
| 289 |
5 |
if (mappedPositions == null) |
| 290 |
|
{ |
| 291 |
2 |
return null; |
| 292 |
|
} |
| 293 |
|
|
| 294 |
|
|
| 295 |
|
|
| 296 |
|
|
| 297 |
|
|
| 298 |
|
|
| 299 |
|
|
| 300 |
|
|
| 301 |
|
|
| 302 |
|
|
| 303 |
|
|
| 304 |
|
|
| 305 |
|
|
| 306 |
|
|
| 307 |
|
|
| 308 |
|
|
| 309 |
|
|
| 310 |
|
|
| 311 |
|
|
| 312 |
|
|
| 313 |
|
|
| 314 |
|
|
| 315 |
|
|
| 316 |
3 |
return mappedPositions; |
| 317 |
|
} |
| 318 |
|
|
| |
|
| 79.2% |
Uncovered Elements: 10 (48) |
Complexity: 16 |
Complexity Density: 0.57 |
|
| 319 |
5448 |
@Override... |
| 320 |
|
public ContactListI getMappableContactList(final SequenceI localFrame, |
| 321 |
|
final int column) |
| 322 |
|
{ |
| 323 |
5448 |
final int _column; |
| 324 |
5448 |
final int _lcolumn; |
| 325 |
5448 |
if (localFrame == null) |
| 326 |
|
{ |
| 327 |
0 |
throw new Error("Unimplemented when no local sequence given."); |
| 328 |
|
} |
| 329 |
|
|
| 330 |
|
|
| 331 |
|
|
| 332 |
5448 |
final MappableContactMatrix us = this; |
| 333 |
5448 |
_lcolumn = localFrame.findPosition(column); |
| 334 |
|
|
| 335 |
5448 |
if (toSeq != null) |
| 336 |
|
{ |
| 337 |
5448 |
SequenceI lf = localFrame, uf = refSeq; |
| 338 |
|
|
| 339 |
|
|
| 340 |
|
|
| 341 |
10776 |
while (lf.getDatasetSequence() != null |
| 342 |
|
|| uf.getDatasetSequence() != null) |
| 343 |
|
{ |
| 344 |
5328 |
if (lf.getDatasetSequence() != null) |
| 345 |
|
{ |
| 346 |
5328 |
lf = lf.getDatasetSequence(); |
| 347 |
|
} |
| 348 |
5328 |
if (uf.getDatasetSequence() != null) |
| 349 |
|
{ |
| 350 |
2 |
uf = uf.getDatasetSequence(); |
| 351 |
|
} |
| 352 |
|
} |
| 353 |
5448 |
if (lf != uf) |
| 354 |
|
{ |
| 355 |
|
|
| 356 |
0 |
throw new Error("This Matrix associated with '" + refSeq.getName() |
| 357 |
|
+ "' is not mappable for the given localFrame sequence. (" |
| 358 |
|
+ localFrame.getName() + ")"); |
| 359 |
|
} |
| 360 |
|
|
| 361 |
5448 |
int[] word = toSeq.locateInTo(_lcolumn, _lcolumn); |
| 362 |
5448 |
if (word == null) |
| 363 |
|
{ |
| 364 |
11 |
return null; |
| 365 |
|
} |
| 366 |
5437 |
_column = word[0]; |
| 367 |
|
} |
| 368 |
|
else |
| 369 |
|
{ |
| 370 |
|
|
| 371 |
0 |
_column = _lcolumn; |
| 372 |
|
} |
| 373 |
|
|
| 374 |
|
|
| 375 |
5437 |
if (_column < 0 || ((toSeq != null && _column > toSeq.getToHighest()) |
| 376 |
|
|| (toSeq == null && getHeight() <= _column))) |
| 377 |
|
{ |
| 378 |
0 |
return null; |
| 379 |
|
} |
| 380 |
|
|
| 381 |
|
|
| 382 |
5437 |
final int[] matrixRange = toSeq == null |
| 383 |
|
? new int[] |
| 384 |
|
{ localFrame.getStart(), localFrame.getEnd() } |
| 385 |
|
: toSeq.locateInTo(localFrame.getStart(), localFrame.getEnd()); |
| 386 |
|
|
| 387 |
5437 |
int h = 0; |
| 388 |
10874 |
for (int p = 0; p < matrixRange.length; p += 2) |
| 389 |
|
{ |
| 390 |
5437 |
h += 1 + Math.abs(matrixRange[p + 1] - matrixRange[p]); |
| 391 |
|
} |
| 392 |
5437 |
final int rangeHeight = h; |
| 393 |
|
|
| 394 |
|
|
| 395 |
5437 |
return new ContactListImpl(new ContactListProviderI() |
| 396 |
|
{ |
| 397 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 398 |
0 |
public int getColumn()... |
| 399 |
|
{ |
| 400 |
0 |
return column; |
| 401 |
|
} |
| 402 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 403 |
0 |
@Override... |
| 404 |
|
public int getPosition() |
| 405 |
|
{ |
| 406 |
0 |
return _column; |
| 407 |
|
} |
| 408 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 409 |
359574 |
@Override... |
| 410 |
|
public int getContactHeight() |
| 411 |
|
{ |
| 412 |
359574 |
return rangeHeight; |
| 413 |
|
} |
| 414 |
|
|
| |
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 415 |
693964 |
@Override... |
| 416 |
|
public double getContactAt(int mcolumn) |
| 417 |
|
{ |
| 418 |
693965 |
if (mcolumn < 0 || mcolumn >= rangeHeight) |
| 419 |
|
{ |
| 420 |
0 |
return -1; |
| 421 |
|
} |
| 422 |
693963 |
return getElementAt(_column, locateInRange(mcolumn)); |
| 423 |
|
|
| 424 |
|
|
| 425 |
|
|
| 426 |
|
|
| 427 |
|
|
| 428 |
|
|
| 429 |
|
|
| 430 |
|
|
| 431 |
|
|
| 432 |
|
|
| 433 |
|
|
| 434 |
|
} |
| 435 |
|
|
| |
|
| 83.3% |
Uncovered Elements: 4 (24) |
Complexity: 8 |
Complexity Density: 0.57 |
|
| 436 |
212772 |
@Override... |
| 437 |
|
public int[] getMappedPositionsFor(int cStart, int cEnd) |
| 438 |
|
{ |
| 439 |
212760 |
if (!hasReferenceSeq()) |
| 440 |
|
{ |
| 441 |
0 |
return ContactListProviderI.super.getMappedPositionsFor(cStart, |
| 442 |
|
cEnd); |
| 443 |
|
} |
| 444 |
|
|
| 445 |
212750 |
int realCstart = locateInRange(cStart); |
| 446 |
212749 |
int realCend = locateInRange(cEnd); |
| 447 |
|
|
| 448 |
|
|
| 449 |
|
|
| 450 |
212756 |
int[] mappedPositions = toSeq.locateInFrom(realCstart, realCend); |
| 451 |
212801 |
if (mappedPositions != null) |
| 452 |
|
{ |
| 453 |
212799 |
int s = -1, e = -1; |
| 454 |
638358 |
for (int p = 0; p < mappedPositions.length; p++) |
| 455 |
|
{ |
| 456 |
425608 |
if (s == -1 && mappedPositions[p] >= localFrame.getStart()) |
| 457 |
|
{ |
| 458 |
212789 |
s = p; |
| 459 |
|
} |
| 460 |
425477 |
if (e == -1 || mappedPositions[p] <= localFrame.getEnd()) |
| 461 |
|
{ |
| 462 |
|
|
| 463 |
425476 |
e = p; |
| 464 |
|
|
| 465 |
425474 |
mappedPositions[p] = localFrame.findIndex(mappedPositions[p]); |
| 466 |
|
} |
| 467 |
|
} |
| 468 |
|
} |
| 469 |
212817 |
return mappedPositions; |
| 470 |
|
} |
| 471 |
|
|
| 472 |
|
|
| 473 |
|
@return |
| 474 |
|
|
| |
|
| 57.1% |
Uncovered Elements: 3 (7) |
Complexity: 3 |
Complexity Density: 0.6 |
|
| 475 |
1118761 |
private int locateInRange(int mcolumn)... |
| 476 |
|
{ |
| 477 |
|
|
| 478 |
1118762 |
int h = 0, p = 0; |
| 479 |
1118764 |
while (h < mcolumn && p + 2 < matrixRange.length) |
| 480 |
|
{ |
| 481 |
0 |
h += 1 + Math.abs(matrixRange[p + 1] - matrixRange[p]); |
| 482 |
0 |
p += 2; |
| 483 |
|
} |
| 484 |
1118760 |
return matrixRange[p] + mcolumn - h; |
| 485 |
|
} |
| 486 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 487 |
5320 |
@Override... |
| 488 |
|
public Color getColourForGroup() |
| 489 |
|
{ |
| 490 |
5320 |
BitSet gp = us.getGroupsFor(_column); |
| 491 |
5320 |
Color col = us.getColourForGroup(gp); |
| 492 |
5320 |
return col; |
| 493 |
|
} |
| 494 |
|
}); |
| 495 |
|
} |
| 496 |
|
|
| 497 |
|
|
| 498 |
|
|
| 499 |
|
|
| 500 |
|
|
| 501 |
|
|
| 502 |
|
@param |
| 503 |
|
@param |
| 504 |
|
@return |
| 505 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 506 |
693880 |
public double getElementAt(int _column, int i)... |
| 507 |
|
{ |
| 508 |
693881 |
return mappedMatrix.getElementAt(_column, i); |
| 509 |
|
} |
| 510 |
|
|
| |
|
| 57.1% |
Uncovered Elements: 3 (7) |
Complexity: 4 |
Complexity Density: 4 |
|
| 511 |
96 |
@Override... |
| 512 |
|
public int hashCode() |
| 513 |
|
{ |
| 514 |
96 |
return 7 * (refSeq != null ? refSeq.hashCode() : 0) |
| 515 |
96 |
+ 11 * (toSeq != null ? toSeq.hashCode() : 0) |
| 516 |
96 |
+ 13 * (mappedMatrix != null ? mappedMatrix.hashCode() : 0) |
| 517 |
|
+ length * 3; |
| 518 |
|
} |
| 519 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 520 |
30 |
@Override... |
| 521 |
|
public boolean equals(Object obj) |
| 522 |
|
{ |
| 523 |
30 |
if (obj == null || !(obj.getClass().equals(getClass()))) |
| 524 |
|
{ |
| 525 |
0 |
return false; |
| 526 |
|
} |
| 527 |
30 |
T them = (T) obj; |
| 528 |
30 |
return mappedMatrix == them.mappedMatrix && length == them.length |
| 529 |
|
&& refSeq == them.refSeq && toSeq.equals(them.toSeq); |
| 530 |
|
|
| 531 |
|
} |
| 532 |
|
} |