1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.viewmodel; |
22 |
|
|
23 |
|
import java.awt.Color; |
24 |
|
import java.beans.PropertyChangeSupport; |
25 |
|
import java.util.ArrayDeque; |
26 |
|
import java.util.ArrayList; |
27 |
|
import java.util.BitSet; |
28 |
|
import java.util.Deque; |
29 |
|
import java.util.HashMap; |
30 |
|
import java.util.Hashtable; |
31 |
|
import java.util.Iterator; |
32 |
|
import java.util.List; |
33 |
|
import java.util.Map; |
34 |
|
|
35 |
|
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; |
36 |
|
import jalview.analysis.Connectivity; |
37 |
|
import jalview.analysis.Conservation; |
38 |
|
import jalview.analysis.TreeModel; |
39 |
|
import jalview.api.AlignCalcManagerI; |
40 |
|
import jalview.api.AlignExportSettingsI; |
41 |
|
import jalview.api.AlignViewportI; |
42 |
|
import jalview.api.AlignmentViewPanel; |
43 |
|
import jalview.api.FeaturesDisplayedI; |
44 |
|
import jalview.api.ViewStyleI; |
45 |
|
import jalview.bin.Console; |
46 |
|
import jalview.commands.CommandI; |
47 |
|
import jalview.datamodel.AlignedCodonFrame; |
48 |
|
import jalview.datamodel.AlignmentAnnotation; |
49 |
|
import jalview.datamodel.AlignmentExportData; |
50 |
|
import jalview.datamodel.AlignmentI; |
51 |
|
import jalview.datamodel.AlignmentView; |
52 |
|
import jalview.datamodel.Annotation; |
53 |
|
import jalview.datamodel.ColumnSelection; |
54 |
|
import jalview.datamodel.ContactListI; |
55 |
|
import jalview.datamodel.ContactMatrixI; |
56 |
|
import jalview.datamodel.HiddenColumns; |
57 |
|
import jalview.datamodel.HiddenSequences; |
58 |
|
import jalview.datamodel.ProfilesI; |
59 |
|
import jalview.datamodel.SearchResultsI; |
60 |
|
import jalview.datamodel.Sequence; |
61 |
|
import jalview.datamodel.SequenceCollectionI; |
62 |
|
import jalview.datamodel.SequenceGroup; |
63 |
|
import jalview.datamodel.SequenceI; |
64 |
|
import jalview.gui.QuitHandler; |
65 |
|
import jalview.project.Jalview2XML; |
66 |
|
import jalview.renderer.ResidueShader; |
67 |
|
import jalview.renderer.ResidueShaderI; |
68 |
|
import jalview.schemes.ColourSchemeI; |
69 |
|
import jalview.structure.CommandListener; |
70 |
|
import jalview.structure.StructureSelectionManager; |
71 |
|
import jalview.structure.VamsasSource; |
72 |
|
import jalview.util.Comparison; |
73 |
|
import jalview.util.MapList; |
74 |
|
import jalview.util.MappingUtils; |
75 |
|
import jalview.util.MessageManager; |
76 |
|
import jalview.viewmodel.styles.ViewStyle; |
77 |
|
import jalview.workers.AlignCalcManager; |
78 |
|
import jalview.workers.ComplementConsensusThread; |
79 |
|
import jalview.workers.ConsensusThread; |
80 |
|
import jalview.workers.SecondaryStructureConsensusThread; |
81 |
|
import jalview.workers.StrucConsensusThread; |
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
@author |
88 |
|
|
89 |
|
|
|
|
| 74.9% |
Uncovered Elements: 327 (1,304) |
Complexity: 454 |
Complexity Density: 0.62 |
|
90 |
|
public abstract class AlignmentViewport |
91 |
|
implements AlignViewportI, CommandListener, VamsasSource |
92 |
|
{ |
93 |
|
protected ViewportRanges ranges; |
94 |
|
|
95 |
|
protected ViewStyleI viewStyle = new ViewStyle(); |
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
AlignViewportI codingComplement = null; |
102 |
|
|
103 |
|
FeaturesDisplayedI featuresDisplayed = null; |
104 |
|
|
105 |
|
protected Deque<CommandI> historyList = new ArrayDeque<>(); |
106 |
|
|
107 |
|
protected Deque<CommandI> redoList = new ArrayDeque<>(); |
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
private boolean savedUpToDate = false; |
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
protected AlignmentI alignment; |
118 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
119 |
508 |
public AlignmentViewport(AlignmentI al)... |
120 |
|
{ |
121 |
508 |
setAlignment(al); |
122 |
508 |
ranges = new ViewportRanges(al); |
123 |
|
} |
124 |
|
|
125 |
|
|
126 |
|
@param |
127 |
|
@see |
128 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
129 |
0 |
@Override... |
130 |
|
public void setFontName(String name) |
131 |
|
{ |
132 |
0 |
viewStyle.setFontName(name); |
133 |
|
} |
134 |
|
|
135 |
|
|
136 |
|
@param |
137 |
|
@see |
138 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
139 |
0 |
@Override... |
140 |
|
public void setFontStyle(int style) |
141 |
|
{ |
142 |
0 |
viewStyle.setFontStyle(style); |
143 |
|
} |
144 |
|
|
145 |
|
|
146 |
|
@param |
147 |
|
@see |
148 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
149 |
0 |
@Override... |
150 |
|
public void setFontSize(int size) |
151 |
|
{ |
152 |
0 |
viewStyle.setFontSize(size); |
153 |
|
} |
154 |
|
|
155 |
|
|
156 |
|
@return |
157 |
|
@see |
158 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
159 |
0 |
@Override... |
160 |
|
public int getFontStyle() |
161 |
|
{ |
162 |
0 |
return viewStyle.getFontStyle(); |
163 |
|
} |
164 |
|
|
165 |
|
|
166 |
|
@return |
167 |
|
@see |
168 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
169 |
0 |
@Override... |
170 |
|
public String getFontName() |
171 |
|
{ |
172 |
0 |
return viewStyle.getFontName(); |
173 |
|
} |
174 |
|
|
175 |
|
|
176 |
|
@return |
177 |
|
@see |
178 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
179 |
0 |
@Override... |
180 |
|
public int getFontSize() |
181 |
|
{ |
182 |
0 |
return viewStyle.getFontSize(); |
183 |
|
} |
184 |
|
|
185 |
|
|
186 |
|
@param |
187 |
|
@see |
188 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
189 |
0 |
@Override... |
190 |
|
public void setUpperCasebold(boolean upperCasebold) |
191 |
|
{ |
192 |
0 |
viewStyle.setUpperCasebold(upperCasebold); |
193 |
|
} |
194 |
|
|
195 |
|
|
196 |
|
@return |
197 |
|
@see |
198 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
199 |
0 |
@Override... |
200 |
|
public boolean isUpperCasebold() |
201 |
|
{ |
202 |
0 |
return viewStyle.isUpperCasebold(); |
203 |
|
} |
204 |
|
|
205 |
|
|
206 |
|
@return |
207 |
|
@see |
208 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
209 |
3051 |
@Override... |
210 |
|
public boolean isSeqNameItalics() |
211 |
|
{ |
212 |
3051 |
return viewStyle.isSeqNameItalics(); |
213 |
|
} |
214 |
|
|
215 |
|
|
216 |
|
@param |
217 |
|
@see |
218 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
219 |
10 |
@Override... |
220 |
|
public void setColourByReferenceSeq(boolean colourByReferenceSeq) |
221 |
|
{ |
222 |
10 |
viewStyle.setColourByReferenceSeq(colourByReferenceSeq); |
223 |
|
} |
224 |
|
|
225 |
|
|
226 |
|
@param |
227 |
|
@see |
228 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
229 |
693 |
@Override... |
230 |
|
public void setColourAppliesToAllGroups(boolean b) |
231 |
|
{ |
232 |
693 |
viewStyle.setColourAppliesToAllGroups(b); |
233 |
|
} |
234 |
|
|
235 |
|
|
236 |
|
@return |
237 |
|
@see |
238 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
239 |
962 |
@Override... |
240 |
|
public boolean getColourAppliesToAllGroups() |
241 |
|
{ |
242 |
962 |
return viewStyle.getColourAppliesToAllGroups(); |
243 |
|
} |
244 |
|
|
245 |
|
|
246 |
|
@return |
247 |
|
@see |
248 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
249 |
878 |
@Override... |
250 |
|
public boolean getAbovePIDThreshold() |
251 |
|
{ |
252 |
878 |
return viewStyle.getAbovePIDThreshold(); |
253 |
|
} |
254 |
|
|
255 |
|
|
256 |
|
@param |
257 |
|
@see |
258 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
259 |
85 |
@Override... |
260 |
|
public void setIncrement(int inc) |
261 |
|
{ |
262 |
85 |
viewStyle.setIncrement(inc); |
263 |
|
} |
264 |
|
|
265 |
|
|
266 |
|
@return |
267 |
|
@see |
268 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
269 |
0 |
@Override... |
270 |
|
public int getIncrement() |
271 |
|
{ |
272 |
0 |
return viewStyle.getIncrement(); |
273 |
|
} |
274 |
|
|
275 |
|
|
276 |
|
@param |
277 |
|
@see |
278 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
279 |
93 |
@Override... |
280 |
|
public void setConservationSelected(boolean b) |
281 |
|
{ |
282 |
93 |
viewStyle.setConservationSelected(b); |
283 |
|
} |
284 |
|
|
285 |
|
|
286 |
|
@param |
287 |
|
@see |
288 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
289 |
0 |
@Override... |
290 |
|
public void setShowHiddenMarkers(boolean show) |
291 |
|
{ |
292 |
0 |
viewStyle.setShowHiddenMarkers(show); |
293 |
|
} |
294 |
|
|
295 |
|
|
296 |
|
@return |
297 |
|
@see |
298 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
299 |
6509 |
@Override... |
300 |
|
public boolean getShowHiddenMarkers() |
301 |
|
{ |
302 |
6509 |
return viewStyle.getShowHiddenMarkers(); |
303 |
|
} |
304 |
|
|
305 |
|
|
306 |
|
@param |
307 |
|
@see |
308 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
309 |
9 |
@Override... |
310 |
|
public void setScaleRightWrapped(boolean b) |
311 |
|
{ |
312 |
9 |
viewStyle.setScaleRightWrapped(b); |
313 |
|
} |
314 |
|
|
315 |
|
|
316 |
|
@param |
317 |
|
@see |
318 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
319 |
11 |
@Override... |
320 |
|
public void setScaleLeftWrapped(boolean b) |
321 |
|
{ |
322 |
11 |
viewStyle.setScaleLeftWrapped(b); |
323 |
|
} |
324 |
|
|
325 |
|
|
326 |
|
@param |
327 |
|
@see |
328 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
329 |
9 |
@Override... |
330 |
|
public void setScaleAboveWrapped(boolean b) |
331 |
|
{ |
332 |
9 |
viewStyle.setScaleAboveWrapped(b); |
333 |
|
} |
334 |
|
|
335 |
|
|
336 |
|
@return |
337 |
|
@see |
338 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
339 |
1415 |
@Override... |
340 |
|
public boolean getScaleLeftWrapped() |
341 |
|
{ |
342 |
1415 |
return viewStyle.getScaleLeftWrapped(); |
343 |
|
} |
344 |
|
|
345 |
|
|
346 |
|
@return |
347 |
|
@see |
348 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
349 |
991 |
@Override... |
350 |
|
public boolean getScaleAboveWrapped() |
351 |
|
{ |
352 |
991 |
return viewStyle.getScaleAboveWrapped(); |
353 |
|
} |
354 |
|
|
355 |
|
|
356 |
|
@return |
357 |
|
@see |
358 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
359 |
2310 |
@Override... |
360 |
|
public boolean getScaleRightWrapped() |
361 |
|
{ |
362 |
2310 |
return viewStyle.getScaleRightWrapped(); |
363 |
|
} |
364 |
|
|
365 |
|
|
366 |
|
@param |
367 |
|
@see |
368 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
369 |
94 |
@Override... |
370 |
|
public void setAbovePIDThreshold(boolean b) |
371 |
|
{ |
372 |
94 |
viewStyle.setAbovePIDThreshold(b); |
373 |
|
} |
374 |
|
|
375 |
|
|
376 |
|
@param |
377 |
|
@see |
378 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
379 |
106 |
@Override... |
380 |
|
public void setThreshold(int thresh) |
381 |
|
{ |
382 |
106 |
viewStyle.setThreshold(thresh); |
383 |
|
} |
384 |
|
|
385 |
|
|
386 |
|
@return |
387 |
|
@see |
388 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
389 |
0 |
@Override... |
390 |
|
public int getThreshold() |
391 |
|
{ |
392 |
0 |
return viewStyle.getThreshold(); |
393 |
|
} |
394 |
|
|
395 |
|
|
396 |
|
@return |
397 |
|
@see |
398 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
399 |
47069 |
@Override... |
400 |
|
public boolean getShowJVSuffix() |
401 |
|
{ |
402 |
47069 |
return viewStyle.getShowJVSuffix(); |
403 |
|
} |
404 |
|
|
405 |
|
|
406 |
|
@param |
407 |
|
@see |
408 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
409 |
86 |
@Override... |
410 |
|
public void setShowJVSuffix(boolean b) |
411 |
|
{ |
412 |
86 |
viewStyle.setShowJVSuffix(b); |
413 |
|
} |
414 |
|
|
415 |
|
|
416 |
|
@param |
417 |
|
@see |
418 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
419 |
97 |
@Override... |
420 |
|
public void setWrapAlignment(boolean state) |
421 |
|
{ |
422 |
97 |
viewStyle.setWrapAlignment(state); |
423 |
97 |
ranges.setWrappedMode(state); |
424 |
|
} |
425 |
|
|
426 |
|
|
427 |
|
@param |
428 |
|
@see |
429 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
430 |
85 |
@Override... |
431 |
|
public void setShowText(boolean state) |
432 |
|
{ |
433 |
85 |
viewStyle.setShowText(state); |
434 |
|
} |
435 |
|
|
436 |
|
|
437 |
|
@param |
438 |
|
@see |
439 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
440 |
85 |
@Override... |
441 |
|
public void setRenderGaps(boolean state) |
442 |
|
{ |
443 |
85 |
viewStyle.setRenderGaps(state); |
444 |
|
} |
445 |
|
|
446 |
|
|
447 |
|
@return |
448 |
|
@see |
449 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
450 |
368964 |
@Override... |
451 |
|
public boolean getColourText() |
452 |
|
{ |
453 |
368964 |
return viewStyle.getColourText(); |
454 |
|
} |
455 |
|
|
456 |
|
|
457 |
|
@param |
458 |
|
@see |
459 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
460 |
85 |
@Override... |
461 |
|
public void setColourText(boolean state) |
462 |
|
{ |
463 |
85 |
viewStyle.setColourText(state); |
464 |
|
} |
465 |
|
|
466 |
|
|
467 |
|
@return |
468 |
|
@see |
469 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
470 |
29683 |
@Override... |
471 |
|
public boolean getWrapAlignment() |
472 |
|
{ |
473 |
29683 |
return viewStyle.getWrapAlignment(); |
474 |
|
} |
475 |
|
|
476 |
|
|
477 |
|
@return |
478 |
|
@see |
479 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
480 |
369641 |
@Override... |
481 |
|
public boolean getShowText() |
482 |
|
{ |
483 |
369641 |
return viewStyle.getShowText(); |
484 |
|
} |
485 |
|
|
486 |
|
|
487 |
|
@return |
488 |
|
@see |
489 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
490 |
2 |
@Override... |
491 |
|
public int getWrappedWidth() |
492 |
|
{ |
493 |
2 |
return viewStyle.getWrappedWidth(); |
494 |
|
} |
495 |
|
|
496 |
|
|
497 |
|
@param |
498 |
|
@see |
499 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
500 |
920 |
@Override... |
501 |
|
public void setWrappedWidth(int w) |
502 |
|
{ |
503 |
920 |
viewStyle.setWrappedWidth(w); |
504 |
|
} |
505 |
|
|
506 |
|
|
507 |
|
@return |
508 |
|
@see |
509 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
510 |
108153 |
@Override... |
511 |
|
public int getCharHeight() |
512 |
|
{ |
513 |
108153 |
return viewStyle.getCharHeight(); |
514 |
|
} |
515 |
|
|
516 |
|
|
517 |
|
@param |
518 |
|
@see |
519 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
520 |
596 |
@Override... |
521 |
|
public void setCharHeight(int h) |
522 |
|
{ |
523 |
596 |
viewStyle.setCharHeight(h); |
524 |
|
} |
525 |
|
|
526 |
|
|
527 |
|
@return |
528 |
|
@see |
529 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
530 |
1337911 |
@Override... |
531 |
|
public int getCharWidth() |
532 |
|
{ |
533 |
1337933 |
return viewStyle.getCharWidth(); |
534 |
|
} |
535 |
|
|
536 |
|
|
537 |
|
@param |
538 |
|
@see |
539 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
540 |
599 |
@Override... |
541 |
|
public void setCharWidth(int w) |
542 |
|
{ |
543 |
599 |
viewStyle.setCharWidth(w); |
544 |
|
} |
545 |
|
|
546 |
|
|
547 |
|
@return |
548 |
|
@see |
549 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
550 |
407194 |
@Override... |
551 |
|
public boolean getShowBoxes() |
552 |
|
{ |
553 |
407195 |
return viewStyle.getShowBoxes(); |
554 |
|
} |
555 |
|
|
556 |
|
|
557 |
|
@return |
558 |
|
@see |
559 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
560 |
367185 |
@Override... |
561 |
|
public boolean getShowUnconserved() |
562 |
|
{ |
563 |
367185 |
return viewStyle.getShowUnconserved(); |
564 |
|
} |
565 |
|
|
566 |
|
|
567 |
|
@param |
568 |
|
@see |
569 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
570 |
85 |
@Override... |
571 |
|
public void setShowUnconserved(boolean showunconserved) |
572 |
|
{ |
573 |
85 |
viewStyle.setShowUnconserved(showunconserved); |
574 |
|
} |
575 |
|
|
576 |
|
|
577 |
|
@param |
578 |
|
@see |
579 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
580 |
0 |
@Override... |
581 |
|
public void setSeqNameItalics(boolean default1) |
582 |
|
{ |
583 |
0 |
viewStyle.setSeqNameItalics(default1); |
584 |
|
} |
585 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
586 |
192990 |
@Override... |
587 |
|
public AlignmentI getAlignment() |
588 |
|
{ |
589 |
192990 |
return alignment; |
590 |
|
} |
591 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
592 |
0 |
@Override... |
593 |
|
public char getGapCharacter() |
594 |
|
{ |
595 |
0 |
return alignment.getGapCharacter(); |
596 |
|
} |
597 |
|
|
598 |
|
protected String sequenceSetID; |
599 |
|
|
600 |
|
|
601 |
|
|
602 |
|
|
603 |
|
|
604 |
|
protected boolean isDataset = false; |
605 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
606 |
0 |
public void setDataset(boolean b)... |
607 |
|
{ |
608 |
0 |
isDataset = b; |
609 |
|
} |
610 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
611 |
478 |
public boolean isDataset()... |
612 |
|
{ |
613 |
478 |
return isDataset; |
614 |
|
} |
615 |
|
|
616 |
|
private Map<SequenceI, SequenceCollectionI> hiddenRepSequences; |
617 |
|
|
618 |
|
protected ColumnSelection colSel = new ColumnSelection(); |
619 |
|
|
620 |
|
public boolean autoCalculateConsensus = true; |
621 |
|
|
622 |
|
protected boolean autoCalculateStrucConsensus = true; |
623 |
|
|
624 |
|
protected boolean ignoreGapsInConsensusCalculation = false; |
625 |
|
|
626 |
|
protected ResidueShaderI residueShading = new ResidueShader(); |
627 |
|
|
|
|
| 92% |
Uncovered Elements: 2 (25) |
Complexity: 7 |
Complexity Density: 0.54 |
|
628 |
274 |
@Override... |
629 |
|
public void setGlobalColourScheme(ColourSchemeI cs) |
630 |
|
{ |
631 |
|
|
632 |
|
|
633 |
|
|
634 |
|
|
635 |
|
|
636 |
|
|
637 |
|
|
638 |
|
|
639 |
|
|
640 |
|
|
641 |
|
|
642 |
|
|
643 |
|
|
644 |
274 |
if (residueShading == null) |
645 |
|
{ |
646 |
0 |
residueShading = new ResidueShader(viewStyle); |
647 |
|
} |
648 |
274 |
residueShading.setColourScheme(cs); |
649 |
|
|
650 |
|
|
651 |
|
|
652 |
|
|
653 |
274 |
if (cs != null) |
654 |
|
{ |
655 |
81 |
if (getConservationSelected()) |
656 |
|
{ |
657 |
15 |
residueShading.setConservation(hconservation); |
658 |
|
} |
659 |
|
|
660 |
|
|
661 |
|
|
662 |
|
|
663 |
81 |
residueShading.setConservationApplied(getConservationSelected()); |
664 |
81 |
residueShading.alignmentChanged(alignment, hiddenRepSequences); |
665 |
|
} |
666 |
|
|
667 |
|
|
668 |
|
|
669 |
|
|
670 |
|
|
671 |
274 |
if (getColourAppliesToAllGroups()) |
672 |
|
{ |
673 |
86 |
for (SequenceGroup sg : getAlignment().getGroups()) |
674 |
|
{ |
675 |
|
|
676 |
|
|
677 |
|
|
678 |
|
|
679 |
9 |
sg.setColourScheme(cs == null ? null : cs.getInstance(this, sg)); |
680 |
9 |
if (cs != null) |
681 |
|
{ |
682 |
8 |
sg.getGroupColourScheme().alignmentChanged(sg, |
683 |
|
hiddenRepSequences); |
684 |
|
} |
685 |
|
} |
686 |
|
} |
687 |
|
} |
688 |
|
|
|
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
689 |
1399 |
@Override... |
690 |
|
public ColourSchemeI getGlobalColourScheme() |
691 |
|
{ |
692 |
1399 |
return residueShading == null ? null : residueShading.getColourScheme(); |
693 |
|
} |
694 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
695 |
411371 |
@Override... |
696 |
|
public ResidueShaderI getResidueShading() |
697 |
|
{ |
698 |
411372 |
return residueShading; |
699 |
|
} |
700 |
|
|
701 |
|
protected AlignmentAnnotation consensus; |
702 |
|
|
703 |
|
protected AlignmentAnnotation secondaryStructureConsensus; |
704 |
|
|
705 |
|
protected AlignmentAnnotation complementConsensus; |
706 |
|
|
707 |
|
protected AlignmentAnnotation gapcounts; |
708 |
|
|
709 |
|
protected AlignmentAnnotation strucConsensus; |
710 |
|
|
711 |
|
protected AlignmentAnnotation conservation; |
712 |
|
|
713 |
|
protected AlignmentAnnotation quality; |
714 |
|
|
715 |
|
protected AlignmentAnnotation[] groupConsensus; |
716 |
|
|
717 |
|
protected AlignmentAnnotation[] groupSSConsensus; |
718 |
|
|
719 |
|
protected AlignmentAnnotation[] groupConservation; |
720 |
|
|
721 |
|
|
722 |
|
|
723 |
|
|
724 |
|
protected ProfilesI hconsensus = null; |
725 |
|
|
726 |
|
protected ProfilesI hSSConsensus = null; |
727 |
|
|
728 |
|
|
729 |
|
|
730 |
|
|
731 |
|
protected Hashtable<String, Object>[] hcomplementConsensus = null; |
732 |
|
|
733 |
|
|
734 |
|
|
735 |
|
|
736 |
|
|
737 |
|
protected Hashtable<String, Object>[] hStrucConsensus = null; |
738 |
|
|
739 |
|
protected Conservation hconservation = null; |
740 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
741 |
1001 |
@Override... |
742 |
|
public void setConservation(Conservation cons) |
743 |
|
{ |
744 |
1001 |
hconservation = cons; |
745 |
|
} |
746 |
|
|
747 |
|
|
748 |
|
|
749 |
|
|
750 |
|
|
751 |
|
int ConsPercGaps = 25; |
752 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
753 |
1849 |
@Override... |
754 |
|
public int getConsPercGaps() |
755 |
|
{ |
756 |
1849 |
return ConsPercGaps; |
757 |
|
} |
758 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
759 |
958 |
@Override... |
760 |
|
public void setSequenceConsensusHash(ProfilesI hconsensus) |
761 |
|
{ |
762 |
958 |
this.hconsensus = hconsensus; |
763 |
|
} |
764 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
765 |
970 |
@Override... |
766 |
|
public void setSequenceSSConsensusHash(ProfilesI hSSConsensus) |
767 |
|
{ |
768 |
970 |
this.hSSConsensus = hSSConsensus; |
769 |
|
} |
770 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
771 |
4 |
@Override... |
772 |
|
public void setComplementConsensusHash( |
773 |
|
Hashtable<String, Object>[] hconsensus) |
774 |
|
{ |
775 |
4 |
this.hcomplementConsensus = hconsensus; |
776 |
|
} |
777 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
778 |
3382 |
@Override... |
779 |
|
public ProfilesI getSequenceConsensusHash() |
780 |
|
{ |
781 |
3382 |
return hconsensus; |
782 |
|
} |
783 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
784 |
3378 |
@Override... |
785 |
|
public ProfilesI getSequenceSSConsensusHash() |
786 |
|
{ |
787 |
3378 |
return hSSConsensus; |
788 |
|
} |
789 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
790 |
2327 |
@Override... |
791 |
|
public Hashtable<String, Object>[] getComplementConsensusHash() |
792 |
|
{ |
793 |
2327 |
return hcomplementConsensus; |
794 |
|
} |
795 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
796 |
2328 |
@Override... |
797 |
|
public Hashtable<String, Object>[] getRnaStructureConsensusHash() |
798 |
|
{ |
799 |
2328 |
return hStrucConsensus; |
800 |
|
} |
801 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
802 |
5 |
@Override... |
803 |
|
public void setRnaStructureConsensusHash( |
804 |
|
Hashtable<String, Object>[] hStrucConsensus) |
805 |
|
{ |
806 |
5 |
this.hStrucConsensus = hStrucConsensus; |
807 |
|
|
808 |
|
} |
809 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
810 |
1448 |
@Override... |
811 |
|
public AlignmentAnnotation getAlignmentQualityAnnot() |
812 |
|
{ |
813 |
1448 |
return quality; |
814 |
|
} |
815 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
816 |
2277 |
@Override... |
817 |
|
public AlignmentAnnotation getAlignmentConservationAnnotation() |
818 |
|
{ |
819 |
2277 |
return conservation; |
820 |
|
} |
821 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
822 |
5629 |
@Override... |
823 |
|
public AlignmentAnnotation getAlignmentConsensusAnnotation() |
824 |
|
{ |
825 |
5629 |
return consensus; |
826 |
|
} |
827 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
828 |
5293 |
@Override... |
829 |
|
public AlignmentAnnotation getAlignmentSecondaryStructureConsensusAnnotation() |
830 |
|
{ |
831 |
5293 |
return secondaryStructureConsensus; |
832 |
|
} |
833 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
834 |
5925 |
@Override... |
835 |
|
public AlignmentAnnotation getAlignmentGapAnnotation() |
836 |
|
{ |
837 |
5925 |
return gapcounts; |
838 |
|
} |
839 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
840 |
2335 |
@Override... |
841 |
|
public AlignmentAnnotation getComplementConsensusAnnotation() |
842 |
|
{ |
843 |
2335 |
return complementConsensus; |
844 |
|
} |
845 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
846 |
2328 |
@Override... |
847 |
|
public AlignmentAnnotation getAlignmentStrucConsensusAnnotation() |
848 |
|
{ |
849 |
2328 |
return strucConsensus; |
850 |
|
} |
851 |
|
|
852 |
|
protected AlignCalcManagerI calculator = new AlignCalcManager(); |
853 |
|
|
854 |
|
|
855 |
|
|
856 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 6 |
Complexity Density: 1.5 |
|
857 |
999 |
public void updateConservation(final AlignmentViewPanel ap)... |
858 |
|
{ |
859 |
|
|
860 |
999 |
if (alignment.isNucleotide() |
861 |
|
|| (conservation == null && quality == null) |
862 |
|
|| !autoCalculateConsensus) |
863 |
|
{ |
864 |
217 |
return; |
865 |
|
} |
866 |
782 |
if (calculator.getRegisteredWorkersOfClass( |
867 |
|
jalview.workers.ConservationThread.class) == null) |
868 |
|
{ |
869 |
446 |
calculator.registerWorker( |
870 |
|
new jalview.workers.ConservationThread(this, ap)); |
871 |
|
} |
872 |
|
} |
873 |
|
|
874 |
|
|
875 |
|
|
876 |
|
|
|
|
| 81.5% |
Uncovered Elements: 5 (27) |
Complexity: 11 |
Complexity Density: 0.73 |
|
877 |
1009 |
public void updateConsensus(final AlignmentViewPanel ap)... |
878 |
|
{ |
879 |
|
|
880 |
1009 |
if (consensus == null || !autoCalculateConsensus) |
881 |
|
{ |
882 |
0 |
return; |
883 |
|
} |
884 |
1009 |
if (calculator |
885 |
|
.getRegisteredWorkersOfClass(ConsensusThread.class) == null) |
886 |
|
{ |
887 |
457 |
calculator.registerWorker(new ConsensusThread(this, ap)); |
888 |
|
} |
889 |
|
|
890 |
|
|
891 |
|
|
892 |
|
|
893 |
|
|
894 |
1009 |
final AlignmentI al = this.getAlignment(); |
895 |
1009 |
if (!al.isNucleotide() && al.getCodonFrames() != null |
896 |
|
&& !al.getCodonFrames().isEmpty()) |
897 |
|
{ |
898 |
|
|
899 |
|
|
900 |
|
|
901 |
|
|
902 |
4 |
boolean doConsensus = false; |
903 |
4 |
for (AlignedCodonFrame mapping : al.getCodonFrames()) |
904 |
|
{ |
905 |
|
|
906 |
4 |
MapList[] mapLists = mapping.getdnaToProt(); |
907 |
|
|
908 |
4 |
if (mapLists.length > 0 && mapLists[0].getFromRatio() == 3) |
909 |
|
{ |
910 |
4 |
doConsensus = true; |
911 |
4 |
break; |
912 |
|
} |
913 |
|
} |
914 |
4 |
if (doConsensus) |
915 |
|
{ |
916 |
4 |
if (calculator.getRegisteredWorkersOfClass( |
917 |
|
ComplementConsensusThread.class) == null) |
918 |
|
{ |
919 |
4 |
calculator |
920 |
|
.registerWorker(new ComplementConsensusThread(this, ap)); |
921 |
|
} |
922 |
|
} |
923 |
|
} |
924 |
|
} |
925 |
|
|
926 |
|
|
927 |
|
|
928 |
|
|
|
|
| 75% |
Uncovered Elements: 2 (8) |
Complexity: 4 |
Complexity Density: 1 |
|
929 |
1009 |
public void updateSecondaryStructureConsensus(final AlignmentViewPanel ap)... |
930 |
|
{ |
931 |
|
|
932 |
1009 |
if (secondaryStructureConsensus == null || !autoCalculateConsensus) |
933 |
|
{ |
934 |
0 |
return; |
935 |
|
} |
936 |
1009 |
if (calculator.getRegisteredWorkersOfClass( |
937 |
|
SecondaryStructureConsensusThread.class) == null) |
938 |
|
{ |
939 |
459 |
calculator.registerWorker( |
940 |
|
new SecondaryStructureConsensusThread(this, ap)); |
941 |
|
} |
942 |
|
} |
943 |
|
|
944 |
|
|
|
|
| 75% |
Uncovered Elements: 3 (12) |
Complexity: 8 |
Complexity Density: 1.33 |
|
945 |
1006 |
public void updateStrucConsensus(final AlignmentViewPanel ap)... |
946 |
|
{ |
947 |
1006 |
if (autoCalculateStrucConsensus && strucConsensus == null |
948 |
|
&& alignment.isNucleotide() && alignment.hasRNAStructure()) |
949 |
|
{ |
950 |
|
|
951 |
0 |
initRNAStructure(); |
952 |
|
} |
953 |
|
|
954 |
|
|
955 |
1006 |
if (strucConsensus == null || !autoCalculateStrucConsensus) |
956 |
|
{ |
957 |
1003 |
return; |
958 |
|
} |
959 |
3 |
if (calculator.getRegisteredWorkersOfClass( |
960 |
|
StrucConsensusThread.class) == null) |
961 |
|
{ |
962 |
3 |
calculator.registerWorker(new StrucConsensusThread(this, ap)); |
963 |
|
} |
964 |
|
} |
965 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
966 |
2646 |
public boolean isCalcInProgress()... |
967 |
|
{ |
968 |
2646 |
return calculator.isWorking(); |
969 |
|
} |
970 |
|
|
|
|
| 77.8% |
Uncovered Elements: 2 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
971 |
9351 |
@Override... |
972 |
|
public boolean isCalculationInProgress( |
973 |
|
AlignmentAnnotation alignmentAnnotation) |
974 |
|
{ |
975 |
9351 |
if (!alignmentAnnotation.autoCalculated) |
976 |
|
{ |
977 |
0 |
return false; |
978 |
|
} |
979 |
9351 |
if (calculator.workingInvolvedWith(alignmentAnnotation)) |
980 |
|
{ |
981 |
|
|
982 |
|
|
983 |
325 |
return true; |
984 |
|
} |
985 |
9026 |
return false; |
986 |
|
} |
987 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
988 |
761 |
public void setAlignment(AlignmentI align)... |
989 |
|
{ |
990 |
761 |
this.alignment = align; |
991 |
|
} |
992 |
|
|
993 |
|
|
994 |
|
|
995 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (20) |
Complexity: 1 |
Complexity Density: 0.05 |
|
996 |
253 |
@Override... |
997 |
|
public void dispose() |
998 |
|
{ |
999 |
|
|
1000 |
|
|
1001 |
|
|
1002 |
|
|
1003 |
253 |
consensus = null; |
1004 |
253 |
complementConsensus = null; |
1005 |
253 |
strucConsensus = null; |
1006 |
253 |
secondaryStructureConsensus = null; |
1007 |
253 |
conservation = null; |
1008 |
253 |
quality = null; |
1009 |
253 |
groupConsensus = null; |
1010 |
253 |
groupConservation = null; |
1011 |
253 |
hconsensus = null; |
1012 |
253 |
hconservation = null; |
1013 |
253 |
hcomplementConsensus = null; |
1014 |
253 |
gapcounts = null; |
1015 |
253 |
calculator = null; |
1016 |
253 |
residueShading = null; |
1017 |
253 |
changeSupport = null; |
1018 |
253 |
ranges = null; |
1019 |
253 |
currentTree = null; |
1020 |
253 |
selectionGroup = null; |
1021 |
253 |
colSel = null; |
1022 |
253 |
setAlignment(null); |
1023 |
|
} |
1024 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1025 |
3955 |
@Override... |
1026 |
|
public boolean isClosed() |
1027 |
|
{ |
1028 |
|
|
1029 |
|
|
1030 |
3955 |
return alignment == null; |
1031 |
|
} |
1032 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1033 |
3363 |
@Override... |
1034 |
|
public AlignCalcManagerI getCalcManager() |
1035 |
|
{ |
1036 |
3363 |
return calculator; |
1037 |
|
} |
1038 |
|
|
1039 |
|
|
1040 |
|
|
1041 |
|
|
1042 |
|
protected boolean showGroupConservation = false; |
1043 |
|
|
1044 |
|
|
1045 |
|
|
1046 |
|
|
1047 |
|
protected boolean showGroupConsensus = false; |
1048 |
|
|
1049 |
|
|
1050 |
|
|
1051 |
|
|
1052 |
|
protected boolean showSequenceLogo = false; |
1053 |
|
|
1054 |
|
protected boolean showSequenceSSLogo = false; |
1055 |
|
|
1056 |
|
|
1057 |
|
|
1058 |
|
|
1059 |
|
protected boolean normaliseSequenceLogo = false; |
1060 |
|
|
1061 |
|
|
1062 |
|
|
1063 |
|
|
1064 |
|
protected boolean showConsensusHistogram = true; |
1065 |
|
|
1066 |
|
protected boolean showSSConsensusHistogram = true; |
1067 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1068 |
0 |
public void setShowSSConsensusHistogram(boolean showSSConsensusHistogram)... |
1069 |
|
{ |
1070 |
0 |
this.showSSConsensusHistogram = showSSConsensusHistogram; |
1071 |
|
} |
1072 |
|
|
1073 |
|
|
1074 |
|
@return |
1075 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1076 |
5120 |
@Override... |
1077 |
|
public boolean isShowSequenceLogo() |
1078 |
|
{ |
1079 |
5120 |
return showSequenceLogo; |
1080 |
|
} |
1081 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1082 |
130 |
@Override... |
1083 |
|
public boolean isShowSequenceSSLogo() |
1084 |
|
{ |
1085 |
130 |
return showSequenceSSLogo; |
1086 |
|
} |
1087 |
|
|
1088 |
|
|
1089 |
|
@param |
1090 |
|
|
1091 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
1092 |
85 |
public void setShowSequenceLogo(boolean showSequenceLogo)... |
1093 |
|
{ |
1094 |
85 |
if (showSequenceLogo != this.showSequenceLogo) |
1095 |
|
{ |
1096 |
|
|
1097 |
|
|
1098 |
16 |
this.showSequenceLogo = showSequenceLogo; |
1099 |
16 |
calculator.updateAnnotationFor(ConsensusThread.class); |
1100 |
16 |
calculator.updateAnnotationFor(ComplementConsensusThread.class); |
1101 |
16 |
calculator.updateAnnotationFor(StrucConsensusThread.class); |
1102 |
|
} |
1103 |
85 |
this.showSequenceLogo = showSequenceLogo; |
1104 |
|
} |
1105 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
1106 |
0 |
public void setShowSequenceSSLogo(boolean showSequenceSSLogo)... |
1107 |
|
{ |
1108 |
0 |
if (showSequenceSSLogo != this.showSequenceSSLogo) |
1109 |
|
{ |
1110 |
|
|
1111 |
|
|
1112 |
0 |
this.showSequenceSSLogo = showSequenceSSLogo; |
1113 |
0 |
calculator |
1114 |
|
.updateAnnotationFor(SecondaryStructureConsensusThread.class); |
1115 |
|
} |
1116 |
0 |
this.showSequenceSSLogo = showSequenceSSLogo; |
1117 |
|
} |
1118 |
|
|
1119 |
|
|
1120 |
|
@param |
1121 |
|
|
1122 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1123 |
85 |
public void setShowConsensusHistogram(boolean showConsensusHistogram)... |
1124 |
|
{ |
1125 |
85 |
this.showConsensusHistogram = showConsensusHistogram; |
1126 |
|
} |
1127 |
|
|
1128 |
|
|
1129 |
|
@return |
1130 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1131 |
848 |
public boolean isShowGroupConservation()... |
1132 |
|
{ |
1133 |
848 |
return showGroupConservation; |
1134 |
|
} |
1135 |
|
|
1136 |
|
|
1137 |
|
@param |
1138 |
|
|
1139 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1140 |
85 |
public void setShowGroupConservation(boolean showGroupConservation)... |
1141 |
|
{ |
1142 |
85 |
this.showGroupConservation = showGroupConservation; |
1143 |
|
} |
1144 |
|
|
1145 |
|
|
1146 |
|
@return |
1147 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1148 |
848 |
public boolean isShowGroupConsensus()... |
1149 |
|
{ |
1150 |
848 |
return showGroupConsensus; |
1151 |
|
} |
1152 |
|
|
1153 |
|
|
1154 |
|
@param |
1155 |
|
|
1156 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1157 |
85 |
public void setShowGroupConsensus(boolean showGroupConsensus)... |
1158 |
|
{ |
1159 |
85 |
this.showGroupConsensus = showGroupConsensus; |
1160 |
|
} |
1161 |
|
|
1162 |
|
|
1163 |
|
|
1164 |
|
@return |
1165 |
|
|
1166 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1167 |
3171 |
@Override... |
1168 |
|
public boolean isShowConsensusHistogram() |
1169 |
|
{ |
1170 |
3171 |
return this.showConsensusHistogram; |
1171 |
|
} |
1172 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1173 |
130 |
@Override... |
1174 |
|
public boolean isShowSSConsensusHistogram() |
1175 |
|
{ |
1176 |
130 |
return this.showSSConsensusHistogram; |
1177 |
|
} |
1178 |
|
|
1179 |
|
|
1180 |
|
|
1181 |
|
|
1182 |
|
private boolean padGaps = false; |
1183 |
|
|
1184 |
|
|
1185 |
|
|
1186 |
|
|
1187 |
|
public boolean sortByTree = false; |
1188 |
|
|
1189 |
|
|
1190 |
|
|
1191 |
|
|
1192 |
|
@return |
1193 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1194 |
23849 |
@Override... |
1195 |
|
public SequenceGroup getSelectionGroup() |
1196 |
|
{ |
1197 |
23849 |
return selectionGroup; |
1198 |
|
} |
1199 |
|
|
1200 |
|
|
1201 |
|
|
1202 |
|
|
1203 |
|
|
1204 |
|
@param |
1205 |
|
|
1206 |
|
|
1207 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
1208 |
140 |
@Override... |
1209 |
|
public void setSelectionGroup(SequenceGroup sg) |
1210 |
|
{ |
1211 |
140 |
selectionGroup = sg; |
1212 |
140 |
if (sg != null && sg.getContext() == null) |
1213 |
|
{ |
1214 |
36 |
sg.setContext(alignment); |
1215 |
|
} |
1216 |
|
} |
1217 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1218 |
1 |
public void setHiddenColumns(HiddenColumns hidden)... |
1219 |
|
{ |
1220 |
1 |
this.alignment.setHiddenColumns(hidden); |
1221 |
|
} |
1222 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1223 |
4592 |
@Override... |
1224 |
|
public ColumnSelection getColumnSelection() |
1225 |
|
{ |
1226 |
4592 |
return colSel; |
1227 |
|
} |
1228 |
|
|
|
|
| 83.3% |
Uncovered Elements: 1 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
1229 |
13 |
@Override... |
1230 |
|
public void setColumnSelection(ColumnSelection colSel) |
1231 |
|
{ |
1232 |
13 |
this.colSel = colSel; |
1233 |
13 |
if (colSel != null) |
1234 |
|
{ |
1235 |
13 |
updateHiddenColumns(); |
1236 |
|
} |
1237 |
13 |
isColSelChanged(true); |
1238 |
|
} |
1239 |
|
|
1240 |
|
|
1241 |
|
|
1242 |
|
@return |
1243 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1244 |
32 |
@Override... |
1245 |
|
public Map<SequenceI, SequenceCollectionI> getHiddenRepSequences() |
1246 |
|
{ |
1247 |
32 |
return hiddenRepSequences; |
1248 |
|
} |
1249 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1250 |
0 |
@Override... |
1251 |
|
public void setHiddenRepSequences( |
1252 |
|
Map<SequenceI, SequenceCollectionI> hiddenRepSequences) |
1253 |
|
{ |
1254 |
0 |
this.hiddenRepSequences = hiddenRepSequences; |
1255 |
|
} |
1256 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1257 |
0 |
@Override... |
1258 |
|
public boolean hasSelectedColumns() |
1259 |
|
{ |
1260 |
0 |
ColumnSelection columnSelection = getColumnSelection(); |
1261 |
0 |
return columnSelection != null && columnSelection.hasSelectedColumns(); |
1262 |
|
} |
1263 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1264 |
8365 |
@Override... |
1265 |
|
public boolean hasHiddenColumns() |
1266 |
|
{ |
1267 |
8365 |
return alignment.getHiddenColumns() != null |
1268 |
|
&& alignment.getHiddenColumns().hasHiddenColumns(); |
1269 |
|
} |
1270 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1271 |
14 |
public void updateHiddenColumns()... |
1272 |
|
{ |
1273 |
|
|
1274 |
|
|
1275 |
|
|
1276 |
|
} |
1277 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1278 |
4796 |
@Override... |
1279 |
|
public boolean hasHiddenRows() |
1280 |
|
{ |
1281 |
4796 |
return alignment.getHiddenSequences().getSize() > 0; |
1282 |
|
} |
1283 |
|
|
1284 |
|
protected SequenceGroup selectionGroup; |
1285 |
|
|
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
1286 |
85 |
public void setSequenceSetId(String newid)... |
1287 |
|
{ |
1288 |
85 |
if (sequenceSetID != null) |
1289 |
|
{ |
1290 |
85 |
jalview.bin.Console.errPrintln( |
1291 |
|
"Warning - overwriting a sequenceSetId for a viewport!"); |
1292 |
|
} |
1293 |
85 |
sequenceSetID = new String(newid); |
1294 |
|
} |
1295 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
1296 |
5629 |
@Override... |
1297 |
|
public String getSequenceSetId() |
1298 |
|
{ |
1299 |
5629 |
if (sequenceSetID == null) |
1300 |
|
{ |
1301 |
364 |
sequenceSetID = alignment.hashCode() + ""; |
1302 |
|
} |
1303 |
|
|
1304 |
5629 |
return sequenceSetID; |
1305 |
|
} |
1306 |
|
|
1307 |
|
|
1308 |
|
|
1309 |
|
|
1310 |
|
|
1311 |
|
protected String viewId = null; |
1312 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
1313 |
598 |
@Override... |
1314 |
|
public String getViewId() |
1315 |
|
{ |
1316 |
598 |
if (viewId == null) |
1317 |
|
{ |
1318 |
300 |
viewId = this.getSequenceSetId() + "." + this.hashCode() + ""; |
1319 |
|
} |
1320 |
598 |
return viewId; |
1321 |
|
} |
1322 |
|
|
|
|
| 90% |
Uncovered Elements: 1 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
1323 |
88 |
public void setIgnoreGapsConsensus(boolean b, AlignmentViewPanel ap)... |
1324 |
|
{ |
1325 |
88 |
ignoreGapsInConsensusCalculation = b; |
1326 |
88 |
if (ap != null) |
1327 |
|
{ |
1328 |
3 |
updateConsensus(ap); |
1329 |
3 |
updateSecondaryStructureConsensus(ap); |
1330 |
3 |
if (residueShading != null) |
1331 |
|
{ |
1332 |
3 |
residueShading.setThreshold(residueShading.getThreshold(), |
1333 |
|
ignoreGapsInConsensusCalculation); |
1334 |
|
} |
1335 |
|
} |
1336 |
|
|
1337 |
|
} |
1338 |
|
|
1339 |
|
private long sgrouphash = -1, colselhash = -1; |
1340 |
|
|
1341 |
|
|
1342 |
|
|
1343 |
|
|
1344 |
|
|
1345 |
|
@param |
1346 |
|
|
1347 |
|
|
1348 |
|
@return |
1349 |
|
|
|
|
| 91.7% |
Uncovered Elements: 1 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
1350 |
161 |
public boolean isSelectionGroupChanged(boolean b)... |
1351 |
|
{ |
1352 |
161 |
int hc = (selectionGroup == null || selectionGroup.getSize() == 0) ? -1 |
1353 |
|
: selectionGroup.hashCode(); |
1354 |
161 |
if (hc != -1 && hc != sgrouphash) |
1355 |
|
{ |
1356 |
9 |
if (b) |
1357 |
|
{ |
1358 |
9 |
sgrouphash = hc; |
1359 |
|
} |
1360 |
9 |
return true; |
1361 |
|
} |
1362 |
152 |
return false; |
1363 |
|
} |
1364 |
|
|
1365 |
|
|
1366 |
|
|
1367 |
|
|
1368 |
|
|
1369 |
|
@param |
1370 |
|
|
1371 |
|
@return |
1372 |
|
|
|
|
| 91.7% |
Uncovered Elements: 1 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
1373 |
173 |
public boolean isColSelChanged(boolean b)... |
1374 |
|
{ |
1375 |
173 |
int hc = (colSel == null || colSel.isEmpty()) ? -1 : colSel.hashCode(); |
1376 |
173 |
if (hc != -1 && hc != colselhash) |
1377 |
|
{ |
1378 |
17 |
if (b) |
1379 |
|
{ |
1380 |
17 |
colselhash = hc; |
1381 |
|
} |
1382 |
17 |
return true; |
1383 |
|
} |
1384 |
156 |
return false; |
1385 |
|
} |
1386 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1387 |
4342 |
@Override... |
1388 |
|
public boolean isIgnoreGapsConsensus() |
1389 |
|
{ |
1390 |
4342 |
return ignoreGapsInConsensusCalculation; |
1391 |
|
} |
1392 |
|
|
1393 |
|
|
1394 |
|
|
1395 |
|
private PropertyChangeSupport changeSupport = new PropertyChangeSupport( |
1396 |
|
this); |
1397 |
|
|
1398 |
|
protected boolean showConservation = true; |
1399 |
|
|
1400 |
|
protected boolean showQuality = true; |
1401 |
|
|
1402 |
|
protected boolean showConsensus = true; |
1403 |
|
|
1404 |
|
protected boolean showSSConsensus = false; |
1405 |
|
|
1406 |
|
protected boolean showOccupancy = true; |
1407 |
|
|
1408 |
|
private Map<SequenceI, Color> sequenceColours = new HashMap<>(); |
1409 |
|
|
1410 |
|
protected SequenceAnnotationOrder sortAnnotationsBy = null; |
1411 |
|
|
1412 |
|
protected boolean showAutocalculatedAbove; |
1413 |
|
|
1414 |
|
|
1415 |
|
|
1416 |
|
|
1417 |
|
private boolean followHighlight = true; |
1418 |
|
|
1419 |
|
|
1420 |
|
|
1421 |
|
|
1422 |
|
@param |
1423 |
|
|
1424 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1425 |
492 |
public void addPropertyChangeListener(... |
1426 |
|
java.beans.PropertyChangeListener listener) |
1427 |
|
{ |
1428 |
492 |
changeSupport.addPropertyChangeListener(listener); |
1429 |
|
} |
1430 |
|
|
1431 |
|
|
1432 |
|
|
1433 |
|
|
1434 |
|
@param |
1435 |
|
|
1436 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
1437 |
265 |
public void removePropertyChangeListener(... |
1438 |
|
java.beans.PropertyChangeListener listener) |
1439 |
|
{ |
1440 |
265 |
if (changeSupport != null) |
1441 |
|
{ |
1442 |
264 |
changeSupport.removePropertyChangeListener(listener); |
1443 |
|
} |
1444 |
|
} |
1445 |
|
|
1446 |
|
|
1447 |
|
|
1448 |
|
|
1449 |
|
@param |
1450 |
|
|
1451 |
|
@param |
1452 |
|
|
1453 |
|
@param |
1454 |
|
|
1455 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1456 |
78 |
public void firePropertyChange(String prop, Object oldvalue,... |
1457 |
|
Object newvalue) |
1458 |
|
{ |
1459 |
78 |
changeSupport.firePropertyChange(prop, oldvalue, newvalue); |
1460 |
|
} |
1461 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1462 |
0 |
@Override... |
1463 |
|
public void notifyAlignmentChanged() |
1464 |
|
{ |
1465 |
0 |
firePropertyChange("alignment", null, alignment); |
1466 |
|
} |
1467 |
|
|
1468 |
|
|
1469 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
1470 |
6 |
public void hideSelectedColumns()... |
1471 |
|
{ |
1472 |
6 |
if (colSel.isEmpty()) |
1473 |
|
{ |
1474 |
2 |
return; |
1475 |
|
} |
1476 |
|
|
1477 |
4 |
colSel.hideSelectedColumns(alignment); |
1478 |
4 |
setSelectionGroup(null); |
1479 |
4 |
isColSelChanged(true); |
1480 |
|
} |
1481 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
1482 |
71 |
public void hideColumns(int start, int end)... |
1483 |
|
{ |
1484 |
71 |
if (start == end) |
1485 |
|
{ |
1486 |
2 |
colSel.hideSelectedColumns(start, alignment.getHiddenColumns()); |
1487 |
|
} |
1488 |
|
else |
1489 |
|
{ |
1490 |
69 |
alignment.getHiddenColumns().hideColumns(start, end); |
1491 |
|
} |
1492 |
71 |
isColSelChanged(true); |
1493 |
|
} |
1494 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1495 |
1 |
public void showColumn(int col)... |
1496 |
|
{ |
1497 |
1 |
alignment.getHiddenColumns().revealHiddenColumns(col, colSel); |
1498 |
1 |
isColSelChanged(true); |
1499 |
|
} |
1500 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1501 |
5 |
public void showAllHiddenColumns()... |
1502 |
|
{ |
1503 |
5 |
alignment.getHiddenColumns().revealAllHiddenColumns(colSel); |
1504 |
5 |
isColSelChanged(true); |
1505 |
|
} |
1506 |
|
|
1507 |
|
|
|
|
| 77.8% |
Uncovered Elements: 4 (18) |
Complexity: 3 |
Complexity Density: 0.21 |
|
1508 |
1 |
public void showAllHiddenSeqs()... |
1509 |
|
{ |
1510 |
1 |
int startSeq = ranges.getStartSeq(); |
1511 |
1 |
int endSeq = ranges.getEndSeq(); |
1512 |
|
|
1513 |
1 |
if (alignment.getHiddenSequences().getSize() > 0) |
1514 |
|
{ |
1515 |
1 |
if (selectionGroup == null) |
1516 |
|
{ |
1517 |
0 |
selectionGroup = new SequenceGroup(); |
1518 |
0 |
selectionGroup.setEndRes(alignment.getWidth() - 1); |
1519 |
|
} |
1520 |
1 |
List<SequenceI> tmp = alignment.getHiddenSequences() |
1521 |
|
.showAll(hiddenRepSequences); |
1522 |
1 |
for (SequenceI seq : tmp) |
1523 |
|
{ |
1524 |
2 |
selectionGroup.addSequence(seq, false); |
1525 |
2 |
setSequenceAnnotationsVisible(seq, true); |
1526 |
|
} |
1527 |
|
|
1528 |
1 |
hiddenRepSequences = null; |
1529 |
|
|
1530 |
1 |
ranges.setStartEndSeq(startSeq, endSeq + tmp.size()); |
1531 |
|
|
1532 |
1 |
firePropertyChange("alignment", null, alignment.getSequences()); |
1533 |
|
|
1534 |
|
|
1535 |
1 |
sendSelection(); |
1536 |
|
} |
1537 |
|
} |
1538 |
|
|
|
|
| 88.2% |
Uncovered Elements: 2 (17) |
Complexity: 3 |
Complexity Density: 0.23 |
|
1539 |
2 |
public void showSequence(int index)... |
1540 |
|
{ |
1541 |
2 |
int startSeq = ranges.getStartSeq(); |
1542 |
2 |
int endSeq = ranges.getEndSeq(); |
1543 |
|
|
1544 |
2 |
List<SequenceI> tmp = alignment.getHiddenSequences().showSequence(index, |
1545 |
|
hiddenRepSequences); |
1546 |
2 |
if (tmp.size() > 0) |
1547 |
|
{ |
1548 |
2 |
if (selectionGroup == null) |
1549 |
|
{ |
1550 |
2 |
selectionGroup = new SequenceGroup(); |
1551 |
2 |
selectionGroup.setEndRes(alignment.getWidth() - 1); |
1552 |
|
} |
1553 |
|
|
1554 |
2 |
for (SequenceI seq : tmp) |
1555 |
|
{ |
1556 |
3 |
selectionGroup.addSequence(seq, false); |
1557 |
3 |
setSequenceAnnotationsVisible(seq, true); |
1558 |
|
} |
1559 |
|
|
1560 |
2 |
ranges.setStartEndSeq(startSeq, endSeq + tmp.size()); |
1561 |
|
|
1562 |
2 |
firePropertyChange("alignment", null, alignment.getSequences()); |
1563 |
2 |
sendSelection(); |
1564 |
|
} |
1565 |
|
} |
1566 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 3 |
Complexity Density: 0.6 |
|
1567 |
0 |
public void hideAllSelectedSeqs()... |
1568 |
|
{ |
1569 |
0 |
if (selectionGroup == null || selectionGroup.getSize() < 1) |
1570 |
|
{ |
1571 |
0 |
return; |
1572 |
|
} |
1573 |
|
|
1574 |
0 |
SequenceI[] seqs = selectionGroup.getSequencesInOrder(alignment); |
1575 |
|
|
1576 |
0 |
hideSequence(seqs); |
1577 |
|
|
1578 |
0 |
setSelectionGroup(null); |
1579 |
|
} |
1580 |
|
|
|
|
| 90.9% |
Uncovered Elements: 1 (11) |
Complexity: 3 |
Complexity Density: 0.43 |
|
1581 |
54 |
public void hideSequence(SequenceI[] seq)... |
1582 |
|
{ |
1583 |
|
|
1584 |
|
|
1585 |
|
|
1586 |
54 |
int startSeq = ranges.getStartSeq(); |
1587 |
|
|
1588 |
54 |
if (seq != null) |
1589 |
|
{ |
1590 |
252 |
for (int i = 0; i < seq.length; i++) |
1591 |
|
{ |
1592 |
198 |
alignment.getHiddenSequences().hideSequence(seq[i]); |
1593 |
198 |
setSequenceAnnotationsVisible(seq[i], false); |
1594 |
|
} |
1595 |
54 |
ranges.setStartSeq(startSeq); |
1596 |
54 |
firePropertyChange("alignment", null, alignment.getSequences()); |
1597 |
|
} |
1598 |
|
} |
1599 |
|
|
1600 |
|
|
1601 |
|
|
1602 |
|
|
1603 |
|
@param |
1604 |
|
|
1605 |
|
@param |
1606 |
|
|
1607 |
|
|
1608 |
|
|
|
|
| 43.8% |
Uncovered Elements: 9 (16) |
Complexity: 4 |
Complexity Density: 0.33 |
|
1609 |
3 |
public void hideSequences(SequenceI sequence, boolean representGroup)... |
1610 |
|
{ |
1611 |
3 |
if (selectionGroup == null || selectionGroup.getSize() < 1) |
1612 |
|
{ |
1613 |
0 |
hideSequence(new SequenceI[] { sequence }); |
1614 |
0 |
return; |
1615 |
|
} |
1616 |
|
|
1617 |
3 |
if (representGroup) |
1618 |
|
{ |
1619 |
3 |
hideRepSequences(sequence, selectionGroup); |
1620 |
3 |
setSelectionGroup(null); |
1621 |
3 |
return; |
1622 |
|
} |
1623 |
|
|
1624 |
0 |
int gsize = selectionGroup.getSize(); |
1625 |
0 |
SequenceI[] hseqs = selectionGroup.getSequences() |
1626 |
|
.toArray(new SequenceI[gsize]); |
1627 |
|
|
1628 |
0 |
hideSequence(hseqs); |
1629 |
0 |
setSelectionGroup(null); |
1630 |
0 |
sendSelection(); |
1631 |
|
} |
1632 |
|
|
1633 |
|
|
1634 |
|
|
1635 |
|
|
1636 |
|
@param |
1637 |
|
|
|
|
| 66.7% |
Uncovered Elements: 3 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
1638 |
203 |
protected void setSequenceAnnotationsVisible(SequenceI sequenceI,... |
1639 |
|
boolean visible) |
1640 |
|
{ |
1641 |
203 |
AlignmentAnnotation[] anns = alignment.getAlignmentAnnotation(); |
1642 |
203 |
if (anns != null) |
1643 |
|
{ |
1644 |
203 |
for (AlignmentAnnotation ann : anns) |
1645 |
|
{ |
1646 |
1033 |
if (ann.sequenceRef == sequenceI) |
1647 |
|
{ |
1648 |
0 |
ann.visible = visible; |
1649 |
|
} |
1650 |
|
} |
1651 |
|
} |
1652 |
|
} |
1653 |
|
|
|
|
| 80.8% |
Uncovered Elements: 5 (26) |
Complexity: 6 |
Complexity Density: 0.38 |
|
1654 |
5 |
public void hideRepSequences(SequenceI repSequence, SequenceGroup sg)... |
1655 |
|
{ |
1656 |
5 |
int sSize = sg.getSize(); |
1657 |
5 |
if (sSize < 2) |
1658 |
|
{ |
1659 |
0 |
return; |
1660 |
|
} |
1661 |
|
|
1662 |
5 |
if (hiddenRepSequences == null) |
1663 |
|
{ |
1664 |
5 |
hiddenRepSequences = new Hashtable<>(); |
1665 |
|
} |
1666 |
|
|
1667 |
5 |
hiddenRepSequences.put(repSequence, sg); |
1668 |
|
|
1669 |
|
|
1670 |
5 |
SequenceI[] seqs = new SequenceI[sSize - 1]; |
1671 |
5 |
int index = 0; |
1672 |
16 |
for (int i = 0; i < sSize; i++) |
1673 |
|
{ |
1674 |
11 |
if (sg.getSequenceAt(i) != repSequence) |
1675 |
|
{ |
1676 |
6 |
if (index == sSize - 1) |
1677 |
|
{ |
1678 |
0 |
return; |
1679 |
|
} |
1680 |
|
|
1681 |
6 |
seqs[index++] = sg.getSequenceAt(i); |
1682 |
|
} |
1683 |
|
} |
1684 |
5 |
sg.setSeqrep(repSequence); |
1685 |
5 |
sg.setHidereps(true); |
1686 |
5 |
hideSequence(seqs); |
1687 |
|
|
1688 |
|
} |
1689 |
|
|
1690 |
|
|
1691 |
|
|
1692 |
|
@return |
1693 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1694 |
0 |
public SequenceI getReferenceSeq()... |
1695 |
|
{ |
1696 |
0 |
return alignment.getSeqrep(); |
1697 |
|
} |
1698 |
|
|
1699 |
|
|
1700 |
|
@param |
1701 |
|
@return |
1702 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1703 |
4816 |
public boolean isReferenceSeq(SequenceI seq)... |
1704 |
|
{ |
1705 |
4816 |
return alignment.getSeqrep() == seq; |
1706 |
|
} |
1707 |
|
|
1708 |
|
|
1709 |
|
|
1710 |
|
@param |
1711 |
|
@return |
1712 |
|
|
1713 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1714 |
4878 |
public boolean isHiddenRepSequence(SequenceI seq)... |
1715 |
|
{ |
1716 |
4878 |
return (hiddenRepSequences != null |
1717 |
|
&& hiddenRepSequences.containsKey(seq)); |
1718 |
|
} |
1719 |
|
|
1720 |
|
|
1721 |
|
|
1722 |
|
@param |
1723 |
|
@return |
1724 |
|
|
1725 |
|
|
|
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
1726 |
2 |
public SequenceGroup getRepresentedSequences(SequenceI seq)... |
1727 |
|
{ |
1728 |
2 |
return (SequenceGroup) (hiddenRepSequences == null ? null |
1729 |
|
: hiddenRepSequences.get(seq)); |
1730 |
|
} |
1731 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1732 |
0 |
@Override... |
1733 |
|
public int adjustForHiddenSeqs(int alignmentIndex) |
1734 |
|
{ |
1735 |
0 |
return alignment.getHiddenSequences() |
1736 |
|
.adjustForHiddenSeqs(alignmentIndex); |
1737 |
|
} |
1738 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1739 |
0 |
@Override... |
1740 |
|
public void invertColumnSelection() |
1741 |
|
{ |
1742 |
0 |
colSel.invertColumnSelection(0, alignment.getWidth(), alignment); |
1743 |
0 |
isColSelChanged(true); |
1744 |
|
} |
1745 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 4 |
Complexity Density: 0.5 |
|
1746 |
4 |
@Override... |
1747 |
|
public SequenceI[] getSelectionAsNewSequence() |
1748 |
|
{ |
1749 |
4 |
SequenceI[] sequences; |
1750 |
|
|
1751 |
|
|
1752 |
|
|
1753 |
|
|
1754 |
|
|
1755 |
4 |
if (selectionGroup == null || selectionGroup.getSize() == 0) |
1756 |
|
{ |
1757 |
2 |
sequences = alignment.getSequencesArray(); |
1758 |
2 |
AlignmentAnnotation[] annots = alignment.getAlignmentAnnotation(); |
1759 |
4 |
for (int i = 0; i < sequences.length; i++) |
1760 |
|
{ |
1761 |
|
|
1762 |
2 |
sequences[i] = new Sequence(sequences[i], annots); |
1763 |
|
} |
1764 |
|
} |
1765 |
|
else |
1766 |
|
{ |
1767 |
2 |
sequences = selectionGroup.getSelectionAsNewSequences(alignment); |
1768 |
|
} |
1769 |
|
|
1770 |
4 |
return sequences; |
1771 |
|
} |
1772 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
1773 |
28 |
@Override... |
1774 |
|
public SequenceI[] getSequenceSelection() |
1775 |
|
{ |
1776 |
28 |
SequenceI[] sequences = null; |
1777 |
28 |
if (selectionGroup != null) |
1778 |
|
{ |
1779 |
4 |
sequences = selectionGroup.getSequencesInOrder(alignment); |
1780 |
|
} |
1781 |
28 |
if (sequences == null) |
1782 |
|
{ |
1783 |
24 |
sequences = alignment.getSequencesArray(); |
1784 |
|
} |
1785 |
28 |
return sequences; |
1786 |
|
} |
1787 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1788 |
20 |
@Override... |
1789 |
|
public jalview.datamodel.AlignmentView getAlignmentView( |
1790 |
|
boolean selectedOnly) |
1791 |
|
{ |
1792 |
20 |
return getAlignmentView(selectedOnly, false); |
1793 |
|
} |
1794 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1795 |
21 |
@Override... |
1796 |
|
public jalview.datamodel.AlignmentView getAlignmentView( |
1797 |
|
boolean selectedOnly, boolean markGroups) |
1798 |
|
{ |
1799 |
21 |
return new AlignmentView(alignment, alignment.getHiddenColumns(), |
1800 |
|
selectionGroup, |
1801 |
|
alignment.getHiddenColumns() != null |
1802 |
|
&& alignment.getHiddenColumns().hasHiddenColumns(), |
1803 |
|
selectedOnly, markGroups); |
1804 |
|
} |
1805 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1806 |
24 |
@Override... |
1807 |
|
public String[] getViewAsString(boolean selectedRegionOnly) |
1808 |
|
{ |
1809 |
24 |
return getViewAsString(selectedRegionOnly, true); |
1810 |
|
} |
1811 |
|
|
|
|
| 71.4% |
Uncovered Elements: 10 (35) |
Complexity: 9 |
Complexity Density: 0.36 |
|
1812 |
24 |
@Override... |
1813 |
|
public String[] getViewAsString(boolean selectedRegionOnly, |
1814 |
|
boolean exportHiddenSeqs) |
1815 |
|
{ |
1816 |
24 |
String[] selection = null; |
1817 |
24 |
SequenceI[] seqs = null; |
1818 |
24 |
int i, iSize; |
1819 |
24 |
int start = 0, end = 0; |
1820 |
24 |
if (selectedRegionOnly && selectionGroup != null) |
1821 |
|
{ |
1822 |
0 |
iSize = selectionGroup.getSize(); |
1823 |
0 |
seqs = selectionGroup.getSequencesInOrder(alignment); |
1824 |
0 |
start = selectionGroup.getStartRes(); |
1825 |
0 |
end = selectionGroup.getEndRes() + 1; |
1826 |
|
} |
1827 |
|
else |
1828 |
|
{ |
1829 |
24 |
if (hasHiddenRows() && exportHiddenSeqs) |
1830 |
|
{ |
1831 |
0 |
AlignmentI fullAlignment = alignment.getHiddenSequences() |
1832 |
|
.getFullAlignment(); |
1833 |
0 |
iSize = fullAlignment.getHeight(); |
1834 |
0 |
seqs = fullAlignment.getSequencesArray(); |
1835 |
0 |
end = fullAlignment.getWidth(); |
1836 |
|
} |
1837 |
|
else |
1838 |
|
{ |
1839 |
24 |
iSize = alignment.getHeight(); |
1840 |
24 |
seqs = alignment.getSequencesArray(); |
1841 |
24 |
end = alignment.getWidth(); |
1842 |
|
} |
1843 |
|
} |
1844 |
|
|
1845 |
24 |
selection = new String[iSize]; |
1846 |
24 |
if (alignment.getHiddenColumns() != null |
1847 |
|
&& alignment.getHiddenColumns().hasHiddenColumns()) |
1848 |
|
{ |
1849 |
206 |
for (i = 0; i < iSize; i++) |
1850 |
|
{ |
1851 |
188 |
Iterator<int[]> blocks = alignment.getHiddenColumns() |
1852 |
|
.getVisContigsIterator(start, end + 1, false); |
1853 |
188 |
selection[i] = seqs[i].getSequenceStringFromIterator(blocks); |
1854 |
|
} |
1855 |
|
} |
1856 |
|
else |
1857 |
|
{ |
1858 |
36 |
for (i = 0; i < iSize; i++) |
1859 |
|
{ |
1860 |
30 |
selection[i] = seqs[i].getSequenceAsString(start, end); |
1861 |
|
} |
1862 |
|
|
1863 |
|
} |
1864 |
24 |
return selection; |
1865 |
|
} |
1866 |
|
|
|
|
| 0% |
Uncovered Elements: 30 (30) |
Complexity: 9 |
Complexity Density: 0.5 |
|
1867 |
0 |
@Override... |
1868 |
|
public List<int[]> getVisibleRegionBoundaries(int min, int max) |
1869 |
|
{ |
1870 |
0 |
ArrayList<int[]> regions = new ArrayList<>(); |
1871 |
0 |
int start = min; |
1872 |
0 |
int end = max; |
1873 |
|
|
1874 |
0 |
do |
1875 |
|
{ |
1876 |
0 |
HiddenColumns hidden = alignment.getHiddenColumns(); |
1877 |
0 |
if (hidden != null && hidden.hasHiddenColumns()) |
1878 |
|
{ |
1879 |
0 |
if (start == 0) |
1880 |
|
{ |
1881 |
0 |
start = hidden.visibleToAbsoluteColumn(start); |
1882 |
|
} |
1883 |
|
|
1884 |
0 |
end = hidden.getNextHiddenBoundary(false, start); |
1885 |
0 |
if (start == end) |
1886 |
|
{ |
1887 |
0 |
end = max; |
1888 |
|
} |
1889 |
0 |
if (end > max) |
1890 |
|
{ |
1891 |
0 |
end = max; |
1892 |
|
} |
1893 |
|
} |
1894 |
|
|
1895 |
0 |
regions.add(new int[] { start, end }); |
1896 |
|
|
1897 |
0 |
if (hidden != null && hidden.hasHiddenColumns()) |
1898 |
|
{ |
1899 |
0 |
start = hidden.visibleToAbsoluteColumn(end); |
1900 |
0 |
start = hidden.getNextHiddenBoundary(true, start) + 1; |
1901 |
|
} |
1902 |
0 |
} while (end < max); |
1903 |
|
|
1904 |
|
|
1905 |
|
|
1906 |
0 |
return regions; |
1907 |
|
} |
1908 |
|
|
|
|
| 71.4% |
Uncovered Elements: 4 (14) |
Complexity: 4 |
Complexity Density: 0.4 |
|
1909 |
1 |
@Override... |
1910 |
|
public List<AlignmentAnnotation> getVisibleAlignmentAnnotation( |
1911 |
|
boolean selectedOnly) |
1912 |
|
{ |
1913 |
1 |
ArrayList<AlignmentAnnotation> ala = new ArrayList<>(); |
1914 |
1 |
AlignmentAnnotation[] aa; |
1915 |
? |
if ((aa = alignment.getAlignmentAnnotation()) != null) |
1916 |
|
{ |
1917 |
1 |
for (AlignmentAnnotation annot : aa) |
1918 |
|
{ |
1919 |
4 |
AlignmentAnnotation clone = new AlignmentAnnotation(annot); |
1920 |
4 |
if (selectedOnly && selectionGroup != null) |
1921 |
|
{ |
1922 |
4 |
clone.makeVisibleAnnotation(selectionGroup.getStartRes(), |
1923 |
|
selectionGroup.getEndRes(), alignment.getHiddenColumns()); |
1924 |
|
} |
1925 |
|
else |
1926 |
|
{ |
1927 |
0 |
clone.makeVisibleAnnotation(alignment.getHiddenColumns()); |
1928 |
|
} |
1929 |
4 |
ala.add(clone); |
1930 |
|
} |
1931 |
|
} |
1932 |
1 |
return ala; |
1933 |
|
} |
1934 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1935 |
1678 |
@Override... |
1936 |
|
public boolean isPadGaps() |
1937 |
|
{ |
1938 |
1678 |
return padGaps; |
1939 |
|
} |
1940 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1941 |
508 |
@Override... |
1942 |
|
public void setPadGaps(boolean padGaps) |
1943 |
|
{ |
1944 |
508 |
this.padGaps = padGaps; |
1945 |
|
} |
1946 |
|
|
1947 |
|
|
1948 |
|
|
1949 |
|
|
1950 |
|
|
1951 |
|
@param |
1952 |
|
|
|
|
| 78.8% |
Uncovered Elements: 7 (33) |
Complexity: 10 |
Complexity Density: 0.53 |
|
1953 |
549 |
@Override... |
1954 |
|
public void alignmentChanged(AlignmentViewPanel ap) |
1955 |
|
{ |
1956 |
549 |
if (isPadGaps()) |
1957 |
|
{ |
1958 |
310 |
alignment.padGaps(); |
1959 |
|
} |
1960 |
549 |
if (autoCalculateConsensus) |
1961 |
|
{ |
1962 |
549 |
updateConsensus(ap); |
1963 |
549 |
updateSecondaryStructureConsensus(ap); |
1964 |
|
} |
1965 |
549 |
if (hconsensus != null && autoCalculateConsensus) |
1966 |
|
{ |
1967 |
542 |
updateConservation(ap); |
1968 |
|
} |
1969 |
549 |
if (autoCalculateStrucConsensus) |
1970 |
|
{ |
1971 |
549 |
updateStrucConsensus(ap); |
1972 |
|
} |
1973 |
|
|
1974 |
|
|
1975 |
549 |
int alWidth = alignment.getWidth(); |
1976 |
549 |
List<SequenceGroup> groups = alignment.getGroups(); |
1977 |
549 |
if (groups != null) |
1978 |
|
{ |
1979 |
549 |
for (SequenceGroup sg : groups) |
1980 |
|
{ |
1981 |
175 |
if (sg.getEndRes() > alWidth) |
1982 |
|
{ |
1983 |
0 |
sg.setEndRes(alWidth - 1); |
1984 |
|
} |
1985 |
|
} |
1986 |
|
} |
1987 |
|
|
1988 |
549 |
if (selectionGroup != null && selectionGroup.getEndRes() > alWidth) |
1989 |
|
{ |
1990 |
0 |
selectionGroup.setEndRes(alWidth - 1); |
1991 |
|
} |
1992 |
|
|
1993 |
549 |
updateAllColourSchemes(); |
1994 |
549 |
calculator.restartWorkers(); |
1995 |
|
|
1996 |
|
} |
1997 |
|
|
1998 |
|
|
1999 |
|
|
2000 |
|
|
|
|
| 87.5% |
Uncovered Elements: 2 (16) |
Complexity: 4 |
Complexity Density: 0.4 |
|
2001 |
549 |
void updateAllColourSchemes()... |
2002 |
|
{ |
2003 |
549 |
ResidueShaderI rs = residueShading; |
2004 |
549 |
if (rs != null) |
2005 |
|
{ |
2006 |
549 |
rs.alignmentChanged(alignment, hiddenRepSequences); |
2007 |
|
|
2008 |
549 |
rs.setConsensus(hconsensus); |
2009 |
549 |
if (rs.conservationApplied()) |
2010 |
|
{ |
2011 |
3 |
rs.setConservation(Conservation.calculateConservation("All", |
2012 |
|
alignment.getSequences(), 0, alignment.getWidth(), false, |
2013 |
|
getConsPercGaps(), false)); |
2014 |
|
} |
2015 |
|
} |
2016 |
|
|
2017 |
549 |
for (SequenceGroup sg : alignment.getGroups()) |
2018 |
|
{ |
2019 |
175 |
if (sg.cs != null) |
2020 |
|
{ |
2021 |
175 |
sg.cs.alignmentChanged(sg, hiddenRepSequences); |
2022 |
|
} |
2023 |
175 |
sg.recalcConservation(); |
2024 |
|
} |
2025 |
|
} |
2026 |
|
|
|
|
| 93.3% |
Uncovered Elements: 1 (15) |
Complexity: 4 |
Complexity Density: 0.36 |
|
2027 |
508 |
protected void initAutoAnnotation()... |
2028 |
|
{ |
2029 |
|
|
2030 |
|
|
2031 |
|
|
2032 |
|
|
2033 |
508 |
if (hconsensus == null && !isDataset) |
2034 |
|
{ |
2035 |
508 |
if (!alignment.isNucleotide()) |
2036 |
|
{ |
2037 |
397 |
initConservation(); |
2038 |
397 |
initQuality(); |
2039 |
|
} |
2040 |
|
else |
2041 |
|
{ |
2042 |
111 |
initRNAStructure(); |
2043 |
|
} |
2044 |
508 |
consensus = new AlignmentAnnotation("Consensus", |
2045 |
|
MessageManager.getString("label.consensus_descr"), |
2046 |
|
new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH); |
2047 |
|
|
2048 |
508 |
secondaryStructureConsensus = new AlignmentAnnotation( |
2049 |
|
MessageManager.getString("label.ssconsensus_label"), |
2050 |
|
MessageManager.getString("label.ssconsensus_descr"), |
2051 |
|
new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH); |
2052 |
|
|
2053 |
508 |
initConsensus(consensus); |
2054 |
508 |
initSSConsensus(secondaryStructureConsensus); |
2055 |
508 |
initGapCounts(); |
2056 |
508 |
initComplementConsensus(); |
2057 |
|
} |
2058 |
|
} |
2059 |
|
|
2060 |
|
|
2061 |
|
|
2062 |
|
|
2063 |
|
|
|
|
| 90.9% |
Uncovered Elements: 2 (22) |
Complexity: 7 |
Complexity Density: 0.5 |
|
2064 |
518 |
public boolean initComplementConsensus()... |
2065 |
|
{ |
2066 |
518 |
if (!alignment.isNucleotide()) |
2067 |
|
{ |
2068 |
406 |
final List<AlignedCodonFrame> codonMappings = alignment |
2069 |
|
.getCodonFrames(); |
2070 |
406 |
if (codonMappings != null && !codonMappings.isEmpty()) |
2071 |
|
{ |
2072 |
4 |
boolean doConsensus = false; |
2073 |
4 |
for (AlignedCodonFrame mapping : codonMappings) |
2074 |
|
{ |
2075 |
|
|
2076 |
4 |
MapList[] mapLists = mapping.getdnaToProt(); |
2077 |
|
|
2078 |
|
|
2079 |
4 |
if (mapLists.length > 0 && mapLists[0].getFromRatio() == 3) |
2080 |
|
{ |
2081 |
4 |
doConsensus = true; |
2082 |
4 |
break; |
2083 |
|
} |
2084 |
|
} |
2085 |
4 |
if (doConsensus) |
2086 |
|
{ |
2087 |
4 |
complementConsensus = new AlignmentAnnotation("cDNA Consensus", |
2088 |
|
MessageManager |
2089 |
|
.getString("label.complement_consensus_descr"), |
2090 |
|
new Annotation[1], 0f, 100f, |
2091 |
|
AlignmentAnnotation.BAR_GRAPH); |
2092 |
4 |
initConsensus(complementConsensus); |
2093 |
4 |
return true; |
2094 |
|
} |
2095 |
|
} |
2096 |
|
} |
2097 |
514 |
return false; |
2098 |
|
} |
2099 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
2100 |
512 |
private void initConsensus(AlignmentAnnotation aa)... |
2101 |
|
{ |
2102 |
512 |
aa.hasText = true; |
2103 |
512 |
aa.autoCalculated = true; |
2104 |
|
|
2105 |
512 |
if (showConsensus) |
2106 |
|
{ |
2107 |
511 |
alignment.addAnnotation(aa); |
2108 |
|
} |
2109 |
|
} |
2110 |
|
|
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
2111 |
508 |
private void initSSConsensus(AlignmentAnnotation aa)... |
2112 |
|
{ |
2113 |
508 |
aa.hasText = true; |
2114 |
508 |
aa.autoCalculated = true; |
2115 |
|
|
2116 |
508 |
if (showSSConsensus) |
2117 |
|
{ |
2118 |
0 |
alignment.addAnnotation(aa); |
2119 |
|
} |
2120 |
|
} |
2121 |
|
|
2122 |
|
|
2123 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
2124 |
508 |
private void initGapCounts()... |
2125 |
|
{ |
2126 |
508 |
if (showOccupancy) |
2127 |
|
{ |
2128 |
504 |
gapcounts = new AlignmentAnnotation("Occupancy", |
2129 |
|
MessageManager.getString("label.occupancy_descr"), |
2130 |
|
new Annotation[1], 0f, alignment.getHeight(), |
2131 |
|
AlignmentAnnotation.BAR_GRAPH); |
2132 |
504 |
gapcounts.hasText = true; |
2133 |
504 |
gapcounts.autoCalculated = true; |
2134 |
504 |
gapcounts.scaleColLabel = true; |
2135 |
504 |
gapcounts.graph = AlignmentAnnotation.BAR_GRAPH; |
2136 |
|
|
2137 |
504 |
alignment.addAnnotation(gapcounts); |
2138 |
|
} |
2139 |
|
} |
2140 |
|
|
|
|
| 90% |
Uncovered Elements: 1 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
2141 |
397 |
private void initConservation()... |
2142 |
|
{ |
2143 |
397 |
if (showConservation) |
2144 |
|
{ |
2145 |
396 |
if (conservation == null) |
2146 |
|
{ |
2147 |
396 |
conservation = new AlignmentAnnotation("Conservation", |
2148 |
|
MessageManager.formatMessage("label.conservation_descr", |
2149 |
|
getConsPercGaps()), |
2150 |
|
new Annotation[1], 0f, 11f, AlignmentAnnotation.BAR_GRAPH); |
2151 |
396 |
conservation.hasText = true; |
2152 |
396 |
conservation.autoCalculated = true; |
2153 |
396 |
alignment.addAnnotation(conservation); |
2154 |
|
} |
2155 |
|
} |
2156 |
|
} |
2157 |
|
|
|
|
| 80% |
Uncovered Elements: 2 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
2158 |
397 |
private void initQuality()... |
2159 |
|
{ |
2160 |
397 |
if (showQuality) |
2161 |
|
{ |
2162 |
397 |
if (quality == null) |
2163 |
|
{ |
2164 |
397 |
quality = new AlignmentAnnotation("Quality", |
2165 |
|
MessageManager.getString("label.quality_descr"), |
2166 |
|
new Annotation[1], 0f, 11f, AlignmentAnnotation.BAR_GRAPH); |
2167 |
397 |
quality.hasText = true; |
2168 |
397 |
quality.autoCalculated = true; |
2169 |
397 |
alignment.addAnnotation(quality); |
2170 |
|
} |
2171 |
|
} |
2172 |
|
} |
2173 |
|
|
|
|
| 90% |
Uncovered Elements: 1 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
2174 |
111 |
private void initRNAStructure()... |
2175 |
|
{ |
2176 |
111 |
if (alignment.hasRNAStructure() && strucConsensus == null) |
2177 |
|
{ |
2178 |
2 |
strucConsensus = new AlignmentAnnotation("StrucConsensus", |
2179 |
|
MessageManager.getString("label.strucconsensus_descr"), |
2180 |
|
new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH); |
2181 |
2 |
strucConsensus.hasText = true; |
2182 |
2 |
strucConsensus.autoCalculated = true; |
2183 |
|
|
2184 |
2 |
if (showConsensus) |
2185 |
|
{ |
2186 |
2 |
alignment.addAnnotation(strucConsensus); |
2187 |
|
} |
2188 |
|
} |
2189 |
|
} |
2190 |
|
|
2191 |
|
|
2192 |
|
|
2193 |
|
|
2194 |
|
@see |
2195 |
|
|
|
|
| 91.7% |
Uncovered Elements: 4 (48) |
Complexity: 11 |
Complexity Density: 0.39 |
|
2196 |
3867 |
@Override... |
2197 |
|
public int calcPanelHeight() |
2198 |
|
{ |
2199 |
|
|
2200 |
3867 |
AlignmentAnnotation[] anns = getAlignment().getAlignmentAnnotation(); |
2201 |
3867 |
int height = 0; |
2202 |
3867 |
int charHeight = getCharHeight(); |
2203 |
3867 |
if (anns != null) |
2204 |
|
{ |
2205 |
3867 |
BitSet graphgrp = new BitSet(); |
2206 |
3867 |
for (AlignmentAnnotation aa : anns) |
2207 |
|
{ |
2208 |
18151 |
if (aa == null) |
2209 |
|
{ |
2210 |
0 |
jalview.bin.Console.errPrintln("Null annotation row: ignoring."); |
2211 |
0 |
continue; |
2212 |
|
} |
2213 |
18151 |
if (!aa.visible) |
2214 |
|
{ |
2215 |
1377 |
continue; |
2216 |
|
} |
2217 |
16774 |
if (aa.graphGroup > -1) |
2218 |
|
{ |
2219 |
300 |
if (graphgrp.get(aa.graphGroup)) |
2220 |
|
{ |
2221 |
150 |
continue; |
2222 |
|
} |
2223 |
|
else |
2224 |
|
{ |
2225 |
150 |
graphgrp.set(aa.graphGroup); |
2226 |
|
} |
2227 |
|
} |
2228 |
16623 |
aa.height = 0; |
2229 |
|
|
2230 |
16623 |
if (aa.hasText) |
2231 |
|
{ |
2232 |
14690 |
aa.height += charHeight; |
2233 |
|
} |
2234 |
|
|
2235 |
16624 |
if (aa.hasIcons) |
2236 |
|
{ |
2237 |
667 |
aa.height += 16; |
2238 |
|
} |
2239 |
|
|
2240 |
16624 |
if (aa.graph > 0) |
2241 |
|
{ |
2242 |
15567 |
aa.height += aa.graphHeight + 20; |
2243 |
|
} |
2244 |
|
|
2245 |
16623 |
if (aa.height == 0) |
2246 |
|
{ |
2247 |
156 |
aa.height = 20; |
2248 |
|
} |
2249 |
|
|
2250 |
16623 |
height += aa.height; |
2251 |
|
} |
2252 |
|
} |
2253 |
3867 |
if (height == 0) |
2254 |
|
{ |
2255 |
|
|
2256 |
18 |
height = 20; |
2257 |
|
} |
2258 |
3867 |
return height; |
2259 |
|
} |
2260 |
|
|
|
|
| 84% |
Uncovered Elements: 8 (50) |
Complexity: 12 |
Complexity Density: 0.35 |
|
2261 |
130 |
@Override... |
2262 |
|
public void updateGroupAnnotationSettings(boolean applyGlobalSettings, |
2263 |
|
boolean preserveNewGroupSettings) |
2264 |
|
{ |
2265 |
130 |
boolean updateCalcs = false; |
2266 |
130 |
boolean conv = isShowGroupConservation(); |
2267 |
130 |
boolean cons = isShowGroupConsensus(); |
2268 |
130 |
boolean showprf = isShowSequenceLogo(); |
2269 |
130 |
boolean showSSprf = isShowSequenceSSLogo(); |
2270 |
130 |
boolean showConsHist = isShowConsensusHistogram(); |
2271 |
130 |
boolean showSSConsHist = isShowSSConsensusHistogram(); |
2272 |
130 |
boolean normLogo = isNormaliseSequenceLogo(); |
2273 |
|
|
2274 |
|
|
2275 |
|
|
2276 |
|
|
2277 |
|
|
2278 |
|
|
2279 |
|
|
2280 |
|
|
2281 |
|
|
2282 |
|
|
2283 |
|
|
2284 |
|
|
2285 |
130 |
AlignmentAnnotation[] aan = alignment.getAlignmentAnnotation(); |
2286 |
130 |
List<SequenceGroup> oldrfs = new ArrayList<>(); |
2287 |
130 |
if (aan != null) |
2288 |
|
{ |
2289 |
1021 |
for (int an = 0; an < aan.length; an++) |
2290 |
|
{ |
2291 |
891 |
if (aan[an].autoCalculated && aan[an].groupRef != null) |
2292 |
|
{ |
2293 |
0 |
oldrfs.add(aan[an].groupRef); |
2294 |
0 |
alignment.deleteAnnotation(aan[an], false); |
2295 |
|
} |
2296 |
|
} |
2297 |
|
} |
2298 |
130 |
if (alignment.getGroups() != null) |
2299 |
|
{ |
2300 |
130 |
for (SequenceGroup sg : alignment.getGroups()) |
2301 |
|
{ |
2302 |
56 |
updateCalcs = false; |
2303 |
56 |
if (applyGlobalSettings |
2304 |
|
|| (!preserveNewGroupSettings && !oldrfs.contains(sg))) |
2305 |
|
{ |
2306 |
|
|
2307 |
9 |
sg.setshowSequenceLogo(showprf); |
2308 |
9 |
sg.setshowSequenceSSLogo(showSSprf); |
2309 |
9 |
sg.setShowConsensusHistogram(showConsHist); |
2310 |
9 |
sg.setShowSSConsensusHistogram(showSSConsHist); |
2311 |
9 |
sg.setNormaliseSequenceLogo(normLogo); |
2312 |
|
} |
2313 |
56 |
if (conv) |
2314 |
|
{ |
2315 |
0 |
updateCalcs = true; |
2316 |
0 |
alignment.addAnnotation(sg.getConservationRow(), 0); |
2317 |
|
} |
2318 |
56 |
if (cons) |
2319 |
|
{ |
2320 |
24 |
updateCalcs = true; |
2321 |
24 |
alignment.addAnnotation(sg.getConsensus(), 0); |
2322 |
24 |
alignment.addAnnotation(sg.getSSConsensus(), 0); |
2323 |
|
} |
2324 |
|
|
2325 |
56 |
if (updateCalcs) |
2326 |
|
{ |
2327 |
24 |
sg.recalcConservation(); |
2328 |
|
} |
2329 |
|
} |
2330 |
|
} |
2331 |
130 |
oldrfs.clear(); |
2332 |
|
} |
2333 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2334 |
24633 |
@Override... |
2335 |
|
public boolean isDisplayReferenceSeq() |
2336 |
|
{ |
2337 |
24633 |
return alignment.hasSeqrep() && viewStyle.isDisplayReferenceSeq(); |
2338 |
|
} |
2339 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2340 |
10 |
@Override... |
2341 |
|
public void setDisplayReferenceSeq(boolean displayReferenceSeq) |
2342 |
|
{ |
2343 |
10 |
viewStyle.setDisplayReferenceSeq(displayReferenceSeq); |
2344 |
|
} |
2345 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2346 |
5 |
@Override... |
2347 |
|
public boolean isColourByReferenceSeq() |
2348 |
|
{ |
2349 |
5 |
return alignment.hasSeqrep() && viewStyle.isColourByReferenceSeq(); |
2350 |
|
} |
2351 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
2352 |
18999 |
@Override... |
2353 |
|
public Color getSequenceColour(SequenceI seq) |
2354 |
|
{ |
2355 |
18999 |
Color sqc = sequenceColours.get(seq); |
2356 |
18999 |
return (sqc == null ? Color.white : sqc); |
2357 |
|
} |
2358 |
|
|
|
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2359 |
1192 |
@Override... |
2360 |
|
public void setSequenceColour(SequenceI seq, Color col) |
2361 |
|
{ |
2362 |
1192 |
if (col == null) |
2363 |
|
{ |
2364 |
0 |
sequenceColours.remove(seq); |
2365 |
|
} |
2366 |
|
else |
2367 |
|
{ |
2368 |
1192 |
sequenceColours.put(seq, col); |
2369 |
|
} |
2370 |
|
} |
2371 |
|
|
|
|
| 50% |
Uncovered Elements: 3 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
2372 |
5 |
@Override... |
2373 |
|
public void updateSequenceIdColours() |
2374 |
|
{ |
2375 |
5 |
for (SequenceGroup sg : alignment.getGroups()) |
2376 |
|
{ |
2377 |
5 |
if (sg.idColour != null) |
2378 |
|
{ |
2379 |
0 |
for (SequenceI s : sg.getSequences(getHiddenRepSequences())) |
2380 |
|
{ |
2381 |
0 |
sequenceColours.put(s, sg.idColour); |
2382 |
|
} |
2383 |
|
} |
2384 |
|
} |
2385 |
|
} |
2386 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2387 |
0 |
@Override... |
2388 |
|
public void clearSequenceColours() |
2389 |
|
{ |
2390 |
0 |
sequenceColours.clear(); |
2391 |
|
} |
2392 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2393 |
1048 |
@Override... |
2394 |
|
public AlignViewportI getCodingComplement() |
2395 |
|
{ |
2396 |
1048 |
return this.codingComplement; |
2397 |
|
} |
2398 |
|
|
2399 |
|
|
2400 |
|
|
2401 |
|
|
2402 |
|
|
|
|
| 77.8% |
Uncovered Elements: 2 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
2403 |
6 |
@Override... |
2404 |
|
public void setCodingComplement(AlignViewportI av) |
2405 |
|
{ |
2406 |
6 |
if (this == av) |
2407 |
|
{ |
2408 |
0 |
jalview.bin.Console |
2409 |
|
.errPrintln("Ignoring recursive setCodingComplement request"); |
2410 |
|
} |
2411 |
|
else |
2412 |
|
{ |
2413 |
6 |
this.codingComplement = av; |
2414 |
|
|
2415 |
6 |
if (av.getCodingComplement() != this) |
2416 |
|
{ |
2417 |
3 |
av.setCodingComplement(this); |
2418 |
|
} |
2419 |
|
} |
2420 |
|
} |
2421 |
|
|
|
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
2422 |
25 |
@Override... |
2423 |
|
public boolean isNucleotide() |
2424 |
|
{ |
2425 |
25 |
return getAlignment() == null ? false : getAlignment().isNucleotide(); |
2426 |
|
} |
2427 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2428 |
1697888 |
@Override... |
2429 |
|
public FeaturesDisplayedI getFeaturesDisplayed() |
2430 |
|
{ |
2431 |
1698089 |
return featuresDisplayed; |
2432 |
|
} |
2433 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2434 |
112 |
@Override... |
2435 |
|
public void setFeaturesDisplayed(FeaturesDisplayedI featuresDisplayedI) |
2436 |
|
{ |
2437 |
112 |
featuresDisplayed = featuresDisplayedI; |
2438 |
|
} |
2439 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2440 |
83 |
@Override... |
2441 |
|
public boolean areFeaturesDisplayed() |
2442 |
|
{ |
2443 |
83 |
return featuresDisplayed != null |
2444 |
|
&& featuresDisplayed.getRegisteredFeaturesCount() > 0; |
2445 |
|
} |
2446 |
|
|
2447 |
|
|
2448 |
|
|
2449 |
|
|
2450 |
|
@param |
2451 |
|
|
2452 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2453 |
141 |
@Override... |
2454 |
|
public void setShowSequenceFeatures(boolean b) |
2455 |
|
{ |
2456 |
141 |
viewStyle.setShowSequenceFeatures(b); |
2457 |
|
} |
2458 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2459 |
435352 |
@Override... |
2460 |
|
public boolean isShowSequenceFeatures() |
2461 |
|
{ |
2462 |
435398 |
return viewStyle.isShowSequenceFeatures(); |
2463 |
|
} |
2464 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2465 |
0 |
@Override... |
2466 |
|
public void setShowSequenceFeaturesHeight(boolean selected) |
2467 |
|
{ |
2468 |
0 |
viewStyle.setShowSequenceFeaturesHeight(selected); |
2469 |
|
} |
2470 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2471 |
0 |
@Override... |
2472 |
|
public boolean isShowSequenceFeaturesHeight() |
2473 |
|
{ |
2474 |
0 |
return viewStyle.isShowSequenceFeaturesHeight(); |
2475 |
|
} |
2476 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2477 |
680 |
@Override... |
2478 |
|
public void setShowAnnotation(boolean b) |
2479 |
|
{ |
2480 |
680 |
viewStyle.setShowAnnotation(b); |
2481 |
|
} |
2482 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2483 |
5204 |
@Override... |
2484 |
|
public boolean isShowAnnotation() |
2485 |
|
{ |
2486 |
5204 |
return viewStyle.isShowAnnotation(); |
2487 |
|
} |
2488 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2489 |
18791 |
@Override... |
2490 |
|
public boolean isRightAlignIds() |
2491 |
|
{ |
2492 |
18791 |
return viewStyle.isRightAlignIds(); |
2493 |
|
} |
2494 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2495 |
593 |
@Override... |
2496 |
|
public void setRightAlignIds(boolean rightAlignIds) |
2497 |
|
{ |
2498 |
593 |
viewStyle.setRightAlignIds(rightAlignIds); |
2499 |
|
} |
2500 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2501 |
1040 |
@Override... |
2502 |
|
public boolean getConservationSelected() |
2503 |
|
{ |
2504 |
1040 |
return viewStyle.getConservationSelected(); |
2505 |
|
} |
2506 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2507 |
85 |
@Override... |
2508 |
|
public void setShowBoxes(boolean state) |
2509 |
|
{ |
2510 |
85 |
viewStyle.setShowBoxes(state); |
2511 |
|
} |
2512 |
|
|
2513 |
|
|
2514 |
|
@return |
2515 |
|
@see |
2516 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2517 |
644943 |
@Override... |
2518 |
|
public Color getTextColour() |
2519 |
|
{ |
2520 |
644944 |
return viewStyle.getTextColour(); |
2521 |
|
} |
2522 |
|
|
2523 |
|
|
2524 |
|
@return |
2525 |
|
@see |
2526 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2527 |
46 |
@Override... |
2528 |
|
public Color getTextColour2() |
2529 |
|
{ |
2530 |
46 |
return viewStyle.getTextColour2(); |
2531 |
|
} |
2532 |
|
|
2533 |
|
|
2534 |
|
@return |
2535 |
|
@see |
2536 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2537 |
368957 |
@Override... |
2538 |
|
public int getThresholdTextColour() |
2539 |
|
{ |
2540 |
368957 |
return viewStyle.getThresholdTextColour(); |
2541 |
|
} |
2542 |
|
|
2543 |
|
|
2544 |
|
@return |
2545 |
|
@see |
2546 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2547 |
0 |
@Override... |
2548 |
|
public boolean isConservationColourSelected() |
2549 |
|
{ |
2550 |
0 |
return viewStyle.isConservationColourSelected(); |
2551 |
|
} |
2552 |
|
|
2553 |
|
|
2554 |
|
@return |
2555 |
|
@see |
2556 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2557 |
3227 |
@Override... |
2558 |
|
public boolean isRenderGaps() |
2559 |
|
{ |
2560 |
3227 |
return viewStyle.isRenderGaps(); |
2561 |
|
} |
2562 |
|
|
2563 |
|
|
2564 |
|
@return |
2565 |
|
@see |
2566 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2567 |
672 |
@Override... |
2568 |
|
public boolean isShowColourText() |
2569 |
|
{ |
2570 |
672 |
return viewStyle.isShowColourText(); |
2571 |
|
} |
2572 |
|
|
2573 |
|
|
2574 |
|
@param |
2575 |
|
@see |
2576 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2577 |
0 |
@Override... |
2578 |
|
public void setConservationColourSelected( |
2579 |
|
boolean conservationColourSelected) |
2580 |
|
{ |
2581 |
0 |
viewStyle.setConservationColourSelected(conservationColourSelected); |
2582 |
|
} |
2583 |
|
|
2584 |
|
|
2585 |
|
@param |
2586 |
|
@see |
2587 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2588 |
0 |
@Override... |
2589 |
|
public void setShowColourText(boolean showColourText) |
2590 |
|
{ |
2591 |
0 |
viewStyle.setShowColourText(showColourText); |
2592 |
|
} |
2593 |
|
|
2594 |
|
|
2595 |
|
@param |
2596 |
|
@see |
2597 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2598 |
85 |
@Override... |
2599 |
|
public void setTextColour(Color textColour) |
2600 |
|
{ |
2601 |
85 |
viewStyle.setTextColour(textColour); |
2602 |
|
} |
2603 |
|
|
2604 |
|
|
2605 |
|
@param |
2606 |
|
@see |
2607 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2608 |
85 |
@Override... |
2609 |
|
public void setThresholdTextColour(int thresholdTextColour) |
2610 |
|
{ |
2611 |
85 |
viewStyle.setThresholdTextColour(thresholdTextColour); |
2612 |
|
} |
2613 |
|
|
2614 |
|
|
2615 |
|
@param |
2616 |
|
@see |
2617 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2618 |
85 |
@Override... |
2619 |
|
public void setTextColour2(Color textColour2) |
2620 |
|
{ |
2621 |
85 |
viewStyle.setTextColour2(textColour2); |
2622 |
|
} |
2623 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2624 |
143 |
@Override... |
2625 |
|
public ViewStyleI getViewStyle() |
2626 |
|
{ |
2627 |
143 |
return new ViewStyle(viewStyle); |
2628 |
|
} |
2629 |
|
|
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2630 |
86 |
@Override... |
2631 |
|
public void setViewStyle(ViewStyleI settingsForView) |
2632 |
|
{ |
2633 |
86 |
viewStyle = new ViewStyle(settingsForView); |
2634 |
86 |
if (residueShading != null) |
2635 |
|
{ |
2636 |
86 |
residueShading.setConservationApplied( |
2637 |
|
settingsForView.isConservationColourSelected()); |
2638 |
|
} |
2639 |
|
} |
2640 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2641 |
0 |
@Override... |
2642 |
|
public boolean sameStyle(ViewStyleI them) |
2643 |
|
{ |
2644 |
0 |
return viewStyle.sameStyle(them); |
2645 |
|
} |
2646 |
|
|
2647 |
|
|
2648 |
|
@return |
2649 |
|
@see |
2650 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2651 |
6205 |
@Override... |
2652 |
|
public int getIdWidth() |
2653 |
|
{ |
2654 |
6205 |
return viewStyle.getIdWidth(); |
2655 |
|
} |
2656 |
|
|
2657 |
|
|
2658 |
|
@param |
2659 |
|
@see |
2660 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2661 |
1031 |
@Override... |
2662 |
|
public void setIdWidth(int i) |
2663 |
|
{ |
2664 |
1031 |
viewStyle.setIdWidth(i); |
2665 |
|
} |
2666 |
|
|
2667 |
|
|
2668 |
|
@return |
2669 |
|
@see |
2670 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2671 |
672 |
@Override... |
2672 |
|
public boolean isCentreColumnLabels() |
2673 |
|
{ |
2674 |
672 |
return viewStyle.isCentreColumnLabels(); |
2675 |
|
} |
2676 |
|
|
2677 |
|
|
2678 |
|
@param |
2679 |
|
@see |
2680 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2681 |
593 |
@Override... |
2682 |
|
public void setCentreColumnLabels(boolean centreColumnLabels) |
2683 |
|
{ |
2684 |
593 |
viewStyle.setCentreColumnLabels(centreColumnLabels); |
2685 |
|
} |
2686 |
|
|
2687 |
|
|
2688 |
|
@param |
2689 |
|
@see |
2690 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2691 |
593 |
@Override... |
2692 |
|
public void setShowDBRefs(boolean showdbrefs) |
2693 |
|
{ |
2694 |
593 |
viewStyle.setShowDBRefs(showdbrefs); |
2695 |
|
} |
2696 |
|
|
2697 |
|
|
2698 |
|
@return |
2699 |
|
@see |
2700 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2701 |
718 |
@Override... |
2702 |
|
public boolean isShowDBRefs() |
2703 |
|
{ |
2704 |
718 |
return viewStyle.isShowDBRefs(); |
2705 |
|
} |
2706 |
|
|
2707 |
|
|
2708 |
|
@return |
2709 |
|
@see |
2710 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2711 |
718 |
@Override... |
2712 |
|
public boolean isShowNPFeats() |
2713 |
|
{ |
2714 |
718 |
return viewStyle.isShowNPFeats(); |
2715 |
|
} |
2716 |
|
|
2717 |
|
|
2718 |
|
@param |
2719 |
|
@see |
2720 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2721 |
593 |
@Override... |
2722 |
|
public void setShowNPFeats(boolean shownpfeats) |
2723 |
|
{ |
2724 |
593 |
viewStyle.setShowNPFeats(shownpfeats); |
2725 |
|
} |
2726 |
|
|
2727 |
|
public abstract StructureSelectionManager getStructureSelectionManager(); |
2728 |
|
|
2729 |
|
|
2730 |
|
|
2731 |
|
|
2732 |
|
@param |
2733 |
|
|
|
|
| 85.7% |
Uncovered Elements: 1 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
2734 |
1 |
public void addToHistoryList(CommandI command)... |
2735 |
|
{ |
2736 |
1 |
if (this.historyList != null) |
2737 |
|
{ |
2738 |
1 |
this.historyList.push(command); |
2739 |
1 |
broadcastCommand(command, false); |
2740 |
1 |
setSavedUpToDate(false); |
2741 |
1 |
Jalview2XML.setStateSavedUpToDate(false); |
2742 |
|
} |
2743 |
|
} |
2744 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2745 |
1 |
protected void broadcastCommand(CommandI command, boolean undo)... |
2746 |
|
{ |
2747 |
1 |
getStructureSelectionManager().commandPerformed(command, undo, |
2748 |
|
getVamsasSource()); |
2749 |
|
} |
2750 |
|
|
2751 |
|
|
2752 |
|
|
2753 |
|
|
2754 |
|
@param |
2755 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2756 |
0 |
public void addToRedoList(CommandI command)... |
2757 |
|
{ |
2758 |
0 |
if (this.redoList != null) |
2759 |
|
{ |
2760 |
0 |
this.redoList.push(command); |
2761 |
|
} |
2762 |
0 |
broadcastCommand(command, true); |
2763 |
|
} |
2764 |
|
|
2765 |
|
|
2766 |
|
|
2767 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
2768 |
1 |
public void clearRedoList()... |
2769 |
|
{ |
2770 |
1 |
if (this.redoList != null) |
2771 |
|
{ |
2772 |
1 |
this.redoList.clear(); |
2773 |
|
} |
2774 |
|
} |
2775 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2776 |
53 |
public void setHistoryList(Deque<CommandI> list)... |
2777 |
|
{ |
2778 |
53 |
this.historyList = list; |
2779 |
|
} |
2780 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2781 |
1277 |
public Deque<CommandI> getHistoryList()... |
2782 |
|
{ |
2783 |
1277 |
return this.historyList; |
2784 |
|
} |
2785 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2786 |
53 |
public void setRedoList(Deque<CommandI> list)... |
2787 |
|
{ |
2788 |
53 |
this.redoList = list; |
2789 |
|
} |
2790 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2791 |
1275 |
public Deque<CommandI> getRedoList()... |
2792 |
|
{ |
2793 |
1275 |
return this.redoList; |
2794 |
|
} |
2795 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2796 |
1 |
@Override... |
2797 |
|
public VamsasSource getVamsasSource() |
2798 |
|
{ |
2799 |
1 |
return this; |
2800 |
|
} |
2801 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2802 |
4559 |
public SequenceAnnotationOrder getSortAnnotationsBy()... |
2803 |
|
{ |
2804 |
4559 |
return sortAnnotationsBy; |
2805 |
|
} |
2806 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2807 |
0 |
public void setSortAnnotationsBy(... |
2808 |
|
SequenceAnnotationOrder sortAnnotationsBy) |
2809 |
|
{ |
2810 |
0 |
this.sortAnnotationsBy = sortAnnotationsBy; |
2811 |
|
} |
2812 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2813 |
4559 |
public boolean isShowAutocalculatedAbove()... |
2814 |
|
{ |
2815 |
4559 |
return showAutocalculatedAbove; |
2816 |
|
} |
2817 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2818 |
452 |
public void setShowAutocalculatedAbove(boolean showAutocalculatedAbove)... |
2819 |
|
{ |
2820 |
452 |
this.showAutocalculatedAbove = showAutocalculatedAbove; |
2821 |
|
} |
2822 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2823 |
3 |
@Override... |
2824 |
|
public boolean isScaleProteinAsCdna() |
2825 |
|
{ |
2826 |
3 |
return viewStyle.isScaleProteinAsCdna(); |
2827 |
|
} |
2828 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2829 |
0 |
@Override... |
2830 |
|
public void setScaleProteinAsCdna(boolean b) |
2831 |
|
{ |
2832 |
0 |
viewStyle.setScaleProteinAsCdna(b); |
2833 |
|
} |
2834 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2835 |
0 |
@Override... |
2836 |
|
public boolean isProteinFontAsCdna() |
2837 |
|
{ |
2838 |
0 |
return viewStyle.isProteinFontAsCdna(); |
2839 |
|
} |
2840 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2841 |
0 |
@Override... |
2842 |
|
public void setProteinFontAsCdna(boolean b) |
2843 |
|
{ |
2844 |
0 |
viewStyle.setProteinFontAsCdna(b); |
2845 |
|
} |
2846 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2847 |
85 |
@Override... |
2848 |
|
public void setShowComplementFeatures(boolean b) |
2849 |
|
{ |
2850 |
85 |
viewStyle.setShowComplementFeatures(b); |
2851 |
|
} |
2852 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2853 |
439339 |
@Override... |
2854 |
|
public boolean isShowComplementFeatures() |
2855 |
|
{ |
2856 |
439394 |
return viewStyle.isShowComplementFeatures(); |
2857 |
|
} |
2858 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2859 |
85 |
@Override... |
2860 |
|
public void setShowComplementFeaturesOnTop(boolean b) |
2861 |
|
{ |
2862 |
85 |
viewStyle.setShowComplementFeaturesOnTop(b); |
2863 |
|
} |
2864 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2865 |
47 |
@Override... |
2866 |
|
public boolean isShowComplementFeaturesOnTop() |
2867 |
|
{ |
2868 |
47 |
return viewStyle.isShowComplementFeaturesOnTop(); |
2869 |
|
} |
2870 |
|
|
2871 |
|
|
2872 |
|
@return |
2873 |
|
|
2874 |
|
@return |
2875 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2876 |
51 |
@Override... |
2877 |
|
public final boolean isFollowHighlight() |
2878 |
|
{ |
2879 |
51 |
return followHighlight; |
2880 |
|
} |
2881 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2882 |
85 |
@Override... |
2883 |
|
public final void setFollowHighlight(boolean b) |
2884 |
|
{ |
2885 |
85 |
this.followHighlight = b; |
2886 |
|
} |
2887 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2888 |
38412 |
@Override... |
2889 |
|
public ViewportRanges getRanges() |
2890 |
|
{ |
2891 |
38412 |
return ranges; |
2892 |
|
} |
2893 |
|
|
2894 |
|
|
2895 |
|
|
2896 |
|
|
2897 |
|
|
2898 |
|
@param |
2899 |
|
|
2900 |
|
@return |
2901 |
|
|
|
|
| 74.4% |
Uncovered Elements: 11 (43) |
Complexity: 13 |
Complexity Density: 0.48 |
|
2902 |
628 |
protected int findComplementScrollTarget(SearchResultsI sr)... |
2903 |
|
{ |
2904 |
628 |
final AlignViewportI complement = getCodingComplement(); |
2905 |
628 |
if (complement == null || !complement.isFollowHighlight()) |
2906 |
|
{ |
2907 |
624 |
return 0; |
2908 |
|
} |
2909 |
4 |
boolean iAmProtein = !getAlignment().isNucleotide(); |
2910 |
4 |
AlignmentI proteinAlignment = iAmProtein ? getAlignment() |
2911 |
|
: complement.getAlignment(); |
2912 |
4 |
if (proteinAlignment == null) |
2913 |
|
{ |
2914 |
0 |
return 0; |
2915 |
|
} |
2916 |
4 |
final List<AlignedCodonFrame> mappings = proteinAlignment |
2917 |
|
.getCodonFrames(); |
2918 |
|
|
2919 |
|
|
2920 |
|
|
2921 |
|
|
2922 |
|
|
2923 |
|
|
2924 |
4 |
int seqOffset = 0; |
2925 |
4 |
SequenceI sequence = null; |
2926 |
|
|
2927 |
|
|
2928 |
|
|
2929 |
|
|
2930 |
|
|
2931 |
4 |
int middleColumn = ranges.getStartRes() |
2932 |
|
+ (ranges.getEndRes() - ranges.getStartRes()) / 2; |
2933 |
4 |
final HiddenSequences hiddenSequences = getAlignment() |
2934 |
|
.getHiddenSequences(); |
2935 |
|
|
2936 |
|
|
2937 |
|
|
2938 |
|
|
2939 |
|
|
2940 |
4 |
int lastSeq = alignment.getHeight() - 1; |
2941 |
4 |
List<AlignedCodonFrame> seqMappings = null; |
2942 |
4 |
for (int seqNo = ranges |
2943 |
4 |
.getStartSeq(); seqNo <= lastSeq; seqNo++, seqOffset++) |
2944 |
|
{ |
2945 |
4 |
sequence = getAlignment().getSequenceAt(seqNo); |
2946 |
4 |
if (hiddenSequences != null && hiddenSequences.isHidden(sequence)) |
2947 |
|
{ |
2948 |
0 |
continue; |
2949 |
|
} |
2950 |
4 |
if (Comparison.isGap(sequence.getCharAt(middleColumn))) |
2951 |
|
{ |
2952 |
0 |
continue; |
2953 |
|
} |
2954 |
4 |
seqMappings = MappingUtils.findMappingsForSequenceAndOthers(sequence, |
2955 |
|
mappings, |
2956 |
|
getCodingComplement().getAlignment().getSequences()); |
2957 |
4 |
if (!seqMappings.isEmpty()) |
2958 |
|
{ |
2959 |
4 |
break; |
2960 |
|
} |
2961 |
|
} |
2962 |
|
|
2963 |
4 |
if (sequence == null || seqMappings == null || seqMappings.isEmpty()) |
2964 |
|
{ |
2965 |
|
|
2966 |
|
|
2967 |
|
|
2968 |
0 |
return 0; |
2969 |
|
} |
2970 |
4 |
MappingUtils.addSearchResults(sr, sequence, |
2971 |
|
sequence.findPosition(middleColumn), seqMappings); |
2972 |
4 |
return seqOffset; |
2973 |
|
} |
2974 |
|
|
2975 |
|
|
2976 |
|
|
2977 |
|
|
2978 |
|
|
2979 |
|
|
2980 |
|
@param |
2981 |
|
@param |
2982 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 9 |
Complexity Density: 1.12 |
|
2983 |
0 |
public void expandColSelection(SequenceGroup sg, boolean wholewidth)... |
2984 |
|
{ |
2985 |
0 |
int sgs, sge; |
2986 |
0 |
if (sg != null && (sgs = sg.getStartRes()) >= 0 |
2987 |
|
&& sg.getStartRes() <= (sge = sg.getEndRes()) |
2988 |
|
&& !this.hasSelectedColumns()) |
2989 |
|
{ |
2990 |
0 |
if (!wholewidth && alignment.getWidth() == (1 + sge - sgs)) |
2991 |
|
{ |
2992 |
|
|
2993 |
0 |
return; |
2994 |
|
} |
2995 |
0 |
if (colSel == null) |
2996 |
|
{ |
2997 |
0 |
colSel = new ColumnSelection(); |
2998 |
|
} |
2999 |
0 |
for (int cspos = sg.getStartRes(); cspos <= sg.getEndRes(); cspos++) |
3000 |
|
{ |
3001 |
0 |
colSel.addElement(cspos); |
3002 |
|
} |
3003 |
|
} |
3004 |
|
} |
3005 |
|
|
3006 |
|
|
3007 |
|
|
3008 |
|
|
3009 |
|
private boolean selectionIsDefinedGroup = false; |
3010 |
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 5 |
Complexity Density: 0.56 |
|
3011 |
0 |
@Override... |
3012 |
|
public boolean isSelectionDefinedGroup() |
3013 |
|
{ |
3014 |
0 |
if (selectionGroup == null) |
3015 |
|
{ |
3016 |
0 |
return false; |
3017 |
|
} |
3018 |
0 |
if (isSelectionGroupChanged(true)) |
3019 |
|
{ |
3020 |
0 |
selectionIsDefinedGroup = false; |
3021 |
0 |
List<SequenceGroup> gps = alignment.getGroups(); |
3022 |
0 |
if (gps == null || gps.size() == 0) |
3023 |
|
{ |
3024 |
0 |
selectionIsDefinedGroup = false; |
3025 |
|
} |
3026 |
|
else |
3027 |
|
{ |
3028 |
0 |
selectionIsDefinedGroup = gps.contains(selectionGroup); |
3029 |
|
} |
3030 |
|
} |
3031 |
0 |
return selectionGroup.isDefined() || selectionIsDefinedGroup; |
3032 |
|
} |
3033 |
|
|
3034 |
|
|
3035 |
|
|
3036 |
|
|
3037 |
|
private SearchResultsI searchResults = null; |
3038 |
|
|
3039 |
|
protected TreeModel currentTree = null; |
3040 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3041 |
11375 |
@Override... |
3042 |
|
public boolean hasSearchResults() |
3043 |
|
{ |
3044 |
11375 |
return searchResults != null; |
3045 |
|
} |
3046 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3047 |
7 |
@Override... |
3048 |
|
public void setSearchResults(SearchResultsI results) |
3049 |
|
{ |
3050 |
7 |
searchResults = results; |
3051 |
|
} |
3052 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3053 |
44 |
@Override... |
3054 |
|
public SearchResultsI getSearchResults() |
3055 |
|
{ |
3056 |
44 |
return searchResults; |
3057 |
|
} |
3058 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3059 |
3473 |
@Override... |
3060 |
|
public ContactListI getContactList(AlignmentAnnotation _aa, int column) |
3061 |
|
{ |
3062 |
3473 |
return alignment.getContactListFor(_aa, column); |
3063 |
|
} |
3064 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3065 |
145 |
@Override... |
3066 |
|
public ContactMatrixI getContactMatrix( |
3067 |
|
AlignmentAnnotation alignmentAnnotation) |
3068 |
|
{ |
3069 |
145 |
return alignment.getContactMatrixFor(alignmentAnnotation); |
3070 |
|
} |
3071 |
|
|
3072 |
|
|
3073 |
|
|
3074 |
|
|
3075 |
|
|
3076 |
|
@return |
3077 |
|
|
|
|
| 77.8% |
Uncovered Elements: 6 (27) |
Complexity: 8 |
Complexity Density: 0.53 |
|
3078 |
1 |
public SequenceI getConsensusSeq()... |
3079 |
|
{ |
3080 |
1 |
if (consensus == null) |
3081 |
|
{ |
3082 |
0 |
updateConsensus(null); |
3083 |
|
} |
3084 |
1 |
if (consensus == null) |
3085 |
|
{ |
3086 |
0 |
return null; |
3087 |
|
} |
3088 |
1 |
StringBuffer seqs = new StringBuffer(); |
3089 |
4 |
for (int i = 0; i < consensus.annotations.length; i++) |
3090 |
|
{ |
3091 |
3 |
Annotation annotation = consensus.annotations[i]; |
3092 |
3 |
if (annotation != null) |
3093 |
|
{ |
3094 |
3 |
String description = annotation.description; |
3095 |
3 |
if (description != null && description.startsWith("[")) |
3096 |
|
{ |
3097 |
|
|
3098 |
1 |
seqs.append(description.charAt(1)); |
3099 |
|
} |
3100 |
|
else |
3101 |
|
{ |
3102 |
2 |
seqs.append(annotation.displayCharacter); |
3103 |
|
} |
3104 |
|
} |
3105 |
|
} |
3106 |
|
|
3107 |
1 |
SequenceI sq = new Sequence("Consensus", seqs.toString()); |
3108 |
1 |
sq.setDescription("Percentage Identity Consensus " |
3109 |
1 |
+ ((ignoreGapsInConsensusCalculation) ? " without gaps" : "")); |
3110 |
1 |
return sq; |
3111 |
|
} |
3112 |
|
|
|
|
| 0% |
Uncovered Elements: 27 (27) |
Complexity: 8 |
Complexity Density: 0.53 |
|
3113 |
0 |
public SequenceI getSSConsensusSeq()... |
3114 |
|
{ |
3115 |
0 |
if (secondaryStructureConsensus == null) |
3116 |
|
{ |
3117 |
0 |
updateSecondaryStructureConsensus(null); |
3118 |
|
} |
3119 |
0 |
if (secondaryStructureConsensus == null) |
3120 |
|
{ |
3121 |
0 |
return null; |
3122 |
|
} |
3123 |
0 |
StringBuffer seqs = new StringBuffer(); |
3124 |
0 |
for (int i = 0; i < secondaryStructureConsensus.annotations.length; i++) |
3125 |
|
{ |
3126 |
0 |
Annotation annotation = secondaryStructureConsensus.annotations[i]; |
3127 |
0 |
if (annotation != null) |
3128 |
|
{ |
3129 |
0 |
String description = annotation.description; |
3130 |
0 |
if (description != null && description.startsWith("[")) |
3131 |
|
{ |
3132 |
|
|
3133 |
0 |
seqs.append(description.charAt(1)); |
3134 |
|
} |
3135 |
|
else |
3136 |
|
{ |
3137 |
0 |
seqs.append(annotation.displayCharacter); |
3138 |
|
} |
3139 |
|
} |
3140 |
|
} |
3141 |
|
|
3142 |
0 |
SequenceI sq = new Sequence("Sec Str Consensus", seqs.toString()); |
3143 |
0 |
sq.setDescription("Percentage Identity Sec Str Consensus " |
3144 |
0 |
+ ((ignoreGapsInConsensusCalculation) ? " without gaps" : "")); |
3145 |
0 |
return sq; |
3146 |
|
} |
3147 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3148 |
28 |
@Override... |
3149 |
|
public void setCurrentTree(TreeModel tree) |
3150 |
|
{ |
3151 |
28 |
currentTree = tree; |
3152 |
|
} |
3153 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3154 |
50 |
@Override... |
3155 |
|
public TreeModel getCurrentTree() |
3156 |
|
{ |
3157 |
50 |
return currentTree; |
3158 |
|
} |
3159 |
|
|
|
|
| 75% |
Uncovered Elements: 4 (16) |
Complexity: 5 |
Complexity Density: 0.42 |
|
3160 |
121 |
@Override... |
3161 |
|
public AlignmentExportData getAlignExportData( |
3162 |
|
AlignExportSettingsI options) |
3163 |
|
{ |
3164 |
121 |
AlignmentI alignmentToExport = null; |
3165 |
121 |
String[] omitHidden = null; |
3166 |
121 |
alignmentToExport = null; |
3167 |
|
|
3168 |
121 |
if (hasHiddenColumns() && !options.isExportHiddenColumns()) |
3169 |
|
{ |
3170 |
0 |
omitHidden = getViewAsString(false, |
3171 |
|
options.isExportHiddenSequences()); |
3172 |
|
} |
3173 |
|
|
3174 |
121 |
int[] alignmentStartEnd = new int[2]; |
3175 |
121 |
if (hasHiddenRows() && options.isExportHiddenSequences()) |
3176 |
|
{ |
3177 |
0 |
alignmentToExport = getAlignment().getHiddenSequences() |
3178 |
|
.getFullAlignment(); |
3179 |
|
} |
3180 |
|
else |
3181 |
|
{ |
3182 |
121 |
alignmentToExport = getAlignment(); |
3183 |
|
} |
3184 |
121 |
alignmentStartEnd = getAlignment().getHiddenColumns() |
3185 |
|
.getVisibleStartAndEndIndex(alignmentToExport.getWidth()); |
3186 |
121 |
AlignmentExportData ed = new AlignmentExportData(alignmentToExport, |
3187 |
|
omitHidden, alignmentStartEnd); |
3188 |
121 |
return ed; |
3189 |
|
} |
3190 |
|
|
3191 |
|
|
3192 |
|
|
3193 |
|
|
3194 |
|
|
3195 |
|
|
3196 |
|
private boolean needToUpdateStructureViews = false; |
3197 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3198 |
0 |
@Override... |
3199 |
|
public boolean isUpdateStructures() |
3200 |
|
{ |
3201 |
0 |
return needToUpdateStructureViews; |
3202 |
|
} |
3203 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3204 |
0 |
@Override... |
3205 |
|
public void setUpdateStructures(boolean update) |
3206 |
|
{ |
3207 |
0 |
needToUpdateStructureViews = update; |
3208 |
|
} |
3209 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
3210 |
741 |
@Override... |
3211 |
|
public boolean needToUpdateStructureViews() |
3212 |
|
{ |
3213 |
741 |
boolean update = needToUpdateStructureViews; |
3214 |
741 |
needToUpdateStructureViews = false; |
3215 |
741 |
return update; |
3216 |
|
} |
3217 |
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 5 |
Complexity Density: 0.36 |
|
3218 |
0 |
@Override... |
3219 |
|
public void addSequenceGroup(SequenceGroup sequenceGroup) |
3220 |
|
{ |
3221 |
0 |
alignment.addGroup(sequenceGroup); |
3222 |
|
|
3223 |
0 |
Color col = sequenceGroup.idColour; |
3224 |
0 |
if (col != null) |
3225 |
|
{ |
3226 |
0 |
col = col.brighter(); |
3227 |
|
|
3228 |
0 |
for (SequenceI sq : sequenceGroup.getSequences()) |
3229 |
|
{ |
3230 |
0 |
setSequenceColour(sq, col); |
3231 |
|
} |
3232 |
|
} |
3233 |
|
|
3234 |
0 |
if (codingComplement != null) |
3235 |
|
{ |
3236 |
0 |
SequenceGroup mappedGroup = MappingUtils |
3237 |
|
.mapSequenceGroup(sequenceGroup, this, codingComplement); |
3238 |
0 |
if (mappedGroup.getSequences().size() > 0) |
3239 |
|
{ |
3240 |
0 |
codingComplement.getAlignment().addGroup(mappedGroup); |
3241 |
|
|
3242 |
0 |
if (col != null) |
3243 |
|
{ |
3244 |
0 |
for (SequenceI seq : mappedGroup.getSequences()) |
3245 |
|
{ |
3246 |
0 |
codingComplement.setSequenceColour(seq, col); |
3247 |
|
} |
3248 |
|
} |
3249 |
|
} |
3250 |
|
|
3251 |
0 |
codingComplement.setUpdateStructures(needToUpdateStructureViews); |
3252 |
|
} |
3253 |
|
} |
3254 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
3255 |
34 |
@Override... |
3256 |
|
public Iterator<int[]> getViewAsVisibleContigs(boolean selectedRegionOnly) |
3257 |
|
{ |
3258 |
34 |
int start = 0; |
3259 |
34 |
int end = 0; |
3260 |
34 |
if (selectedRegionOnly && selectionGroup != null) |
3261 |
|
{ |
3262 |
4 |
start = selectionGroup.getStartRes(); |
3263 |
4 |
end = selectionGroup.getEndRes() + 1; |
3264 |
|
} |
3265 |
|
else |
3266 |
|
{ |
3267 |
30 |
end = alignment.getWidth(); |
3268 |
|
} |
3269 |
34 |
return (alignment.getHiddenColumns().getVisContigsIterator(start, end, |
3270 |
|
false)); |
3271 |
|
} |
3272 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
3273 |
133 |
public void setSavedUpToDate(boolean s)... |
3274 |
|
{ |
3275 |
133 |
setSavedUpToDate(s, QuitHandler.Message.UNSAVED_CHANGES); |
3276 |
|
} |
3277 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
3278 |
452 |
public void setSavedUpToDate(boolean s, QuitHandler.Message m)... |
3279 |
|
{ |
3280 |
452 |
Console.debug( |
3281 |
|
"Setting " + this.getViewId() + " setSavedUpToDate to " + s); |
3282 |
452 |
savedUpToDate = s; |
3283 |
452 |
QuitHandler.setMessage(m); |
3284 |
|
} |
3285 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
3286 |
4 |
public boolean savedUpToDate()... |
3287 |
|
{ |
3288 |
4 |
Console.debug("Returning " + this.getViewId() + " savedUpToDate value: " |
3289 |
|
+ savedUpToDate); |
3290 |
4 |
return savedUpToDate; |
3291 |
|
} |
3292 |
|
} |