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