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