| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
package jalview.datamodel; |
| 22 |
|
import jalview.util.MessageManager; |
| 23 |
|
import jalview.workers.InformationThread; |
| 24 |
|
|
| 25 |
|
import java.awt.Color; |
| 26 |
|
import java.beans.PropertyChangeListener; |
| 27 |
|
import java.beans.PropertyChangeSupport; |
| 28 |
|
import java.util.ArrayList; |
| 29 |
|
import java.util.Arrays; |
| 30 |
|
import java.util.Collection; |
| 31 |
|
import java.util.Collections; |
| 32 |
|
import java.util.HashMap; |
| 33 |
|
import java.util.List; |
| 34 |
|
import java.util.Map; |
| 35 |
|
|
| 36 |
|
import jalview.analysis.AAFrequency; |
| 37 |
|
import jalview.analysis.AlignmentUtils; |
| 38 |
|
import jalview.analysis.Conservation; |
| 39 |
|
import jalview.renderer.ResidueShader; |
| 40 |
|
import jalview.renderer.ResidueShaderI; |
| 41 |
|
import jalview.schemes.ColourSchemeI; |
| 42 |
|
import jalview.util.Constants; |
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
@author |
| 48 |
|
@version |
| 49 |
|
|
| |
|
| 54.7% |
Uncovered Elements: 376 (830) |
Complexity: 249 |
Complexity Density: 0.5 |
|
| 50 |
|
public class SequenceGroup implements AnnotatedCollectionI |
| 51 |
|
{ |
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
public static final String SEQ_GROUP_CHANGED = "Sequence group changed"; |
| 56 |
|
|
| 57 |
|
protected PropertyChangeSupport changeSupport = new PropertyChangeSupport( |
| 58 |
|
this); |
| 59 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 60 |
0 |
public void addPropertyChangeListener(PropertyChangeListener listener)... |
| 61 |
|
{ |
| 62 |
0 |
changeSupport.addPropertyChangeListener(listener); |
| 63 |
|
} |
| 64 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 65 |
0 |
public void removePropertyChangeListener(PropertyChangeListener listener)... |
| 66 |
|
{ |
| 67 |
0 |
changeSupport.removePropertyChangeListener(listener); |
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
|
| 71 |
|
String groupName; |
| 72 |
|
|
| 73 |
|
String description; |
| 74 |
|
|
| 75 |
|
Conservation conserve; |
| 76 |
|
|
| 77 |
|
Conservation conservationData; |
| 78 |
|
|
| 79 |
|
ProfilesI consensusProfiles; |
| 80 |
|
|
| 81 |
|
ProfilesI hmmProfiles; |
| 82 |
|
|
| 83 |
|
boolean displayBoxes = true; |
| 84 |
|
|
| 85 |
|
boolean displayText = true; |
| 86 |
|
|
| 87 |
|
boolean colourText = false; |
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
boolean isDefined = false; |
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
boolean showNonconserved = false; |
| 99 |
|
|
| 100 |
|
|
| 101 |
|
|
| 102 |
|
|
| 103 |
|
private List<SequenceI> sequences; |
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
private SequenceI seqrep = null; |
| 109 |
|
|
| 110 |
|
int width = -1; |
| 111 |
|
|
| 112 |
|
|
| 113 |
|
|
| 114 |
|
|
| 115 |
|
public ResidueShaderI cs; |
| 116 |
|
|
| 117 |
|
|
| 118 |
|
|
| 119 |
|
|
| 120 |
|
private int startRes = 0; |
| 121 |
|
|
| 122 |
|
|
| 123 |
|
|
| 124 |
|
|
| 125 |
|
private int endRes = 0; |
| 126 |
|
|
| 127 |
|
public Color outlineColour = Color.black; |
| 128 |
|
|
| 129 |
|
public Color idColour = null; |
| 130 |
|
|
| 131 |
|
public int thresholdTextColour = 0; |
| 132 |
|
|
| 133 |
|
public Color textColour = Color.black; |
| 134 |
|
|
| 135 |
|
public Color textColour2 = Color.white; |
| 136 |
|
|
| 137 |
|
|
| 138 |
|
|
| 139 |
|
|
| 140 |
|
private boolean ignoreGapsInConsensus = true; |
| 141 |
|
|
| 142 |
|
private boolean showSequenceLogo = false; |
| 143 |
|
|
| 144 |
|
private boolean normaliseSequenceLogo; |
| 145 |
|
|
| 146 |
|
|
| 147 |
|
|
| 148 |
|
|
| 149 |
|
private boolean hmmIgnoreBelowBackground = true; |
| 150 |
|
|
| 151 |
|
private boolean hmmUseInfoLetterHeight; |
| 152 |
|
|
| 153 |
|
private boolean hmmShowSequenceLogo; |
| 154 |
|
|
| 155 |
|
private boolean hmmNormaliseSequenceLogo; |
| 156 |
|
|
| 157 |
|
private boolean hmmShowHistogram; |
| 158 |
|
|
| 159 |
|
|
| 160 |
|
|
| 161 |
|
|
| 162 |
|
private boolean hidereps = false; |
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
private boolean hidecols; |
| 168 |
|
|
| 169 |
|
AlignmentAnnotation consensus = null; |
| 170 |
|
|
| 171 |
|
List<AlignmentAnnotation> ssConsensus = null; |
| 172 |
|
|
| 173 |
|
List<String> secondaryStructureSources = null; |
| 174 |
|
|
| 175 |
|
AlignmentAnnotation conservation = null; |
| 176 |
|
|
| 177 |
|
private AlignmentAnnotation hmmInformation; |
| 178 |
|
|
| 179 |
|
private boolean showConsensusHistogram; |
| 180 |
|
|
| 181 |
|
private AnnotatedCollectionI context; |
| 182 |
|
|
| 183 |
|
public Map<String, ProfilesI> hSSConsensusProfileMap; |
| 184 |
|
|
| 185 |
|
|
| 186 |
|
|
| 187 |
|
private List<AlignmentAnnotation> annotationsFromTree; |
| 188 |
|
|
| 189 |
|
|
| 190 |
|
|
| 191 |
|
|
| 192 |
|
private boolean treeBased = false; |
| 193 |
|
|
| 194 |
|
|
| 195 |
|
|
| 196 |
|
|
| 197 |
|
|
| 198 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 199 |
1262 |
public SequenceGroup()... |
| 200 |
|
{ |
| 201 |
1262 |
groupName = "JGroup:" + this.hashCode(); |
| 202 |
1262 |
cs = new ResidueShader(); |
| 203 |
1262 |
sequences = new ArrayList<>(); |
| 204 |
1262 |
annotationsFromTree = new ArrayList<>(); |
| 205 |
|
} |
| 206 |
|
|
| 207 |
|
|
| 208 |
|
|
| 209 |
|
|
| 210 |
|
@param |
| 211 |
|
@param |
| 212 |
|
@param |
| 213 |
|
@param |
| 214 |
|
@param |
| 215 |
|
@param |
| 216 |
|
@param |
| 217 |
|
|
| 218 |
|
@param |
| 219 |
|
|
| 220 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 1 |
Complexity Density: 0.1 |
|
| 221 |
93 |
public SequenceGroup(List<SequenceI> sequences, String groupName,... |
| 222 |
|
ColourSchemeI scheme, boolean displayBoxes, boolean displayText, |
| 223 |
|
boolean colourText, int start, int end) |
| 224 |
|
{ |
| 225 |
93 |
this(); |
| 226 |
93 |
this.sequences = sequences; |
| 227 |
93 |
this.groupName = groupName; |
| 228 |
93 |
this.displayBoxes = displayBoxes; |
| 229 |
93 |
this.displayText = displayText; |
| 230 |
93 |
this.colourText = colourText; |
| 231 |
93 |
this.cs = new ResidueShader(scheme); |
| 232 |
93 |
startRes = start; |
| 233 |
93 |
endRes = end; |
| 234 |
93 |
recalcConservation(); |
| 235 |
|
} |
| 236 |
|
|
| 237 |
|
|
| 238 |
|
|
| 239 |
|
|
| 240 |
|
@param |
| 241 |
|
@param |
| 242 |
|
|
| 243 |
|
|
| |
|
| 93.2% |
Uncovered Elements: 3 (44) |
Complexity: 5 |
Complexity Density: 0.14 |
|
| 244 |
85 |
public SequenceGroup(SequenceGroup seqsel)... |
| 245 |
|
{ |
| 246 |
85 |
this(); |
| 247 |
|
|
| 248 |
85 |
if (seqsel != null) |
| 249 |
|
{ |
| 250 |
77 |
sequences = new ArrayList<>(); |
| 251 |
77 |
sequences.addAll(seqsel.sequences); |
| 252 |
77 |
if (seqsel.groupName != null) |
| 253 |
|
{ |
| 254 |
77 |
groupName = new String(seqsel.groupName); |
| 255 |
|
} |
| 256 |
77 |
annotationsFromTree = seqsel.annotationsFromTree; |
| 257 |
77 |
displayBoxes = seqsel.displayBoxes; |
| 258 |
77 |
displayText = seqsel.displayText; |
| 259 |
77 |
colourText = seqsel.colourText; |
| 260 |
|
|
| 261 |
77 |
startRes = seqsel.startRes; |
| 262 |
77 |
endRes = seqsel.endRes; |
| 263 |
77 |
cs = new ResidueShader((ResidueShader) seqsel.cs); |
| 264 |
77 |
if (seqsel.description != null) |
| 265 |
|
{ |
| 266 |
1 |
description = new String(seqsel.description); |
| 267 |
|
} |
| 268 |
77 |
hidecols = seqsel.hidecols; |
| 269 |
77 |
hidereps = seqsel.hidereps; |
| 270 |
77 |
showNonconserved = seqsel.showNonconserved; |
| 271 |
77 |
showSequenceLogo = seqsel.showSequenceLogo; |
| 272 |
77 |
normaliseSequenceLogo = seqsel.normaliseSequenceLogo; |
| 273 |
77 |
showConsensusHistogram = seqsel.showConsensusHistogram; |
| 274 |
77 |
hmmShowSequenceLogo = seqsel.hmmShowSequenceLogo; |
| 275 |
77 |
hmmNormaliseSequenceLogo = seqsel.hmmNormaliseSequenceLogo; |
| 276 |
77 |
hmmShowHistogram = seqsel.hmmShowHistogram; |
| 277 |
77 |
idColour = seqsel.idColour; |
| 278 |
77 |
outlineColour = seqsel.outlineColour; |
| 279 |
77 |
seqrep = seqsel.seqrep; |
| 280 |
77 |
textColour = seqsel.textColour; |
| 281 |
77 |
textColour2 = seqsel.textColour2; |
| 282 |
77 |
thresholdTextColour = seqsel.thresholdTextColour; |
| 283 |
77 |
width = seqsel.width; |
| 284 |
77 |
ignoreGapsInConsensus = seqsel.ignoreGapsInConsensus; |
| 285 |
77 |
hmmIgnoreBelowBackground = seqsel.hmmIgnoreBelowBackground; |
| 286 |
77 |
hmmUseInfoLetterHeight = seqsel.hmmUseInfoLetterHeight; |
| 287 |
77 |
if (seqsel.conserve != null) |
| 288 |
|
{ |
| 289 |
|
|
| 290 |
|
|
| 291 |
0 |
recalcConservation(); |
| 292 |
|
|
| 293 |
|
} |
| 294 |
|
} |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
|
| 298 |
|
|
| 299 |
|
|
| 300 |
|
@param |
| 301 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 302 |
15 |
public SequenceGroup(List<SequenceI> seqs)... |
| 303 |
|
{ |
| 304 |
15 |
this(); |
| 305 |
15 |
this.sequences.addAll(seqs); |
| 306 |
|
} |
| 307 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 308 |
117 |
public boolean isShowSequenceLogo()... |
| 309 |
|
{ |
| 310 |
117 |
return showSequenceLogo; |
| 311 |
|
} |
| 312 |
|
|
| |
|
| 77.8% |
Uncovered Elements: 12 (54) |
Complexity: 11 |
Complexity Density: 0.32 |
|
| 313 |
2 |
public SequenceI[] getSelectionAsNewSequences(AlignmentI align)... |
| 314 |
|
{ |
| 315 |
2 |
int iSize = sequences.size(); |
| 316 |
2 |
SequenceI[] seqs = new SequenceI[iSize]; |
| 317 |
2 |
SequenceI[] inorder = getSequencesInOrder(align); |
| 318 |
|
|
| 319 |
18 |
for (int i = 0, ipos = 0; i < inorder.length; i++) |
| 320 |
|
{ |
| 321 |
16 |
SequenceI seq = inorder[i]; |
| 322 |
16 |
SequenceI seqipos = seqs[ipos] = seq.getSubSequence(startRes, |
| 323 |
|
endRes + 1); |
| 324 |
16 |
if (seqipos != null) |
| 325 |
|
{ |
| 326 |
16 |
if (seq.getAnnotation() != null) |
| 327 |
|
{ |
| 328 |
1 |
AlignmentAnnotation[] alann = align.getAlignmentAnnotation(); |
| 329 |
|
|
| 330 |
|
|
| 331 |
2 |
for (int a = 0; a < seq.getAnnotation().length; a++) |
| 332 |
|
{ |
| 333 |
1 |
AlignmentAnnotation tocopy = seq.getAnnotation()[a]; |
| 334 |
1 |
if (alann != null) |
| 335 |
|
{ |
| 336 |
1 |
boolean found = false; |
| 337 |
1 |
for (int pos = 0, np = alann.length; pos < np; pos++) |
| 338 |
|
{ |
| 339 |
1 |
if (alann[pos] == tocopy) |
| 340 |
|
{ |
| 341 |
1 |
found = true; |
| 342 |
1 |
break; |
| 343 |
|
} |
| 344 |
|
} |
| 345 |
1 |
if (!found) |
| 346 |
|
{ |
| 347 |
0 |
continue; |
| 348 |
|
} |
| 349 |
|
} |
| 350 |
1 |
AlignmentAnnotation newannot = new AlignmentAnnotation( |
| 351 |
|
seq.getAnnotation()[a]); |
| 352 |
1 |
newannot.restrict(startRes, endRes); |
| 353 |
1 |
newannot.setSequenceRef(seqs[ipos]); |
| 354 |
1 |
newannot.adjustForAlignment(); |
| 355 |
1 |
ContactMatrixI cm = seq |
| 356 |
|
.getContactMatrixFor(seq.getAnnotation()[a]); |
| 357 |
1 |
if (cm != null) |
| 358 |
|
{ |
| 359 |
1 |
seqs[ipos].addContactListFor(newannot, cm); |
| 360 |
|
} |
| 361 |
1 |
seqipos.addAlignmentAnnotation(newannot); |
| 362 |
|
} |
| 363 |
|
} |
| 364 |
16 |
ipos++; |
| 365 |
|
} |
| 366 |
|
else |
| 367 |
|
{ |
| 368 |
0 |
iSize--; |
| 369 |
|
} |
| 370 |
|
} |
| 371 |
2 |
if (iSize != inorder.length) |
| 372 |
|
{ |
| 373 |
0 |
SequenceI[] nseqs = new SequenceI[iSize]; |
| 374 |
0 |
System.arraycopy(seqs, 0, nseqs, 0, iSize); |
| 375 |
0 |
seqs = nseqs; |
| 376 |
|
} |
| 377 |
2 |
return seqs; |
| 378 |
|
|
| 379 |
|
} |
| 380 |
|
|
| 381 |
|
|
| 382 |
|
|
| 383 |
|
|
| 384 |
|
@param |
| 385 |
|
|
| 386 |
|
@return |
| 387 |
|
|
| |
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 5 |
Complexity Density: 0.56 |
|
| 388 |
0 |
public int findEndRes(SequenceI seq)... |
| 389 |
|
{ |
| 390 |
0 |
int eres = 0; |
| 391 |
0 |
char ch; |
| 392 |
|
|
| 393 |
0 |
for (int j = 0; j < endRes + 1 && j < seq.getLength(); j++) |
| 394 |
|
{ |
| 395 |
0 |
ch = seq.getCharAt(j); |
| 396 |
0 |
if (!jalview.util.Comparison.isGap((ch))) |
| 397 |
|
{ |
| 398 |
0 |
eres++; |
| 399 |
|
} |
| 400 |
|
} |
| 401 |
|
|
| 402 |
0 |
if (eres > 0) |
| 403 |
|
{ |
| 404 |
0 |
eres += seq.getStart() - 1; |
| 405 |
|
} |
| 406 |
|
|
| 407 |
0 |
return eres; |
| 408 |
|
} |
| 409 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 410 |
16221 |
@Override... |
| 411 |
|
public List<SequenceI> getSequences() |
| 412 |
|
{ |
| 413 |
16221 |
return sequences; |
| 414 |
|
} |
| 415 |
|
|
| |
|
| 17.6% |
Uncovered Elements: 14 (17) |
Complexity: 5 |
Complexity Density: 0.45 |
|
| 416 |
813 |
@Override... |
| 417 |
|
public List<SequenceI> getSequences( |
| 418 |
|
Map<SequenceI, SequenceCollectionI> hiddenReps) |
| 419 |
|
{ |
| 420 |
813 |
if (hiddenReps == null) |
| 421 |
|
{ |
| 422 |
|
|
| 423 |
813 |
return sequences; |
| 424 |
|
} |
| 425 |
|
else |
| 426 |
|
{ |
| 427 |
0 |
List<SequenceI> allSequences = new ArrayList<>(); |
| 428 |
0 |
for (SequenceI seq : sequences) |
| 429 |
|
{ |
| 430 |
0 |
allSequences.add(seq); |
| 431 |
0 |
if (hiddenReps.containsKey(seq)) |
| 432 |
|
{ |
| 433 |
0 |
SequenceCollectionI hsg = hiddenReps.get(seq); |
| 434 |
0 |
for (SequenceI seq2 : hsg.getSequences()) |
| 435 |
|
{ |
| 436 |
0 |
if (seq2 != seq && !allSequences.contains(seq2)) |
| 437 |
|
{ |
| 438 |
0 |
allSequences.add(seq2); |
| 439 |
|
} |
| 440 |
|
} |
| 441 |
|
} |
| 442 |
|
} |
| 443 |
|
|
| 444 |
0 |
return allSequences; |
| 445 |
|
} |
| 446 |
|
} |
| 447 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 448 |
5 |
public SequenceI[] getSequencesAsArray(... |
| 449 |
|
Map<SequenceI, SequenceCollectionI> map) |
| 450 |
|
{ |
| 451 |
5 |
List<SequenceI> tmp = getSequences(map); |
| 452 |
5 |
if (tmp == null) |
| 453 |
|
{ |
| 454 |
0 |
return null; |
| 455 |
|
} |
| 456 |
5 |
return tmp.toArray(new SequenceI[tmp.size()]); |
| 457 |
|
} |
| 458 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 459 |
26 |
public List<String> getSecondaryStructureSources()... |
| 460 |
|
{ |
| 461 |
26 |
return secondaryStructureSources; |
| 462 |
|
} |
| 463 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 464 |
59 |
public void setSecondaryStructureSources(... |
| 465 |
|
List<String> secondaryStructureSources) |
| 466 |
|
{ |
| 467 |
59 |
this.secondaryStructureSources = secondaryStructureSources; |
| 468 |
|
} |
| 469 |
|
|
| 470 |
|
|
| 471 |
|
|
| 472 |
|
|
| 473 |
|
@param |
| 474 |
|
|
| 475 |
|
|
| 476 |
|
@return |
| 477 |
|
|
| |
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 4 |
Complexity Density: 0.5 |
|
| 478 |
0 |
public boolean adjustForRemoveLeft(int col)... |
| 479 |
|
{ |
| 480 |
|
|
| 481 |
0 |
if (startRes >= col) |
| 482 |
|
{ |
| 483 |
0 |
startRes = startRes - col; |
| 484 |
|
} |
| 485 |
|
|
| 486 |
0 |
if (endRes >= col) |
| 487 |
|
{ |
| 488 |
0 |
endRes = endRes - col; |
| 489 |
|
|
| 490 |
0 |
if (startRes > endRes) |
| 491 |
|
{ |
| 492 |
0 |
startRes = 0; |
| 493 |
|
} |
| 494 |
|
} |
| 495 |
|
else |
| 496 |
|
{ |
| 497 |
|
|
| 498 |
0 |
return false; |
| 499 |
|
} |
| 500 |
|
|
| 501 |
0 |
return true; |
| 502 |
|
} |
| 503 |
|
|
| 504 |
|
|
| 505 |
|
|
| 506 |
|
|
| 507 |
|
@param |
| 508 |
|
|
| 509 |
|
|
| 510 |
|
@return |
| 511 |
|
|
| |
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
| 512 |
0 |
public boolean adjustForRemoveRight(int col)... |
| 513 |
|
{ |
| 514 |
0 |
if (startRes > col) |
| 515 |
|
{ |
| 516 |
|
|
| 517 |
0 |
return false; |
| 518 |
|
} |
| 519 |
|
|
| 520 |
0 |
if (endRes >= col) |
| 521 |
|
{ |
| 522 |
0 |
endRes = col; |
| 523 |
|
} |
| 524 |
|
|
| 525 |
0 |
return true; |
| 526 |
|
} |
| 527 |
|
|
| 528 |
|
|
| 529 |
|
|
| 530 |
|
|
| 531 |
|
@return |
| 532 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 533 |
924 |
public String getName()... |
| 534 |
|
{ |
| 535 |
924 |
return groupName; |
| 536 |
|
} |
| 537 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 538 |
22 |
public String getDescription()... |
| 539 |
|
{ |
| 540 |
22 |
return description; |
| 541 |
|
} |
| 542 |
|
|
| 543 |
|
|
| 544 |
|
|
| 545 |
|
|
| 546 |
|
@param |
| 547 |
|
|
| 548 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 549 |
87 |
public void setName(String name)... |
| 550 |
|
{ |
| 551 |
87 |
groupName = name; |
| 552 |
|
|
| 553 |
|
} |
| 554 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 555 |
24 |
public void setDescription(String desc)... |
| 556 |
|
{ |
| 557 |
24 |
description = desc; |
| 558 |
|
} |
| 559 |
|
|
| 560 |
|
|
| 561 |
|
|
| 562 |
|
|
| 563 |
|
@return |
| 564 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 565 |
0 |
public Conservation getConservation()... |
| 566 |
|
{ |
| 567 |
0 |
return conserve; |
| 568 |
|
} |
| 569 |
|
|
| 570 |
|
|
| 571 |
|
|
| 572 |
|
|
| 573 |
|
@param |
| 574 |
|
|
| 575 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 576 |
0 |
public void setConservation(Conservation c)... |
| 577 |
|
{ |
| 578 |
0 |
conserve = c; |
| 579 |
|
} |
| 580 |
|
|
| 581 |
|
|
| 582 |
|
|
| 583 |
|
|
| 584 |
|
|
| 585 |
|
|
| 586 |
|
@param |
| 587 |
|
|
| 588 |
|
@param |
| 589 |
|
|
| 590 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 591 |
1540 |
public void addSequence(SequenceI s, boolean recalc)... |
| 592 |
|
{ |
| 593 |
1540 |
synchronized (sequences) |
| 594 |
|
{ |
| 595 |
1540 |
if (s != null && !sequences.contains(s)) |
| 596 |
|
{ |
| 597 |
1523 |
sequences.add(s); |
| 598 |
1523 |
changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, |
| 599 |
|
sequences.size() - 1, sequences.size()); |
| 600 |
|
} |
| 601 |
|
|
| 602 |
1540 |
if (recalc) |
| 603 |
|
{ |
| 604 |
1 |
recalcConservation(); |
| 605 |
|
} |
| 606 |
|
} |
| 607 |
|
} |
| 608 |
|
|
| 609 |
|
|
| 610 |
|
|
| 611 |
|
|
| 612 |
|
private int consPercGaps = 25; |
| 613 |
|
|
| 614 |
|
|
| 615 |
|
@return |
| 616 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 617 |
0 |
public int getConsPercGaps()... |
| 618 |
|
{ |
| 619 |
0 |
return consPercGaps; |
| 620 |
|
} |
| 621 |
|
|
| 622 |
|
|
| 623 |
|
|
| 624 |
|
|
| 625 |
|
@param |
| 626 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 627 |
0 |
public void setConsPercGaps(int consPercGaps)... |
| 628 |
|
{ |
| 629 |
0 |
this.consPercGaps = consPercGaps; |
| 630 |
|
} |
| 631 |
|
|
| 632 |
|
|
| 633 |
|
|
| 634 |
|
|
| 635 |
|
|
| 636 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 637 |
509 |
public boolean recalcConservation()... |
| 638 |
|
{ |
| 639 |
509 |
return recalcConservation(false); |
| 640 |
|
} |
| 641 |
|
|
| 642 |
|
|
| 643 |
|
|
| 644 |
|
|
| 645 |
|
|
| 646 |
|
|
| 647 |
|
@param |
| 648 |
|
|
| 649 |
|
|
| 650 |
|
|
| |
|
| 72.4% |
Uncovered Elements: 21 (76) |
Complexity: 22 |
Complexity Density: 0.46 |
|
| 651 |
509 |
public boolean recalcConservation(boolean defer)... |
| 652 |
|
{ |
| 653 |
509 |
if (cs == null && consensus == null && conservation == null |
| 654 |
|
&& hmmInformation == null) |
| 655 |
|
{ |
| 656 |
0 |
return false; |
| 657 |
|
} |
| 658 |
|
|
| 659 |
|
|
| 660 |
509 |
boolean upd = false; |
| 661 |
509 |
try |
| 662 |
|
{ |
| 663 |
509 |
ProfilesI cnsns = AAFrequency.calculate(sequences, startRes, |
| 664 |
|
endRes + 1, showSequenceLogo); |
| 665 |
509 |
if (hmmInformation != null) |
| 666 |
|
{ |
| 667 |
0 |
HiddenMarkovModel hmm = hmmInformation.sequenceRef.getHMM(); |
| 668 |
|
|
| 669 |
0 |
ProfilesI info = AAFrequency.calculateHMMProfiles(hmm, |
| 670 |
|
(endRes + 1) - startRes, startRes, endRes + 1, |
| 671 |
|
hmmIgnoreBelowBackground, hmmUseInfoLetterHeight); |
| 672 |
0 |
_updateInformationRow(info); |
| 673 |
0 |
upd = true; |
| 674 |
|
} |
| 675 |
509 |
if (consensus != null) |
| 676 |
|
{ |
| 677 |
144 |
_updateConsensusRow(cnsns, sequences.size()); |
| 678 |
144 |
upd = true; |
| 679 |
|
} |
| 680 |
509 |
if (cs != null) |
| 681 |
|
{ |
| 682 |
509 |
cs.setConsensus(cnsns); |
| 683 |
509 |
upd = true; |
| 684 |
|
} |
| 685 |
|
|
| 686 |
509 |
hSSConsensusProfileMap = new HashMap<String, ProfilesI>(); |
| 687 |
509 |
List<String> ssSources = new ArrayList<String>(); |
| 688 |
509 |
AnnotatedCollectionI aa = this.getContext(); |
| 689 |
|
|
| 690 |
509 |
if (aa != null) |
| 691 |
|
{ |
| 692 |
416 |
ssSources = AlignmentUtils.extractSSSourceInAlignmentAnnotation( |
| 693 |
|
aa.getAlignmentAnnotation()); |
| 694 |
|
} |
| 695 |
509 |
if (ssSources != null) |
| 696 |
|
{ |
| 697 |
509 |
ssSources.add(Constants.SS_ALL_PROVIDERS); |
| 698 |
|
|
| 699 |
509 |
for (String ssSource : ssSources) |
| 700 |
|
{ |
| 701 |
549 |
ProfilesI hSSConsensus = AAFrequency.calculateSS(sequences, |
| 702 |
|
startRes, endRes + 1, showSequenceLogo, ssSource,this); |
| 703 |
549 |
hSSConsensusProfileMap.put(ssSource, hSSConsensus); |
| 704 |
|
} |
| 705 |
|
} |
| 706 |
|
|
| 707 |
509 |
if (ssConsensus != null) |
| 708 |
|
{ |
| 709 |
0 |
_updateSSConsensusRow(hSSConsensusProfileMap, sequences.size()); |
| 710 |
0 |
upd = true; |
| 711 |
|
} |
| 712 |
|
|
| 713 |
509 |
if (cs != null) |
| 714 |
|
{ |
| 715 |
509 |
cs.setSSConsensusProfileMap(hSSConsensusProfileMap); |
| 716 |
509 |
upd = true; |
| 717 |
|
} |
| 718 |
|
|
| 719 |
509 |
if ((conservation != null) |
| 720 |
|
|| (cs != null && cs.conservationApplied())) |
| 721 |
|
{ |
| 722 |
3 |
Conservation c = new Conservation(groupName, sequences, startRes, |
| 723 |
|
endRes + 1); |
| 724 |
3 |
c.calculate(); |
| 725 |
3 |
c.verdict(false, consPercGaps); |
| 726 |
3 |
if (conservation != null) |
| 727 |
|
{ |
| 728 |
0 |
_updateConservationRow(c); |
| 729 |
|
} |
| 730 |
3 |
if (cs != null) |
| 731 |
|
{ |
| 732 |
3 |
if (cs.conservationApplied()) |
| 733 |
|
{ |
| 734 |
3 |
cs.setConservation(c); |
| 735 |
|
} |
| 736 |
|
} |
| 737 |
|
|
| 738 |
3 |
upd = true; |
| 739 |
|
} |
| 740 |
509 |
if (cs != null && !defer) |
| 741 |
|
{ |
| 742 |
|
|
| 743 |
509 |
cs.alignmentChanged(context != null ? context : this, null); |
| 744 |
509 |
return true; |
| 745 |
|
} |
| 746 |
|
else |
| 747 |
|
{ |
| 748 |
0 |
return upd; |
| 749 |
|
} |
| 750 |
|
} catch (java.lang.OutOfMemoryError err) |
| 751 |
|
{ |
| 752 |
|
|
| 753 |
0 |
jalview.bin.Console |
| 754 |
|
.outPrintln("Out of memory loading groups: " + err); |
| 755 |
|
} |
| 756 |
0 |
return upd; |
| 757 |
|
} |
| 758 |
|
|
| |
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 4 |
Complexity Density: 0.5 |
|
| 759 |
0 |
private void _updateConservationRow(Conservation c)... |
| 760 |
|
{ |
| 761 |
0 |
if (conservation == null) |
| 762 |
|
{ |
| 763 |
0 |
getConservation(); |
| 764 |
|
} |
| 765 |
|
|
| 766 |
0 |
conservation.label = "Conservation for " + getName(); |
| 767 |
0 |
conservation.description = "Conservation for group " + getName() |
| 768 |
|
+ " less than " + consPercGaps + "% gaps"; |
| 769 |
|
|
| 770 |
0 |
int aWidth = (conservation.annotations != null) |
| 771 |
0 |
? (endRes < conservation.annotations.length |
| 772 |
|
? conservation.annotations.length |
| 773 |
|
: endRes + 1) |
| 774 |
|
: endRes + 1; |
| 775 |
0 |
conservation.annotations = null; |
| 776 |
0 |
conservation.annotations = new Annotation[aWidth]; |
| 777 |
|
|
| 778 |
0 |
c.completeAnnotations(conservation, null, startRes, endRes + 1); |
| 779 |
|
} |
| 780 |
|
|
| 781 |
|
public ProfilesI consensusData = null; |
| 782 |
|
|
| |
|
| 73.3% |
Uncovered Elements: 4 (15) |
Complexity: 4 |
Complexity Density: 0.44 |
|
| 783 |
144 |
private void _updateConsensusRow(ProfilesI cnsns, long nseq)... |
| 784 |
|
{ |
| 785 |
144 |
if (consensus == null) |
| 786 |
|
{ |
| 787 |
0 |
getConsensus(); |
| 788 |
|
} |
| 789 |
144 |
consensus.label = "Consensus for " + getName(); |
| 790 |
144 |
consensus.description = "Percent Identity"; |
| 791 |
144 |
consensusData = cnsns; |
| 792 |
|
|
| 793 |
144 |
int aWidth = (consensus.annotations != null) |
| 794 |
144 |
? (endRes < consensus.annotations.length |
| 795 |
|
? consensus.annotations.length |
| 796 |
|
: endRes + 1) |
| 797 |
|
: endRes + 1; |
| 798 |
144 |
consensus.annotations = null; |
| 799 |
144 |
consensus.annotations = new Annotation[aWidth]; |
| 800 |
|
|
| 801 |
144 |
AAFrequency.completeConsensus(consensus, cnsns, startRes, endRes + 1, |
| 802 |
|
ignoreGapsInConsensus, showSequenceLogo, nseq); |
| 803 |
|
|
| 804 |
|
|
| 805 |
|
|
| 806 |
|
} |
| 807 |
|
|
| 808 |
|
|
| 809 |
|
|
| 810 |
|
|
| 811 |
|
|
| 812 |
|
@param |
| 813 |
|
|
| 814 |
|
|
| 815 |
|
@param |
| 816 |
|
|
| 817 |
|
|
| |
|
| 0% |
Uncovered Elements: 33 (33) |
Complexity: 8 |
Complexity Density: 0.38 |
|
| 818 |
0 |
private void _updateSSConsensusRow(... |
| 819 |
|
Map<String, ProfilesI> hSSConsensusProfileMap, long nseq) |
| 820 |
|
{ |
| 821 |
|
|
| 822 |
0 |
List<String> ssSources = new ArrayList<>( |
| 823 |
|
hSSConsensusProfileMap.keySet()); |
| 824 |
0 |
secondaryStructureSources = new ArrayList<String>(); |
| 825 |
|
|
| 826 |
|
|
| 827 |
0 |
Collections.sort(ssSources); |
| 828 |
|
|
| 829 |
|
|
| 830 |
0 |
if (ssConsensus == null) |
| 831 |
|
{ |
| 832 |
0 |
getSSConsensus(ssSources); |
| 833 |
|
} |
| 834 |
|
|
| 835 |
|
|
| 836 |
0 |
for (AlignmentAnnotation aa : ssConsensus) |
| 837 |
|
{ |
| 838 |
0 |
ProfilesI profile = null; |
| 839 |
0 |
String ssSource = null; |
| 840 |
|
|
| 841 |
|
|
| 842 |
|
|
| 843 |
0 |
for (String source : ssSources) |
| 844 |
|
{ |
| 845 |
0 |
if (aa.description.startsWith(source)) |
| 846 |
|
{ |
| 847 |
0 |
profile = hSSConsensusProfileMap.get(source); |
| 848 |
0 |
ssSource = source; |
| 849 |
|
} |
| 850 |
|
} |
| 851 |
|
|
| 852 |
|
|
| 853 |
0 |
if (profile == null) |
| 854 |
|
{ |
| 855 |
0 |
continue; |
| 856 |
|
} |
| 857 |
|
|
| 858 |
|
|
| 859 |
|
|
| 860 |
0 |
aa.label = Constants.SECONDARY_STRUCTURE_CONSENSUS_LABEL + " " |
| 861 |
|
+ ssSource + " " + getName(); |
| 862 |
0 |
aa.description = ssSource + " " |
| 863 |
|
+ Constants.SECONDARY_STRUCTURE_CONSENSUS_LABEL + " for " |
| 864 |
|
+ getName(); |
| 865 |
|
|
| 866 |
|
|
| 867 |
0 |
int aWidth = (aa.annotations != null) |
| 868 |
0 |
? (endRes < aa.annotations.length ? aa.annotations.length |
| 869 |
|
: endRes + 1) |
| 870 |
|
: endRes + 1; |
| 871 |
0 |
aa.annotations = new Annotation[aWidth]; |
| 872 |
|
|
| 873 |
|
|
| 874 |
0 |
AAFrequency.completeSSConsensus(aa, profile, startRes, endRes + 1, |
| 875 |
|
ignoreGapsInConsensus, showSequenceLogo, nseq); |
| 876 |
|
|
| 877 |
|
|
| 878 |
|
|
| 879 |
|
|
| 880 |
0 |
if (aa.getNoOfSequencesIncluded() > 0 |
| 881 |
|
&& !Constants.SS_ALL_PROVIDERS.equals(ssSource)) |
| 882 |
|
{ |
| 883 |
|
|
| 884 |
0 |
secondaryStructureSources.add(ssSource); |
| 885 |
|
} |
| 886 |
|
} |
| 887 |
|
} |
| 888 |
|
|
| 889 |
|
|
| 890 |
|
|
| 891 |
|
|
| 892 |
|
@param |
| 893 |
|
|
| |
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 4 |
Complexity Density: 0.44 |
|
| 894 |
0 |
private void _updateInformationRow(ProfilesI cnsns)... |
| 895 |
|
{ |
| 896 |
0 |
if (hmmInformation == null) |
| 897 |
|
{ |
| 898 |
0 |
createInformationAnnotation(); |
| 899 |
|
} |
| 900 |
0 |
hmmInformation.description = MessageManager |
| 901 |
|
.getString("label.information_description"); |
| 902 |
0 |
setHmmProfiles(cnsns); |
| 903 |
|
|
| 904 |
0 |
int aWidth = (hmmInformation.annotations != null) |
| 905 |
0 |
? (endRes < hmmInformation.annotations.length |
| 906 |
|
? hmmInformation.annotations.length : endRes + 1) |
| 907 |
|
: endRes + 1; |
| 908 |
0 |
hmmInformation.annotations = null; |
| 909 |
0 |
hmmInformation.annotations = new Annotation[aWidth]; |
| 910 |
|
|
| 911 |
0 |
hmmInformation.setCalcId(InformationThread.HMM_CALC_ID); |
| 912 |
0 |
AAFrequency.completeInformation(hmmInformation, cnsns, startRes, |
| 913 |
|
endRes + 1); |
| 914 |
|
} |
| 915 |
|
|
| 916 |
|
|
| 917 |
|
@param |
| 918 |
|
|
| 919 |
|
@param |
| 920 |
|
|
| 921 |
|
|
| 922 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 923 |
235 |
public void addOrRemove(SequenceI s, boolean recalc)... |
| 924 |
|
{ |
| 925 |
235 |
synchronized (sequences) |
| 926 |
|
{ |
| 927 |
235 |
if (sequences.contains(s)) |
| 928 |
|
{ |
| 929 |
1 |
deleteSequence(s, recalc); |
| 930 |
|
} |
| 931 |
|
else |
| 932 |
|
{ |
| 933 |
234 |
addSequence(s, recalc); |
| 934 |
|
} |
| 935 |
|
} |
| 936 |
|
} |
| 937 |
|
|
| 938 |
|
|
| 939 |
|
|
| 940 |
|
|
| 941 |
|
|
| 942 |
|
@param |
| 943 |
|
@return |
| 944 |
|
|
| |
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 3 |
Complexity Density: 0.33 |
|
| 945 |
0 |
public boolean addOrRemoveAnnotation(... |
| 946 |
|
AlignmentAnnotation alignmentAnnotation) |
| 947 |
|
{ |
| 948 |
0 |
synchronized (annotationsFromTree) |
| 949 |
|
{ |
| 950 |
0 |
if (annotationsFromTree.contains(alignmentAnnotation)) |
| 951 |
|
{ |
| 952 |
0 |
annotationsFromTree.remove(alignmentAnnotation); |
| 953 |
|
|
| 954 |
0 |
for(AlignmentAnnotation annot : annotationsFromTree) { |
| 955 |
0 |
if(annot.sequenceRef == alignmentAnnotation.sequenceRef) { |
| 956 |
0 |
return true; |
| 957 |
|
} |
| 958 |
|
} |
| 959 |
|
|
| 960 |
0 |
return false; |
| 961 |
|
} |
| 962 |
|
else |
| 963 |
|
{ |
| 964 |
0 |
annotationsFromTree.add(alignmentAnnotation); |
| 965 |
0 |
return true; |
| 966 |
|
} |
| 967 |
|
} |
| 968 |
|
} |
| 969 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 3 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
| 970 |
41 |
public void addAnnotationFromTree(AlignmentAnnotation alignmentAnnotation)... |
| 971 |
|
{ |
| 972 |
41 |
if(annotationsFromTree == null) |
| 973 |
|
{ |
| 974 |
0 |
annotationsFromTree = new ArrayList<AlignmentAnnotation>(); |
| 975 |
|
} |
| 976 |
|
|
| 977 |
41 |
synchronized (annotationsFromTree) |
| 978 |
|
{ |
| 979 |
41 |
if (!annotationsFromTree.contains(alignmentAnnotation)) |
| 980 |
|
{ |
| 981 |
|
|
| 982 |
41 |
annotationsFromTree.add(alignmentAnnotation); |
| 983 |
|
|
| 984 |
|
} |
| 985 |
|
} |
| 986 |
|
} |
| 987 |
|
|
| 988 |
|
|
| 989 |
|
|
| 990 |
|
|
| 991 |
|
@param |
| 992 |
|
|
| 993 |
|
@param |
| 994 |
|
|
| 995 |
|
|
| |
|
| 71.4% |
Uncovered Elements: 2 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
| 996 |
35 |
public void deleteSequence(SequenceI s, boolean recalc)... |
| 997 |
|
{ |
| 998 |
35 |
synchronized (sequences) |
| 999 |
|
{ |
| 1000 |
35 |
sequences.remove(s); |
| 1001 |
35 |
changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, |
| 1002 |
|
sequences.size() + 1, sequences.size()); |
| 1003 |
|
|
| 1004 |
35 |
if (recalc) |
| 1005 |
|
{ |
| 1006 |
0 |
recalcConservation(); |
| 1007 |
|
} |
| 1008 |
|
} |
| 1009 |
|
} |
| 1010 |
|
|
| 1011 |
|
|
| 1012 |
|
|
| 1013 |
|
|
| 1014 |
|
@return |
| 1015 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1016 |
346435 |
@Override... |
| 1017 |
|
public int getStartRes() |
| 1018 |
|
{ |
| 1019 |
346448 |
return startRes; |
| 1020 |
|
} |
| 1021 |
|
|
| 1022 |
|
|
| 1023 |
|
|
| 1024 |
|
@return |
| 1025 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1026 |
257968 |
@Override... |
| 1027 |
|
public int getEndRes() |
| 1028 |
|
{ |
| 1029 |
257975 |
return endRes; |
| 1030 |
|
} |
| 1031 |
|
|
| 1032 |
|
|
| 1033 |
|
|
| 1034 |
|
|
| 1035 |
|
@param |
| 1036 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 1037 |
398 |
public void setStartRes(int newStart)... |
| 1038 |
|
{ |
| 1039 |
398 |
int before = startRes; |
| 1040 |
398 |
startRes = Math.max(0, newStart); |
| 1041 |
|
|
| 1042 |
398 |
changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, before, startRes); |
| 1043 |
|
|
| 1044 |
|
} |
| 1045 |
|
|
| 1046 |
|
|
| 1047 |
|
|
| 1048 |
|
|
| 1049 |
|
@param |
| 1050 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 1051 |
419 |
public void setEndRes(int i)... |
| 1052 |
|
{ |
| 1053 |
419 |
int before = endRes; |
| 1054 |
419 |
endRes = i; |
| 1055 |
419 |
changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, before, endRes); |
| 1056 |
|
} |
| 1057 |
|
|
| 1058 |
|
|
| 1059 |
|
@return |
| 1060 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1061 |
818 |
public int getSize()... |
| 1062 |
|
{ |
| 1063 |
818 |
return sequences.size(); |
| 1064 |
|
} |
| 1065 |
|
|
| 1066 |
|
|
| 1067 |
|
@param |
| 1068 |
|
@return |
| 1069 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1070 |
96 |
public SequenceI getSequenceAt(int i)... |
| 1071 |
|
{ |
| 1072 |
96 |
return sequences.get(i); |
| 1073 |
|
} |
| 1074 |
|
|
| 1075 |
|
|
| 1076 |
|
@param |
| 1077 |
|
|
| 1078 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1079 |
24 |
public void setColourText(boolean state)... |
| 1080 |
|
{ |
| 1081 |
24 |
colourText = state; |
| 1082 |
|
} |
| 1083 |
|
|
| 1084 |
|
|
| 1085 |
|
|
| 1086 |
|
|
| 1087 |
|
@return |
| 1088 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1089 |
27316 |
public boolean getColourText()... |
| 1090 |
|
{ |
| 1091 |
27316 |
return colourText; |
| 1092 |
|
} |
| 1093 |
|
|
| 1094 |
|
|
| 1095 |
|
|
| 1096 |
|
|
| 1097 |
|
@param |
| 1098 |
|
|
| 1099 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1100 |
20 |
public void setDisplayText(boolean state)... |
| 1101 |
|
{ |
| 1102 |
20 |
displayText = state; |
| 1103 |
|
} |
| 1104 |
|
|
| 1105 |
|
|
| 1106 |
|
|
| 1107 |
|
|
| 1108 |
|
@return |
| 1109 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1110 |
27301 |
public boolean getDisplayText()... |
| 1111 |
|
{ |
| 1112 |
27301 |
return displayText; |
| 1113 |
|
} |
| 1114 |
|
|
| 1115 |
|
|
| 1116 |
|
|
| 1117 |
|
|
| 1118 |
|
@param |
| 1119 |
|
|
| 1120 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1121 |
20 |
public void setDisplayBoxes(boolean state)... |
| 1122 |
|
{ |
| 1123 |
20 |
displayBoxes = state; |
| 1124 |
|
} |
| 1125 |
|
|
| 1126 |
|
|
| 1127 |
|
|
| 1128 |
|
|
| 1129 |
|
@return |
| 1130 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1131 |
27310 |
public boolean getDisplayBoxes()... |
| 1132 |
|
{ |
| 1133 |
27310 |
return displayBoxes; |
| 1134 |
|
} |
| 1135 |
|
|
| 1136 |
|
|
| 1137 |
|
|
| 1138 |
|
|
| 1139 |
|
@return |
| 1140 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
| 1141 |
123 |
@Override... |
| 1142 |
|
public int getWidth() |
| 1143 |
|
{ |
| 1144 |
123 |
synchronized (sequences) |
| 1145 |
|
{ |
| 1146 |
|
|
| 1147 |
123 |
boolean first = true; |
| 1148 |
123 |
for (SequenceI seq : sequences) |
| 1149 |
|
{ |
| 1150 |
400 |
if (first || seq.getLength() > width) |
| 1151 |
|
{ |
| 1152 |
123 |
width = seq.getLength(); |
| 1153 |
123 |
first = false; |
| 1154 |
|
} |
| 1155 |
|
} |
| 1156 |
123 |
return width; |
| 1157 |
|
} |
| 1158 |
|
} |
| 1159 |
|
|
| 1160 |
|
|
| 1161 |
|
|
| 1162 |
|
|
| 1163 |
|
@param |
| 1164 |
|
|
| 1165 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1166 |
89 |
public void setOutlineColour(Color c)... |
| 1167 |
|
{ |
| 1168 |
89 |
outlineColour = c; |
| 1169 |
|
} |
| 1170 |
|
|
| 1171 |
|
|
| 1172 |
|
|
| 1173 |
|
|
| 1174 |
|
@return |
| 1175 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1176 |
287 |
public Color getOutlineColour()... |
| 1177 |
|
{ |
| 1178 |
287 |
return outlineColour; |
| 1179 |
|
} |
| 1180 |
|
|
| 1181 |
|
|
| 1182 |
|
|
| 1183 |
|
|
| 1184 |
|
|
| 1185 |
|
|
| 1186 |
|
|
| 1187 |
|
@param |
| 1188 |
|
|
| 1189 |
|
@return |
| 1190 |
|
|
| 1191 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1192 |
99 |
public SequenceI[] getSequencesInOrder(AlignmentI al)... |
| 1193 |
|
{ |
| 1194 |
99 |
return getSequencesInOrder(al, true); |
| 1195 |
|
} |
| 1196 |
|
|
| 1197 |
|
|
| 1198 |
|
|
| 1199 |
|
|
| 1200 |
|
|
| 1201 |
|
|
| 1202 |
|
@param |
| 1203 |
|
@param |
| 1204 |
|
@return |
| 1205 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 12 (36) |
Complexity: 10 |
Complexity Density: 0.5 |
|
| 1206 |
106 |
public SequenceI[] getSequencesInOrder(AlignmentI al, boolean trim)... |
| 1207 |
|
{ |
| 1208 |
106 |
synchronized (sequences) |
| 1209 |
|
{ |
| 1210 |
106 |
int sSize = sequences.size(); |
| 1211 |
106 |
int alHeight = al.getHeight(); |
| 1212 |
|
|
| 1213 |
106 |
SequenceI[] seqs = new SequenceI[(trim) ? sSize : alHeight]; |
| 1214 |
|
|
| 1215 |
106 |
int index = 0; |
| 1216 |
1010 |
for (int i = 0; i < alHeight && index < sSize; i++) |
| 1217 |
|
{ |
| 1218 |
904 |
if (sequences.contains(al.getSequenceAt(i))) |
| 1219 |
|
{ |
| 1220 |
326 |
seqs[(trim) ? index : i] = al.getSequenceAt(i); |
| 1221 |
326 |
index++; |
| 1222 |
|
} |
| 1223 |
|
} |
| 1224 |
106 |
if (index == 0) |
| 1225 |
|
{ |
| 1226 |
33 |
return null; |
| 1227 |
|
} |
| 1228 |
73 |
if (!trim) |
| 1229 |
|
{ |
| 1230 |
0 |
return seqs; |
| 1231 |
|
} |
| 1232 |
73 |
if (index < seqs.length) |
| 1233 |
|
{ |
| 1234 |
0 |
SequenceI[] dummy = seqs; |
| 1235 |
0 |
seqs = new SequenceI[index]; |
| 1236 |
0 |
while (--index >= 0) |
| 1237 |
|
{ |
| 1238 |
0 |
seqs[index] = dummy[index]; |
| 1239 |
0 |
dummy[index] = null; |
| 1240 |
|
} |
| 1241 |
|
} |
| 1242 |
73 |
return seqs; |
| 1243 |
|
} |
| 1244 |
|
} |
| 1245 |
|
|
| 1246 |
|
|
| 1247 |
|
@return |
| 1248 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1249 |
59 |
public Color getIdColour()... |
| 1250 |
|
{ |
| 1251 |
59 |
return idColour; |
| 1252 |
|
} |
| 1253 |
|
|
| 1254 |
|
|
| 1255 |
|
@param |
| 1256 |
|
|
| 1257 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1258 |
68 |
public void setIdColour(Color idColour)... |
| 1259 |
|
{ |
| 1260 |
68 |
this.idColour = idColour; |
| 1261 |
|
} |
| 1262 |
|
|
| 1263 |
|
|
| 1264 |
|
@return |
| 1265 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1266 |
27268 |
@Override... |
| 1267 |
|
public SequenceI getSeqrep() |
| 1268 |
|
{ |
| 1269 |
27268 |
return seqrep; |
| 1270 |
|
} |
| 1271 |
|
|
| 1272 |
|
|
| 1273 |
|
|
| 1274 |
|
|
| 1275 |
|
|
| 1276 |
|
@param |
| 1277 |
|
|
| 1278 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1279 |
258 |
@Override... |
| 1280 |
|
public void setSeqrep(SequenceI seqrep) |
| 1281 |
|
{ |
| 1282 |
258 |
this.seqrep = seqrep; |
| 1283 |
|
} |
| 1284 |
|
|
| 1285 |
|
|
| 1286 |
|
|
| 1287 |
|
@return |
| 1288 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1289 |
10 |
@Override... |
| 1290 |
|
public boolean hasSeqrep() |
| 1291 |
|
{ |
| 1292 |
10 |
return seqrep != null; |
| 1293 |
|
} |
| 1294 |
|
|
| 1295 |
|
|
| 1296 |
|
|
| 1297 |
|
|
| 1298 |
|
|
| 1299 |
|
@param |
| 1300 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1301 |
6 |
public void setHidereps(boolean visibility)... |
| 1302 |
|
{ |
| 1303 |
6 |
hidereps = visibility; |
| 1304 |
|
} |
| 1305 |
|
|
| 1306 |
|
|
| 1307 |
|
|
| 1308 |
|
@return |
| 1309 |
|
|
| 1310 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1311 |
12 |
public boolean isHidereps()... |
| 1312 |
|
{ |
| 1313 |
12 |
return hidereps; |
| 1314 |
|
} |
| 1315 |
|
|
| 1316 |
|
|
| 1317 |
|
|
| 1318 |
|
|
| 1319 |
|
@param |
| 1320 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1321 |
1 |
public void setHideCols(boolean visibility)... |
| 1322 |
|
{ |
| 1323 |
1 |
hidecols = visibility; |
| 1324 |
|
} |
| 1325 |
|
|
| 1326 |
|
|
| 1327 |
|
|
| 1328 |
|
@return |
| 1329 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1330 |
12 |
public boolean isHideCols()... |
| 1331 |
|
{ |
| 1332 |
12 |
return hidecols; |
| 1333 |
|
} |
| 1334 |
|
|
| 1335 |
|
|
| 1336 |
|
|
| 1337 |
|
|
| 1338 |
|
|
| 1339 |
|
@param |
| 1340 |
|
|
| 1341 |
|
@param |
| 1342 |
|
|
| 1343 |
|
@return |
| 1344 |
|
|
| |
|
| 54.5% |
Uncovered Elements: 5 (11) |
Complexity: 5 |
Complexity Density: 0.71 |
|
| 1345 |
33 |
public SequenceGroup intersect(AlignmentI alignment,... |
| 1346 |
|
Map<SequenceI, SequenceCollectionI> map) |
| 1347 |
|
{ |
| 1348 |
33 |
SequenceGroup sgroup = new SequenceGroup(this); |
| 1349 |
33 |
SequenceI[] insect = getSequencesInOrder(alignment); |
| 1350 |
33 |
sgroup.sequences = new ArrayList<>(); |
| 1351 |
33 |
for (int s = 0; insect != null && s < insect.length; s++) |
| 1352 |
|
{ |
| 1353 |
0 |
if (map == null || map.containsKey(insect[s])) |
| 1354 |
|
{ |
| 1355 |
0 |
sgroup.sequences.add(insect[s]); |
| 1356 |
|
} |
| 1357 |
|
} |
| 1358 |
33 |
return sgroup; |
| 1359 |
|
} |
| 1360 |
|
|
| 1361 |
|
|
| 1362 |
|
|
| 1363 |
|
|
| 1364 |
|
@return |
| 1365 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1366 |
1085 |
public List<AlignmentAnnotation> getAnnotationsFromTree()... |
| 1367 |
|
{ |
| 1368 |
1085 |
return annotationsFromTree; |
| 1369 |
|
} |
| 1370 |
|
|
| 1371 |
|
|
| 1372 |
|
|
| 1373 |
|
|
| 1374 |
|
@param |
| 1375 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1376 |
0 |
public void setAnnotationsFromTree(... |
| 1377 |
|
List<AlignmentAnnotation> annotationsFromTree) |
| 1378 |
|
{ |
| 1379 |
0 |
this.annotationsFromTree = annotationsFromTree; |
| 1380 |
|
} |
| 1381 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1382 |
138 |
public boolean hasAnnotationsFromTree()... |
| 1383 |
|
{ |
| 1384 |
138 |
return (this.annotationsFromTree != null |
| 1385 |
|
&& !this.annotationsFromTree.isEmpty()) ; |
| 1386 |
|
} |
| 1387 |
|
|
| 1388 |
|
|
| 1389 |
|
|
| 1390 |
|
@return |
| 1391 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1392 |
27117 |
public boolean getShowNonconserved()... |
| 1393 |
|
{ |
| 1394 |
27117 |
return showNonconserved; |
| 1395 |
|
} |
| 1396 |
|
|
| 1397 |
|
|
| 1398 |
|
@param |
| 1399 |
|
|
| 1400 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1401 |
90 |
public void setShowNonconserved(boolean displayNonconserved)... |
| 1402 |
|
{ |
| 1403 |
90 |
this.showNonconserved = displayNonconserved; |
| 1404 |
|
} |
| 1405 |
|
|
| 1406 |
|
|
| 1407 |
|
|
| 1408 |
|
|
| 1409 |
|
|
| 1410 |
|
@param |
| 1411 |
|
|
| |
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 1412 |
24 |
public void setConsensus(AlignmentAnnotation aan)... |
| 1413 |
|
{ |
| 1414 |
24 |
if (consensus == null) |
| 1415 |
|
{ |
| 1416 |
24 |
consensus = aan; |
| 1417 |
|
} |
| 1418 |
|
} |
| 1419 |
|
|
| |
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
| 1420 |
0 |
public void setSSConsensusRow(AlignmentAnnotation aan)... |
| 1421 |
|
{ |
| 1422 |
|
|
| 1423 |
0 |
if (ssConsensus == null) |
| 1424 |
|
{ |
| 1425 |
0 |
ssConsensus = new ArrayList<AlignmentAnnotation>(); |
| 1426 |
0 |
ssConsensus.add(aan); |
| 1427 |
|
} |
| 1428 |
|
else |
| 1429 |
|
{ |
| 1430 |
0 |
boolean annotExists = ssConsensus.stream() |
| 1431 |
|
.anyMatch(ssa -> ssa.label.equals(aan.label)); |
| 1432 |
0 |
if (!annotExists) |
| 1433 |
|
{ |
| 1434 |
0 |
ssConsensus.add(aan); |
| 1435 |
|
} |
| 1436 |
|
} |
| 1437 |
|
} |
| 1438 |
|
|
| 1439 |
|
|
| 1440 |
|
|
| 1441 |
|
@return |
| 1442 |
|
|
| 1443 |
|
|
| |
|
| 40% |
Uncovered Elements: 9 (15) |
Complexity: 3 |
Complexity Density: 0.27 |
|
| 1444 |
117 |
public AlignmentAnnotation getConsensus()... |
| 1445 |
|
{ |
| 1446 |
|
|
| 1447 |
117 |
int aWidth = this.getWidth(); |
| 1448 |
|
|
| 1449 |
|
|
| 1450 |
|
|
| 1451 |
117 |
if (aWidth < 0) |
| 1452 |
|
{ |
| 1453 |
0 |
return null; |
| 1454 |
|
} |
| 1455 |
117 |
if (consensus == null) |
| 1456 |
|
{ |
| 1457 |
0 |
consensus = new AlignmentAnnotation("", "", new Annotation[1], 0f, |
| 1458 |
|
100f, AlignmentAnnotation.BAR_GRAPH); |
| 1459 |
0 |
consensus.hasText = true; |
| 1460 |
0 |
consensus.autoCalculated = true; |
| 1461 |
0 |
consensus.groupRef = this; |
| 1462 |
0 |
consensus.label = "Consensus for " + getName(); |
| 1463 |
0 |
consensus.description = "Percent Identity"; |
| 1464 |
|
} |
| 1465 |
117 |
return consensus; |
| 1466 |
|
} |
| 1467 |
|
|
| |
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 4 |
Complexity Density: 0.27 |
|
| 1468 |
0 |
public List<AlignmentAnnotation> getSSConsensus(List<String> ssSources)... |
| 1469 |
|
{ |
| 1470 |
|
|
| 1471 |
0 |
int aWidth = this.getWidth(); |
| 1472 |
|
|
| 1473 |
|
|
| 1474 |
|
|
| 1475 |
0 |
if (aWidth < 0) |
| 1476 |
|
{ |
| 1477 |
0 |
return null; |
| 1478 |
|
} |
| 1479 |
0 |
if (ssConsensus == null && ssSources != null) |
| 1480 |
|
{ |
| 1481 |
0 |
ssConsensus = new ArrayList<AlignmentAnnotation>(); |
| 1482 |
|
|
| 1483 |
0 |
for (String ssSource : ssSources) |
| 1484 |
|
{ |
| 1485 |
0 |
AlignmentAnnotation aa = new AlignmentAnnotation("", "", |
| 1486 |
|
new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH); |
| 1487 |
|
|
| 1488 |
|
|
| 1489 |
0 |
aa.visible = Constants.SS_ALL_PROVIDERS.equals(ssSource); |
| 1490 |
0 |
aa.hasText = true; |
| 1491 |
0 |
aa.autoCalculated = true; |
| 1492 |
0 |
aa.groupRef = this; |
| 1493 |
|
|
| 1494 |
0 |
aa.label = Constants.SECONDARY_STRUCTURE_CONSENSUS_LABEL + " " |
| 1495 |
|
+ ssSource + " " + getName(); |
| 1496 |
0 |
aa.description = ssSource + " " |
| 1497 |
|
+ Constants.SECONDARY_STRUCTURE_CONSENSUS_LABEL + " for " |
| 1498 |
|
+ getName(); |
| 1499 |
0 |
ssConsensus.add(aa); |
| 1500 |
|
} |
| 1501 |
|
|
| 1502 |
|
} |
| 1503 |
0 |
return ssConsensus; |
| 1504 |
|
} |
| 1505 |
|
|
| 1506 |
|
|
| 1507 |
|
|
| 1508 |
|
|
| |
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 1509 |
0 |
void createInformationAnnotation()... |
| 1510 |
|
{ |
| 1511 |
0 |
hmmInformation = new AlignmentAnnotation("", "", new Annotation[1], 0f, |
| 1512 |
|
6.25f, AlignmentAnnotation.BAR_GRAPH); |
| 1513 |
0 |
hmmInformation.hasText = true; |
| 1514 |
0 |
hmmInformation.autoCalculated = false; |
| 1515 |
0 |
hmmInformation.groupRef = this; |
| 1516 |
0 |
hmmInformation.label = getName(); |
| 1517 |
0 |
hmmInformation.description = MessageManager |
| 1518 |
|
.getString("label.information_description"); |
| 1519 |
0 |
hmmInformation.setCalcId(InformationThread.HMM_CALC_ID); |
| 1520 |
|
} |
| 1521 |
|
|
| 1522 |
|
|
| 1523 |
|
|
| 1524 |
|
|
| 1525 |
|
|
| 1526 |
|
@param |
| 1527 |
|
|
| |
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 1528 |
0 |
public void setConservationRow(AlignmentAnnotation aan)... |
| 1529 |
|
{ |
| 1530 |
0 |
if (conservation == null) |
| 1531 |
|
{ |
| 1532 |
0 |
conservation = aan; |
| 1533 |
|
} |
| 1534 |
|
} |
| 1535 |
|
|
| 1536 |
|
|
| 1537 |
|
|
| 1538 |
|
|
| 1539 |
|
@return |
| 1540 |
|
|
| |
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 2 |
Complexity Density: 0.25 |
|
| 1541 |
0 |
public AlignmentAnnotation getConservationRow()... |
| 1542 |
|
{ |
| 1543 |
0 |
if (conservation == null) |
| 1544 |
|
{ |
| 1545 |
0 |
conservation = new AlignmentAnnotation("", "", new Annotation[1], 0f, |
| 1546 |
|
11f, AlignmentAnnotation.BAR_GRAPH); |
| 1547 |
|
} |
| 1548 |
|
|
| 1549 |
0 |
conservation.hasText = true; |
| 1550 |
0 |
conservation.autoCalculated = true; |
| 1551 |
0 |
conservation.groupRef = this; |
| 1552 |
0 |
conservation.label = "Conservation for " + getName(); |
| 1553 |
0 |
conservation.description = "Conservation for group " + getName() |
| 1554 |
|
+ " less than " + consPercGaps + "% gaps"; |
| 1555 |
0 |
return conservation; |
| 1556 |
|
} |
| 1557 |
|
|
| 1558 |
|
|
| 1559 |
|
|
| 1560 |
|
@return |
| 1561 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1562 |
0 |
public boolean hasAnnotationRows()... |
| 1563 |
|
{ |
| 1564 |
0 |
return consensus != null || conservation != null; |
| 1565 |
|
} |
| 1566 |
|
|
| |
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 6 |
Complexity Density: 0.55 |
|
| 1567 |
0 |
public SequenceI getConsensusSeq()... |
| 1568 |
|
{ |
| 1569 |
0 |
getConsensus(); |
| 1570 |
0 |
StringBuffer seqs = new StringBuffer(); |
| 1571 |
0 |
for (int i = 0; i < consensus.annotations.length; i++) |
| 1572 |
|
{ |
| 1573 |
0 |
if (consensus.annotations[i] != null) |
| 1574 |
|
{ |
| 1575 |
0 |
String desc = consensus.annotations[i].description; |
| 1576 |
0 |
if (desc.length() > 1 && desc.charAt(0) == '[') |
| 1577 |
|
{ |
| 1578 |
0 |
seqs.append(desc.charAt(1)); |
| 1579 |
|
} |
| 1580 |
|
else |
| 1581 |
|
{ |
| 1582 |
0 |
seqs.append(consensus.annotations[i].displayCharacter); |
| 1583 |
|
} |
| 1584 |
|
} |
| 1585 |
|
} |
| 1586 |
|
|
| 1587 |
0 |
SequenceI sq = new Sequence("Group" + getName() + " Consensus", |
| 1588 |
|
seqs.toString()); |
| 1589 |
0 |
sq.setDescription("Percentage Identity Consensus " |
| 1590 |
0 |
+ ((ignoreGapsInConsensus) ? " without gaps" : "")); |
| 1591 |
0 |
return sq; |
| 1592 |
|
} |
| 1593 |
|
|
| |
|
| 50% |
Uncovered Elements: 3 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1594 |
60 |
public void setIgnoreGapsConsensus(boolean state)... |
| 1595 |
|
{ |
| 1596 |
60 |
if (this.ignoreGapsInConsensus != state && consensus != null) |
| 1597 |
|
{ |
| 1598 |
0 |
ignoreGapsInConsensus = state; |
| 1599 |
0 |
recalcConservation(); |
| 1600 |
|
} |
| 1601 |
60 |
ignoreGapsInConsensus = state; |
| 1602 |
|
} |
| 1603 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1604 |
32 |
public boolean getIgnoreGapsConsensus()... |
| 1605 |
|
{ |
| 1606 |
32 |
return ignoreGapsInConsensus; |
| 1607 |
|
} |
| 1608 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1609 |
0 |
public void setIgnoreBelowBackground(boolean state)... |
| 1610 |
|
{ |
| 1611 |
0 |
hmmIgnoreBelowBackground = state; |
| 1612 |
|
} |
| 1613 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1614 |
0 |
public boolean isIgnoreBelowBackground()... |
| 1615 |
|
{ |
| 1616 |
0 |
return hmmIgnoreBelowBackground; |
| 1617 |
|
} |
| 1618 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1619 |
0 |
public void setInfoLetterHeight(boolean state)... |
| 1620 |
|
{ |
| 1621 |
0 |
hmmUseInfoLetterHeight = state; |
| 1622 |
|
} |
| 1623 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1624 |
0 |
public boolean isUseInfoLetterHeight()... |
| 1625 |
|
{ |
| 1626 |
0 |
return hmmUseInfoLetterHeight; |
| 1627 |
|
} |
| 1628 |
|
|
| 1629 |
|
|
| 1630 |
|
@param |
| 1631 |
|
|
| 1632 |
|
|
| |
|
| 50% |
Uncovered Elements: 3 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1633 |
71 |
public void setshowSequenceLogo(boolean showSequenceLogo)... |
| 1634 |
|
{ |
| 1635 |
|
|
| 1636 |
71 |
if (this.showSequenceLogo != showSequenceLogo && consensus != null) |
| 1637 |
|
{ |
| 1638 |
0 |
this.showSequenceLogo = showSequenceLogo; |
| 1639 |
0 |
recalcConservation(); |
| 1640 |
|
} |
| 1641 |
71 |
this.showSequenceLogo = showSequenceLogo; |
| 1642 |
|
} |
| 1643 |
|
|
| 1644 |
|
|
| 1645 |
|
|
| 1646 |
|
@param |
| 1647 |
|
|
| 1648 |
|
|
| 1649 |
|
|
| |
|
| 50% |
Uncovered Elements: 3 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1650 |
71 |
public void setShowConsensusHistogram(boolean showConsHist)... |
| 1651 |
|
{ |
| 1652 |
|
|
| 1653 |
71 |
if (showConsensusHistogram != showConsHist && consensus != null) |
| 1654 |
|
{ |
| 1655 |
0 |
this.showConsensusHistogram = showConsHist; |
| 1656 |
0 |
recalcConservation(); |
| 1657 |
|
} |
| 1658 |
71 |
this.showConsensusHistogram = showConsHist; |
| 1659 |
|
} |
| 1660 |
|
|
| 1661 |
|
|
| 1662 |
|
@return |
| 1663 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1664 |
117 |
public boolean isShowConsensusHistogram()... |
| 1665 |
|
{ |
| 1666 |
117 |
return showConsensusHistogram; |
| 1667 |
|
} |
| 1668 |
|
|
| 1669 |
|
|
| 1670 |
|
|
| 1671 |
|
|
| 1672 |
|
@param |
| 1673 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1674 |
71 |
public void setNormaliseSequenceLogo(boolean norm)... |
| 1675 |
|
{ |
| 1676 |
71 |
normaliseSequenceLogo = norm; |
| 1677 |
|
} |
| 1678 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1679 |
117 |
public boolean isNormaliseSequenceLogo()... |
| 1680 |
|
{ |
| 1681 |
117 |
return normaliseSequenceLogo; |
| 1682 |
|
} |
| 1683 |
|
|
| |
|
| 81% |
Uncovered Elements: 4 (21) |
Complexity: 5 |
Complexity Density: 0.38 |
|
| 1684 |
925 |
@Override... |
| 1685 |
|
|
| 1686 |
|
|
| 1687 |
|
|
| 1688 |
|
public AlignmentAnnotation[] getAlignmentAnnotation() |
| 1689 |
|
{ |
| 1690 |
|
|
| 1691 |
|
|
| 1692 |
925 |
ArrayList<AlignmentAnnotation> annot = new ArrayList<>(); |
| 1693 |
925 |
synchronized (sequences) |
| 1694 |
|
{ |
| 1695 |
925 |
for (SequenceI seq : sequences) |
| 1696 |
|
{ |
| 1697 |
6875 |
AlignmentAnnotation[] aa = seq.getAnnotation(); |
| 1698 |
6875 |
if (aa != null) |
| 1699 |
|
{ |
| 1700 |
525 |
for (AlignmentAnnotation al : aa) |
| 1701 |
|
{ |
| 1702 |
4515 |
if (al.groupRef == this) |
| 1703 |
|
{ |
| 1704 |
0 |
annot.add(al); |
| 1705 |
|
} |
| 1706 |
|
} |
| 1707 |
|
} |
| 1708 |
|
} |
| 1709 |
925 |
if (consensus != null) |
| 1710 |
|
{ |
| 1711 |
384 |
annot.add(consensus); |
| 1712 |
|
} |
| 1713 |
925 |
if (conservation != null) |
| 1714 |
|
{ |
| 1715 |
0 |
annot.add(conservation); |
| 1716 |
|
} |
| 1717 |
|
} |
| 1718 |
925 |
return annot.toArray(new AlignmentAnnotation[0]); |
| 1719 |
|
} |
| 1720 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
| 1721 |
5 |
@Override... |
| 1722 |
|
public boolean isSecondaryStructurePresent() |
| 1723 |
|
{ |
| 1724 |
|
|
| 1725 |
|
|
| 1726 |
|
|
| 1727 |
5 |
synchronized (sequences) |
| 1728 |
|
{ |
| 1729 |
5 |
for (SequenceI seq : sequences) |
| 1730 |
|
{ |
| 1731 |
9 |
AlignmentAnnotation[] aa = seq.getAnnotation(); |
| 1732 |
9 |
if (AlignmentUtils.isSecondaryStructurePresent(aa)) |
| 1733 |
|
{ |
| 1734 |
2 |
return true; |
| 1735 |
|
} |
| 1736 |
|
} |
| 1737 |
|
} |
| 1738 |
3 |
return false; |
| 1739 |
|
} |
| 1740 |
|
|
| 1741 |
|
|
| 1742 |
|
|
| 1743 |
|
|
| 1744 |
|
@return |
| 1745 |
|
|
| |
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
| 1746 |
0 |
public int noOfSecondaryStructureAnnots()... |
| 1747 |
|
{ |
| 1748 |
0 |
int count = 0; |
| 1749 |
0 |
synchronized (sequences) |
| 1750 |
|
{ |
| 1751 |
0 |
for (SequenceI seq : sequences) |
| 1752 |
|
{ |
| 1753 |
0 |
AlignmentAnnotation[] aa = seq.getAnnotation(); |
| 1754 |
0 |
if (AlignmentUtils.getSecondaryStructureAnnots(aa) != null) |
| 1755 |
|
{ |
| 1756 |
0 |
count = count + AlignmentUtils.getSecondaryStructureAnnots(aa).size(); |
| 1757 |
|
} |
| 1758 |
|
} |
| 1759 |
|
} |
| 1760 |
0 |
return count; |
| 1761 |
|
} |
| 1762 |
|
|
| 1763 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1764 |
0 |
@Override... |
| 1765 |
|
public Iterable<AlignmentAnnotation> findAnnotation(String calcId) |
| 1766 |
|
{ |
| 1767 |
0 |
return AlignmentAnnotation.findAnnotation( |
| 1768 |
|
Arrays.asList(getAlignmentAnnotation()), calcId); |
| 1769 |
|
} |
| 1770 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1771 |
0 |
@Override... |
| 1772 |
|
public Iterable<AlignmentAnnotation> findAnnotations(SequenceI seq, |
| 1773 |
|
String calcId, String label) |
| 1774 |
|
{ |
| 1775 |
0 |
return AlignmentAnnotation.findAnnotations( |
| 1776 |
|
Arrays.asList(getAlignmentAnnotation()), seq, calcId, label); |
| 1777 |
|
} |
| 1778 |
|
|
| 1779 |
|
|
| 1780 |
|
|
| 1781 |
|
|
| 1782 |
|
@param |
| 1783 |
|
@return |
| 1784 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1785 |
0 |
public boolean hasAnnotation(String calcId)... |
| 1786 |
|
{ |
| 1787 |
0 |
return AlignmentAnnotation |
| 1788 |
|
.hasAnnotation(Arrays.asList(getAlignmentAnnotation()), calcId); |
| 1789 |
|
} |
| 1790 |
|
|
| 1791 |
|
|
| 1792 |
|
|
| 1793 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 1794 |
15 |
public void clear()... |
| 1795 |
|
{ |
| 1796 |
15 |
synchronized (sequences) |
| 1797 |
|
{ |
| 1798 |
15 |
int before = sequences.size(); |
| 1799 |
15 |
sequences.clear(); |
| 1800 |
15 |
changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, before, |
| 1801 |
|
sequences.size()); |
| 1802 |
|
} |
| 1803 |
|
} |
| 1804 |
|
|
| 1805 |
|
|
| 1806 |
|
|
| 1807 |
|
|
| 1808 |
|
|
| 1809 |
|
@param |
| 1810 |
|
|
| 1811 |
|
@param |
| 1812 |
|
|
| 1813 |
|
|
| 1814 |
|
@throws |
| 1815 |
|
|
| 1816 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1817 |
181 |
public void setContext(AnnotatedCollectionI ctx, boolean defined)... |
| 1818 |
|
{ |
| 1819 |
181 |
setContext(ctx); |
| 1820 |
180 |
this.isDefined = defined; |
| 1821 |
|
} |
| 1822 |
|
|
| 1823 |
|
|
| 1824 |
|
|
| 1825 |
|
|
| 1826 |
|
@param |
| 1827 |
|
|
| 1828 |
|
@throws |
| 1829 |
|
|
| 1830 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 1831 |
226 |
public void setContext(AnnotatedCollectionI ctx)... |
| 1832 |
|
{ |
| 1833 |
226 |
AnnotatedCollectionI ref = ctx; |
| 1834 |
562 |
while (ref != null) |
| 1835 |
|
{ |
| 1836 |
339 |
if (ref == this || ref.getContext() == ctx) |
| 1837 |
|
{ |
| 1838 |
3 |
throw new IllegalArgumentException( |
| 1839 |
|
"Circular reference in SequenceGroup.context"); |
| 1840 |
|
} |
| 1841 |
336 |
ref = ref.getContext(); |
| 1842 |
|
} |
| 1843 |
223 |
this.context = ctx; |
| 1844 |
|
} |
| 1845 |
|
|
| 1846 |
|
|
| 1847 |
|
|
| 1848 |
|
|
| 1849 |
|
@see |
| 1850 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1851 |
646 |
@Override... |
| 1852 |
|
public AnnotatedCollectionI getContext() |
| 1853 |
|
{ |
| 1854 |
646 |
return context; |
| 1855 |
|
} |
| 1856 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1857 |
9 |
public boolean isDefined()... |
| 1858 |
|
{ |
| 1859 |
9 |
return isDefined; |
| 1860 |
|
} |
| 1861 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 1862 |
88 |
public void setColourScheme(ColourSchemeI scheme)... |
| 1863 |
|
{ |
| 1864 |
88 |
if (cs == null) |
| 1865 |
|
{ |
| 1866 |
1 |
cs = new ResidueShader(); |
| 1867 |
|
} |
| 1868 |
88 |
cs.setColourScheme(scheme); |
| 1869 |
|
} |
| 1870 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1871 |
2 |
public void setGroupColourScheme(ResidueShaderI scheme)... |
| 1872 |
|
{ |
| 1873 |
2 |
cs = scheme; |
| 1874 |
|
} |
| 1875 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 1876 |
155 |
public ColourSchemeI getColourScheme()... |
| 1877 |
|
{ |
| 1878 |
155 |
return cs == null ? null : cs.getColourScheme(); |
| 1879 |
|
} |
| 1880 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1881 |
153962 |
public ResidueShaderI getGroupColourScheme()... |
| 1882 |
|
{ |
| 1883 |
153963 |
return cs; |
| 1884 |
|
} |
| 1885 |
|
|
| |
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 1886 |
72 |
@Override... |
| 1887 |
|
public boolean isNucleotide() |
| 1888 |
|
{ |
| 1889 |
72 |
if (context != null) |
| 1890 |
|
{ |
| 1891 |
72 |
return context.isNucleotide(); |
| 1892 |
|
} |
| 1893 |
0 |
return false; |
| 1894 |
|
} |
| 1895 |
|
|
| 1896 |
|
|
| 1897 |
|
@param |
| 1898 |
|
@return |
| 1899 |
|
|
| 1900 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1901 |
35 |
public boolean contains(SequenceI seq1)... |
| 1902 |
|
{ |
| 1903 |
35 |
return sequences.contains(seq1); |
| 1904 |
|
} |
| 1905 |
|
|
| |
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 1906 |
0 |
public boolean containsAnnotation(AlignmentAnnotation annot)... |
| 1907 |
|
{ |
| 1908 |
0 |
if (annotationsFromTree == null) |
| 1909 |
|
{ |
| 1910 |
0 |
return false; |
| 1911 |
|
} |
| 1912 |
0 |
return annotationsFromTree.contains(annot); |
| 1913 |
|
} |
| 1914 |
|
|
| 1915 |
|
|
| 1916 |
|
@param |
| 1917 |
|
@param |
| 1918 |
|
@return |
| 1919 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1920 |
15 |
public boolean contains(SequenceI seq, int apos)... |
| 1921 |
|
{ |
| 1922 |
15 |
return (startRes <= apos && endRes >= apos) && sequences.contains(seq); |
| 1923 |
|
} |
| 1924 |
|
|
| 1925 |
|
|
| 1926 |
|
|
| 1927 |
|
|
| 1928 |
|
ContactMapHolder cmholder = new ContactMapHolder(); |
| 1929 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1930 |
0 |
@Override... |
| 1931 |
|
public Collection<ContactMatrixI> getContactMaps() |
| 1932 |
|
{ |
| 1933 |
0 |
return cmholder.getContactMaps(); |
| 1934 |
|
} |
| 1935 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1936 |
0 |
@Override... |
| 1937 |
|
public ContactMatrixI getContactMatrixFor(AlignmentAnnotation ann) |
| 1938 |
|
{ |
| 1939 |
0 |
return cmholder.getContactMatrixFor(ann); |
| 1940 |
|
} |
| 1941 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1942 |
0 |
@Override... |
| 1943 |
|
public ContactListI getContactListFor(AlignmentAnnotation _aa, int column) |
| 1944 |
|
{ |
| 1945 |
0 |
return cmholder.getContactListFor(_aa, column); |
| 1946 |
|
} |
| 1947 |
|
|
| |
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
| 1948 |
0 |
@Override... |
| 1949 |
|
public AlignmentAnnotation addContactList(ContactMatrixI cm) |
| 1950 |
|
{ |
| 1951 |
0 |
AlignmentAnnotation aa = cmholder.addContactList(cm); |
| 1952 |
|
|
| 1953 |
0 |
Annotation _aa[] = new Annotation[getWidth()]; |
| 1954 |
0 |
Annotation dummy = new Annotation(0.0f); |
| 1955 |
0 |
for (int i = 0; i < _aa.length; _aa[i++] = dummy) |
| 1956 |
|
{ |
| 1957 |
0 |
; |
| 1958 |
|
} |
| 1959 |
0 |
aa.annotations = _aa; |
| 1960 |
|
|
| 1961 |
0 |
return aa; |
| 1962 |
|
} |
| 1963 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1964 |
0 |
@Override... |
| 1965 |
|
public void addContactListFor(AlignmentAnnotation annotation, |
| 1966 |
|
ContactMatrixI cm) |
| 1967 |
|
{ |
| 1968 |
0 |
cmholder.addContactListFor(annotation, cm); |
| 1969 |
|
} |
| 1970 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1971 |
0 |
public boolean isShowInformationHistogram()... |
| 1972 |
|
{ |
| 1973 |
0 |
return hmmShowHistogram; |
| 1974 |
|
} |
| 1975 |
|
|
| |
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 1976 |
11 |
public void setShowInformationHistogram(boolean state)... |
| 1977 |
|
{ |
| 1978 |
11 |
if (hmmShowHistogram != state && hmmInformation != null) |
| 1979 |
|
{ |
| 1980 |
0 |
this.hmmShowHistogram = state; |
| 1981 |
|
|
| 1982 |
|
} |
| 1983 |
11 |
this.hmmShowHistogram = state; |
| 1984 |
|
} |
| 1985 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1986 |
0 |
public boolean isShowHMMSequenceLogo()... |
| 1987 |
|
{ |
| 1988 |
0 |
return hmmShowSequenceLogo; |
| 1989 |
|
} |
| 1990 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1991 |
11 |
public void setShowHMMSequenceLogo(boolean state)... |
| 1992 |
|
{ |
| 1993 |
11 |
hmmShowSequenceLogo = state; |
| 1994 |
|
} |
| 1995 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1996 |
0 |
public boolean isNormaliseHMMSequenceLogo()... |
| 1997 |
|
{ |
| 1998 |
0 |
return hmmNormaliseSequenceLogo; |
| 1999 |
|
} |
| 2000 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2001 |
11 |
public void setNormaliseHMMSequenceLogo(boolean state)... |
| 2002 |
|
{ |
| 2003 |
11 |
hmmNormaliseSequenceLogo = state; |
| 2004 |
|
} |
| 2005 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2006 |
5922 |
public ProfilesI getConsensusData()... |
| 2007 |
|
{ |
| 2008 |
5922 |
return consensusProfiles; |
| 2009 |
|
} |
| 2010 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2011 |
0 |
public ProfilesI getHmmProfiles()... |
| 2012 |
|
{ |
| 2013 |
0 |
return hmmProfiles; |
| 2014 |
|
} |
| 2015 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2016 |
0 |
public void setHmmProfiles(ProfilesI hmmProfiles)... |
| 2017 |
|
{ |
| 2018 |
0 |
this.hmmProfiles = hmmProfiles; |
| 2019 |
|
} |
| 2020 |
|
|
| |
|
| 80% |
Uncovered Elements: 2 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
| 2021 |
12 |
@Override... |
| 2022 |
|
public List<SequenceI> getHmmSequences() |
| 2023 |
|
{ |
| 2024 |
12 |
List<SequenceI> result = new ArrayList<>(); |
| 2025 |
27 |
for (int i = 0; i < sequences.size(); i++) |
| 2026 |
|
{ |
| 2027 |
15 |
SequenceI seq = sequences.get(i); |
| 2028 |
15 |
if (seq.hasHMMProfile()) |
| 2029 |
|
{ |
| 2030 |
0 |
result.add(seq); |
| 2031 |
|
} |
| 2032 |
|
} |
| 2033 |
12 |
return result; |
| 2034 |
|
} |
| 2035 |
|
|
| 2036 |
|
} |