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