1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.io; |
22 |
|
|
23 |
|
import java.util.ArrayList; |
24 |
|
import java.util.Collection; |
25 |
|
import java.util.Comparator; |
26 |
|
import java.util.LinkedHashMap; |
27 |
|
import java.util.List; |
28 |
|
import java.util.Locale; |
29 |
|
import java.util.Map; |
30 |
|
|
31 |
|
import jalview.api.FeatureColourI; |
32 |
|
import jalview.datamodel.DBRefEntry; |
33 |
|
import jalview.datamodel.DBRefSource; |
34 |
|
import jalview.datamodel.GeneLociI; |
35 |
|
import jalview.datamodel.MappedFeatures; |
36 |
|
import jalview.datamodel.SequenceFeature; |
37 |
|
import jalview.datamodel.SequenceI; |
38 |
|
import jalview.util.MessageManager; |
39 |
|
import jalview.util.StringUtils; |
40 |
|
import jalview.util.UrlLink; |
41 |
|
import jalview.viewmodel.seqfeatures.FeatureRendererModel; |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
@author |
47 |
|
|
|
|
| 78.8% |
Uncovered Elements: 69 (326) |
Complexity: 91 |
Complexity Density: 0.47 |
|
48 |
|
public class SequenceAnnotationReport |
49 |
|
{ |
50 |
|
private static final int MAX_DESCRIPTION_LENGTH = 40; |
51 |
|
|
52 |
|
private static final String COMMA = ","; |
53 |
|
|
54 |
|
private static final String ELLIPSIS = "..."; |
55 |
|
|
56 |
|
private static final int MAX_REFS_PER_SOURCE = 4; |
57 |
|
|
58 |
|
private static final int MAX_SOURCES = 5; |
59 |
|
|
60 |
|
private static String linkImageURL; |
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
private static Comparator<DBRefEntry> comparator = new Comparator<DBRefEntry>() |
69 |
|
{ |
70 |
|
|
|
|
| 68.2% |
Uncovered Elements: 14 (44) |
Complexity: 16 |
Complexity Density: 0.73 |
|
71 |
24 |
@Override... |
72 |
|
public int compare(DBRefEntry ref1, DBRefEntry ref2) |
73 |
|
{ |
74 |
24 |
if (ref1 instanceof GeneLociI) |
75 |
|
{ |
76 |
0 |
return -1; |
77 |
|
} |
78 |
24 |
if (ref2 instanceof GeneLociI) |
79 |
|
{ |
80 |
0 |
return 1; |
81 |
|
} |
82 |
|
|
83 |
24 |
String s1 = ref1.getSource(); |
84 |
24 |
String s2 = ref2.getSource(); |
85 |
24 |
boolean s1Primary = DBRefSource.isPrimarySource(s1); |
86 |
24 |
boolean s2Primary = DBRefSource.isPrimarySource(s2); |
87 |
24 |
if (ref1.isCanonical() && !ref2.isCanonical()) |
88 |
|
{ |
89 |
0 |
return -1; |
90 |
|
} |
91 |
24 |
if (!ref1.isCanonical() && ref2.isCanonical()) |
92 |
|
{ |
93 |
0 |
return 1; |
94 |
|
} |
95 |
24 |
if (s1Primary && !s2Primary) |
96 |
|
{ |
97 |
14 |
return -1; |
98 |
|
} |
99 |
10 |
if (!s1Primary && s2Primary) |
100 |
|
{ |
101 |
0 |
return 1; |
102 |
|
} |
103 |
10 |
int comp = s1 == null ? -1 |
104 |
10 |
: (s2 == null ? 1 : s1.compareToIgnoreCase(s2)); |
105 |
10 |
if (comp == 0) |
106 |
|
{ |
107 |
5 |
String a1 = ref1.getAccessionId(); |
108 |
5 |
String a2 = ref2.getAccessionId(); |
109 |
5 |
comp = a1 == null ? -1 |
110 |
5 |
: (a2 == null ? 1 : a1.compareToIgnoreCase(a2)); |
111 |
|
} |
112 |
10 |
return comp; |
113 |
|
} |
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
|
123 |
|
|
124 |
|
|
125 |
|
|
126 |
|
|
127 |
|
|
128 |
|
|
129 |
|
}; |
130 |
|
|
131 |
|
private boolean forTooltip; |
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
|
136 |
|
|
137 |
|
|
138 |
|
|
139 |
|
|
140 |
|
|
141 |
|
@param |
142 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
143 |
970 |
public SequenceAnnotationReport(boolean isForTooltip)... |
144 |
|
{ |
145 |
970 |
this.forTooltip = isForTooltip; |
146 |
970 |
if (linkImageURL == null) |
147 |
|
{ |
148 |
51 |
linkImageURL = getClass().getResource("/images/link.gif").toString(); |
149 |
|
} |
150 |
|
} |
151 |
|
|
152 |
|
|
153 |
|
|
154 |
|
|
155 |
|
|
156 |
|
@param |
157 |
|
@param |
158 |
|
@param |
159 |
|
@param |
160 |
|
@param |
161 |
|
|
|
|
| 77.8% |
Uncovered Elements: 2 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
162 |
1 |
public int appendFeatures(final StringBuilder sb, int residuePos,... |
163 |
|
List<SequenceFeature> features, FeatureRendererModel fr, |
164 |
|
int maxlength) |
165 |
|
{ |
166 |
4 |
for (int i = 0; i < features.size(); i++) |
167 |
|
{ |
168 |
4 |
SequenceFeature feature = features.get(i); |
169 |
4 |
if (appendFeature(sb, residuePos, fr, feature, null, maxlength)) |
170 |
|
{ |
171 |
1 |
return features.size() - i; |
172 |
|
} |
173 |
|
} |
174 |
0 |
return 0; |
175 |
|
} |
176 |
|
|
177 |
|
|
178 |
|
|
179 |
|
|
180 |
|
|
181 |
|
|
182 |
|
@param |
183 |
|
@param |
184 |
|
@param |
185 |
|
@param |
186 |
|
@param |
187 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
188 |
0 |
public int appendFeatures(StringBuilder sb, int residuePos,... |
189 |
|
MappedFeatures mf, FeatureRendererModel fr, int maxlength) |
190 |
|
{ |
191 |
0 |
for (int i = 0; i < mf.features.size(); i++) |
192 |
|
{ |
193 |
0 |
SequenceFeature feature = mf.features.get(i); |
194 |
0 |
if (appendFeature(sb, residuePos, fr, feature, mf, maxlength)) |
195 |
|
{ |
196 |
0 |
return mf.features.size() - i; |
197 |
|
} |
198 |
|
} |
199 |
0 |
return 0; |
200 |
|
} |
201 |
|
|
202 |
|
|
203 |
|
|
204 |
|
|
205 |
|
@param |
206 |
|
@param |
207 |
|
@param |
208 |
|
@param |
209 |
|
|
|
|
| 91.8% |
Uncovered Elements: 8 (97) |
Complexity: 27 |
Complexity Density: 0.47 |
|
210 |
41 |
boolean appendFeature(final StringBuilder sb0, int rpos,... |
211 |
|
FeatureRendererModel fr, SequenceFeature feature, |
212 |
|
MappedFeatures mf, int maxlength) |
213 |
|
{ |
214 |
41 |
int begin = feature.getBegin(); |
215 |
41 |
int end = feature.getEnd(); |
216 |
|
|
217 |
|
|
218 |
|
|
219 |
|
|
220 |
|
|
221 |
41 |
int[] beginRange = null; |
222 |
41 |
int[] endRange = null; |
223 |
41 |
if (mf != null) |
224 |
|
{ |
225 |
3 |
if (feature.isContactFeature()) |
226 |
|
{ |
227 |
|
|
228 |
|
|
229 |
|
|
230 |
0 |
beginRange = mf.getMappedPositions(begin, begin); |
231 |
0 |
endRange = begin == end ? beginRange |
232 |
|
: mf.getMappedPositions(end, end); |
233 |
|
} |
234 |
|
else |
235 |
|
{ |
236 |
|
|
237 |
|
|
238 |
|
|
239 |
3 |
beginRange = mf.getMappedPositions(begin, end); |
240 |
3 |
endRange = beginRange; |
241 |
|
} |
242 |
3 |
if (beginRange == null || endRange == null) |
243 |
|
{ |
244 |
|
|
245 |
0 |
return false; |
246 |
|
} |
247 |
3 |
begin = beginRange[0]; |
248 |
3 |
end = endRange[endRange.length - 1]; |
249 |
|
} |
250 |
|
|
251 |
41 |
StringBuilder sb = new StringBuilder(); |
252 |
41 |
if (feature.isContactFeature()) |
253 |
|
{ |
254 |
|
|
255 |
|
|
256 |
|
|
257 |
3 |
boolean showContact = (mf == null) && (rpos == begin || rpos == end); |
258 |
3 |
boolean showMappedContact = (mf != null) && ((rpos >= beginRange[0] |
259 |
|
&& rpos <= beginRange[beginRange.length - 1]) |
260 |
|
|| (rpos >= endRange[0] |
261 |
|
&& rpos <= endRange[endRange.length - 1])); |
262 |
3 |
if (showContact || showMappedContact) |
263 |
|
{ |
264 |
2 |
if (sb0.length() > 6) |
265 |
|
{ |
266 |
1 |
sb.append("<br/>"); |
267 |
|
} |
268 |
2 |
sb.append(feature.getType()).append(" ").append(begin).append(":") |
269 |
|
.append(end); |
270 |
|
} |
271 |
3 |
return appendText(sb0, sb, maxlength); |
272 |
|
} |
273 |
|
|
274 |
38 |
if (sb0.length() > 6) |
275 |
|
{ |
276 |
21 |
sb.append("<br/>"); |
277 |
|
} |
278 |
|
|
279 |
38 |
boolean linkOnly = feature.getValue("linkonly") != null; |
280 |
38 |
if (!linkOnly) |
281 |
|
{ |
282 |
38 |
sb.append(feature.getType()).append(" "); |
283 |
38 |
if (rpos != 0) |
284 |
|
{ |
285 |
|
|
286 |
21 |
sb.append(begin); |
287 |
21 |
if (begin != end) |
288 |
|
{ |
289 |
19 |
sb.append(" ").append(end); |
290 |
|
} |
291 |
|
} |
292 |
|
|
293 |
38 |
String description = feature.getDescription(); |
294 |
38 |
if (description != null && !description.equals(feature.getType())) |
295 |
|
{ |
296 |
37 |
description = StringUtils.stripHtmlTags(description); |
297 |
|
|
298 |
|
|
299 |
|
|
300 |
|
|
301 |
|
|
302 |
37 |
int linkindex = description.toLowerCase(Locale.ROOT).indexOf("<a "); |
303 |
37 |
boolean hasLink = linkindex > -1 |
304 |
|
&& linkindex < MAX_DESCRIPTION_LENGTH; |
305 |
37 |
if (description.length() > MAX_DESCRIPTION_LENGTH && !hasLink) |
306 |
|
{ |
307 |
6 |
description = description.substring(0, MAX_DESCRIPTION_LENGTH) |
308 |
|
+ ELLIPSIS; |
309 |
|
} |
310 |
|
|
311 |
37 |
sb.append("; ").append(description); |
312 |
|
} |
313 |
|
|
314 |
38 |
if (showScore(feature, fr)) |
315 |
|
{ |
316 |
5 |
sb.append(" Score=").append(String.valueOf(feature.getScore())); |
317 |
|
} |
318 |
38 |
String status = (String) feature.getValue("status"); |
319 |
38 |
if (status != null && status.length() > 0) |
320 |
|
{ |
321 |
2 |
sb.append("; (").append(status).append(")"); |
322 |
|
} |
323 |
|
|
324 |
|
|
325 |
|
|
326 |
|
|
327 |
38 |
if (fr != null) |
328 |
|
{ |
329 |
27 |
FeatureColourI fc = fr.getFeatureColours().get(feature.getType()); |
330 |
27 |
if (fc != null && fc.isColourByAttribute()) |
331 |
|
{ |
332 |
5 |
String[] attName = fc.getAttributeName(); |
333 |
5 |
String attVal = feature.getValueAsString(attName); |
334 |
5 |
if (attVal != null) |
335 |
|
{ |
336 |
4 |
sb.append("; ").append(String.join(":", attName)).append("=") |
337 |
|
.append(attVal); |
338 |
|
} |
339 |
|
} |
340 |
|
} |
341 |
|
|
342 |
38 |
if (mf != null) |
343 |
|
{ |
344 |
3 |
String variants = mf.findProteinVariants(feature); |
345 |
3 |
if (!variants.isEmpty()) |
346 |
|
{ |
347 |
1 |
sb.append(" ").append(variants); |
348 |
|
} |
349 |
|
} |
350 |
|
} |
351 |
38 |
return appendText(sb0, sb, maxlength); |
352 |
|
} |
353 |
|
|
354 |
|
|
355 |
|
|
356 |
|
|
357 |
|
|
358 |
|
|
359 |
|
@param |
360 |
|
@param |
361 |
|
@param |
362 |
|
@return |
363 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
364 |
41 |
private static boolean appendText(StringBuilder sb0, StringBuilder sb,... |
365 |
|
int maxlength) |
366 |
|
{ |
367 |
41 |
if (maxlength == 0 || sb0.length() + sb.length() < maxlength) |
368 |
|
{ |
369 |
40 |
sb0.append(sb); |
370 |
40 |
return false; |
371 |
|
} |
372 |
1 |
return true; |
373 |
|
} |
374 |
|
|
375 |
|
|
376 |
|
|
377 |
|
|
378 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 6 |
Complexity Density: 0.75 |
|
379 |
38 |
boolean showScore(SequenceFeature feature, FeatureRendererModel fr)... |
380 |
|
{ |
381 |
38 |
if (Float.isNaN(feature.getScore())) |
382 |
|
{ |
383 |
11 |
return false; |
384 |
|
} |
385 |
27 |
if (fr == null) |
386 |
|
{ |
387 |
3 |
return true; |
388 |
|
} |
389 |
24 |
float[][] minMax = fr.getMinMax().get(feature.getType()); |
390 |
|
|
391 |
|
|
392 |
|
|
393 |
|
|
394 |
24 |
if (minMax == null || minMax[0] == null || minMax[0][0] == minMax[0][1]) |
395 |
|
{ |
396 |
22 |
return false; |
397 |
|
} |
398 |
2 |
return true; |
399 |
|
} |
400 |
|
|
401 |
|
|
402 |
|
|
403 |
|
|
404 |
|
|
405 |
|
@param |
406 |
|
@param |
407 |
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 5 |
Complexity Density: 0.56 |
|
408 |
0 |
void appendLinks(final StringBuffer sb, SequenceFeature feature)... |
409 |
|
{ |
410 |
0 |
if (feature.links != null) |
411 |
|
{ |
412 |
0 |
if (linkImageURL != null) |
413 |
|
{ |
414 |
0 |
sb.append(" <img src=\"" + linkImageURL + "\">"); |
415 |
|
} |
416 |
|
else |
417 |
|
{ |
418 |
0 |
for (String urlstring : feature.links) |
419 |
|
{ |
420 |
0 |
try |
421 |
|
{ |
422 |
0 |
for (List<String> urllink : createLinksFrom(null, urlstring)) |
423 |
|
{ |
424 |
0 |
sb.append("<br/> <a href=\"" + urllink.get(3) + "\" target=\"" |
425 |
|
+ urllink.get(0) + "\">" |
426 |
0 |
+ (urllink.get(0).toLowerCase(Locale.ROOT).equals( |
427 |
|
urllink.get(1).toLowerCase(Locale.ROOT)) |
428 |
|
? urllink.get(0) |
429 |
|
: (urllink.get(0) + ":" |
430 |
|
+ urllink.get(1))) |
431 |
|
+ "</a><br/>"); |
432 |
|
} |
433 |
|
} catch (Exception x) |
434 |
|
{ |
435 |
0 |
jalview.bin.Console.errPrintln( |
436 |
|
"problem when creating links from " + urlstring); |
437 |
0 |
x.printStackTrace(); |
438 |
|
} |
439 |
|
} |
440 |
|
} |
441 |
|
|
442 |
|
} |
443 |
|
} |
444 |
|
|
445 |
|
|
446 |
|
|
447 |
|
@param |
448 |
|
@param |
449 |
|
@return |
450 |
|
|
451 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
452 |
0 |
Collection<List<String>> createLinksFrom(SequenceI seq, String link)... |
453 |
|
{ |
454 |
0 |
Map<String, List<String>> urlSets = new LinkedHashMap<>(); |
455 |
0 |
UrlLink urlLink = new UrlLink(link); |
456 |
0 |
if (!urlLink.isValid()) |
457 |
|
{ |
458 |
0 |
jalview.bin.Console.errPrintln(urlLink.getInvalidMessage()); |
459 |
0 |
return null; |
460 |
|
} |
461 |
|
|
462 |
0 |
urlLink.createLinksFromSeq(seq, urlSets); |
463 |
|
|
464 |
0 |
return urlSets.values(); |
465 |
|
} |
466 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
467 |
10 |
public void createSequenceAnnotationReport(final StringBuilder tip,... |
468 |
|
SequenceI sequence, boolean showDbRefs, boolean showNpFeats, |
469 |
|
FeatureRendererModel fr) |
470 |
|
{ |
471 |
10 |
createSequenceAnnotationReport(tip, sequence, showDbRefs, showNpFeats, |
472 |
|
fr, false); |
473 |
|
} |
474 |
|
|
475 |
|
|
476 |
|
|
477 |
|
|
478 |
|
|
479 |
|
@param |
480 |
|
|
481 |
|
@param |
482 |
|
|
483 |
|
@param |
484 |
|
|
485 |
|
@param |
486 |
|
|
487 |
|
@param |
488 |
|
@param |
489 |
|
@return |
490 |
|
|
|
|
| 93.3% |
Uncovered Elements: 2 (30) |
Complexity: 5 |
Complexity Density: 0.23 |
|
491 |
11 |
int createSequenceAnnotationReport(final StringBuilder sb,... |
492 |
|
SequenceI sequence, boolean showDbRefs, boolean showNpFeats, |
493 |
|
FeatureRendererModel fr, boolean summary) |
494 |
|
{ |
495 |
11 |
String tmp; |
496 |
11 |
sb.append("<i>"); |
497 |
|
|
498 |
11 |
int maxWidth = 0; |
499 |
11 |
if (sequence.getDescription() != null) |
500 |
|
{ |
501 |
10 |
tmp = sequence.getDescription(); |
502 |
10 |
sb.append(tmp); |
503 |
10 |
maxWidth = Math.max(maxWidth, tmp.length()); |
504 |
|
} |
505 |
11 |
sb.append("\n"); |
506 |
11 |
SequenceI ds = sequence; |
507 |
11 |
while (ds.getDatasetSequence() != null) |
508 |
|
{ |
509 |
0 |
ds = ds.getDatasetSequence(); |
510 |
|
} |
511 |
|
|
512 |
11 |
if (showDbRefs) |
513 |
|
{ |
514 |
9 |
maxWidth = Math.max(maxWidth, appendDbRefs(sb, ds, summary)); |
515 |
|
} |
516 |
11 |
sb.append("\n"); |
517 |
|
|
518 |
|
|
519 |
|
|
520 |
|
|
521 |
11 |
if (showNpFeats) |
522 |
|
{ |
523 |
9 |
for (SequenceFeature sf : sequence.getFeatures() |
524 |
|
.getNonPositionalFeatures()) |
525 |
|
{ |
526 |
17 |
int sz = -sb.length(); |
527 |
17 |
appendFeature(sb, 0, fr, sf, null, 0); |
528 |
17 |
sz += sb.length(); |
529 |
17 |
maxWidth = Math.max(maxWidth, sz); |
530 |
|
} |
531 |
|
} |
532 |
11 |
sb.append("</i>"); |
533 |
11 |
return maxWidth; |
534 |
|
} |
535 |
|
|
536 |
|
|
537 |
|
|
538 |
|
|
539 |
|
|
540 |
|
@param |
541 |
|
@param |
542 |
|
@param |
543 |
|
@return |
544 |
|
|
|
|
| 97.1% |
Uncovered Elements: 2 (70) |
Complexity: 16 |
Complexity Density: 0.32 |
|
545 |
9 |
protected int appendDbRefs(final StringBuilder sb, SequenceI ds,... |
546 |
|
boolean summary) |
547 |
|
{ |
548 |
9 |
List<DBRefEntry> dbrefs, dbrefset = ds.getDBRefs(); |
549 |
|
|
550 |
9 |
if (dbrefset == null) |
551 |
|
{ |
552 |
6 |
return 0; |
553 |
|
} |
554 |
|
|
555 |
|
|
556 |
|
|
557 |
3 |
dbrefs = new ArrayList<DBRefEntry>(); |
558 |
|
|
559 |
3 |
dbrefs.addAll(dbrefset); |
560 |
|
|
561 |
|
|
562 |
3 |
dbrefs.sort(comparator); |
563 |
3 |
boolean ellipsis = false; |
564 |
3 |
String source = null; |
565 |
3 |
String lastSource = null; |
566 |
3 |
int countForSource = 0; |
567 |
3 |
int sourceCount = 0; |
568 |
3 |
boolean moreSources = false; |
569 |
3 |
int maxLineLength = 0; |
570 |
3 |
int lineLength = 0; |
571 |
|
|
572 |
3 |
for (DBRefEntry ref : dbrefs) |
573 |
|
{ |
574 |
14 |
source = ref.getSource(); |
575 |
14 |
if (source == null) |
576 |
|
{ |
577 |
|
|
578 |
0 |
continue; |
579 |
|
} |
580 |
14 |
boolean sourceChanged = !source.equals(lastSource); |
581 |
14 |
if (sourceChanged) |
582 |
|
{ |
583 |
10 |
lineLength = 0; |
584 |
10 |
countForSource = 0; |
585 |
10 |
sourceCount++; |
586 |
|
} |
587 |
14 |
if (sourceCount > MAX_SOURCES && summary) |
588 |
|
{ |
589 |
1 |
ellipsis = true; |
590 |
1 |
moreSources = true; |
591 |
1 |
break; |
592 |
|
} |
593 |
13 |
lastSource = source; |
594 |
13 |
countForSource++; |
595 |
13 |
if (countForSource == 1 || !summary) |
596 |
|
{ |
597 |
9 |
sb.append("<br/>\n"); |
598 |
|
} |
599 |
13 |
if (countForSource <= MAX_REFS_PER_SOURCE || !summary) |
600 |
|
{ |
601 |
12 |
String accessionId = ref.getAccessionId(); |
602 |
12 |
lineLength += accessionId.length() + 1; |
603 |
12 |
if (countForSource > 1 && summary) |
604 |
|
{ |
605 |
3 |
sb.append(",\n ").append(accessionId); |
606 |
3 |
lineLength++; |
607 |
|
} |
608 |
|
else |
609 |
|
{ |
610 |
9 |
sb.append(source).append(" ").append(accessionId); |
611 |
9 |
lineLength += source.length(); |
612 |
|
} |
613 |
12 |
maxLineLength = Math.max(maxLineLength, lineLength); |
614 |
|
} |
615 |
13 |
if (countForSource == MAX_REFS_PER_SOURCE && summary) |
616 |
|
{ |
617 |
1 |
sb.append(COMMA).append(ELLIPSIS); |
618 |
1 |
ellipsis = true; |
619 |
|
} |
620 |
|
} |
621 |
3 |
if (moreSources) |
622 |
|
{ |
623 |
1 |
sb.append("<br/>\n").append(source).append(COMMA).append(ELLIPSIS); |
624 |
|
} |
625 |
3 |
if (ellipsis) |
626 |
|
{ |
627 |
1 |
sb.append("<br/>\n("); |
628 |
1 |
sb.append(MessageManager.getString("label.output_seq_details")); |
629 |
1 |
sb.append(")"); |
630 |
|
} |
631 |
|
|
632 |
3 |
return maxLineLength; |
633 |
|
} |
634 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
635 |
0 |
public void createTooltipAnnotationReport(final StringBuilder tip,... |
636 |
|
SequenceI sequence, boolean showDbRefs, boolean showNpFeats, |
637 |
|
FeatureRendererModel fr) |
638 |
|
{ |
639 |
0 |
int maxWidth = createSequenceAnnotationReport(tip, sequence, showDbRefs, |
640 |
|
showNpFeats, fr, true); |
641 |
|
|
642 |
0 |
if (maxWidth > 60) |
643 |
|
{ |
644 |
|
|
645 |
|
|
646 |
|
|
647 |
|
} |
648 |
|
} |
649 |
|
} |