1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.datamodel; |
22 |
|
|
23 |
|
import java.util.Iterator; |
24 |
|
import java.util.NoSuchElementException; |
25 |
|
import java.util.Vector; |
26 |
|
|
27 |
|
import jalview.util.Comparison; |
28 |
|
import jalview.util.MapList; |
29 |
|
|
|
|
| 0% |
Uncovered Elements: 231 (231) |
Complexity: 75 |
Complexity Density: 0.64 |
|
30 |
|
public class Mapping |
31 |
|
{ |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@author |
37 |
|
|
38 |
|
|
|
|
| 0% |
Uncovered Elements: 88 (88) |
Complexity: 24 |
Complexity Density: 0.44 |
|
39 |
|
public class AlignedCodonIterator implements Iterator<AlignedCodon> |
40 |
|
{ |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
private final char gap; |
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
private final SequenceI alignedSeq; |
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
private int start; |
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
private int alignedColumn = 0; |
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
private int alignedBases = 0; |
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
private Iterator<int[]> fromRanges; |
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
private Iterator<int[]> toRanges; |
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
private int[] currentFromRange = null; |
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
private int[] currentToRange = null; |
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
private int fromPosition = 0; |
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
private int toPosition = 0; |
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
@param |
100 |
|
|
101 |
|
@param |
102 |
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 3 |
Complexity Density: 0.27 |
|
103 |
0 |
public AlignedCodonIterator(SequenceI seq, char gapChar)... |
104 |
|
{ |
105 |
0 |
this.alignedSeq = seq; |
106 |
0 |
this.start = seq.getStart(); |
107 |
0 |
this.gap = gapChar; |
108 |
0 |
fromRanges = map.getFromRanges().iterator(); |
109 |
0 |
toRanges = map.getToRanges().iterator(); |
110 |
0 |
if (fromRanges.hasNext()) |
111 |
|
{ |
112 |
0 |
currentFromRange = fromRanges.next(); |
113 |
0 |
fromPosition = currentFromRange[0]; |
114 |
|
} |
115 |
0 |
if (toRanges.hasNext()) |
116 |
|
{ |
117 |
0 |
currentToRange = toRanges.next(); |
118 |
0 |
toPosition = currentToRange[0]; |
119 |
|
} |
120 |
|
} |
121 |
|
|
122 |
|
|
123 |
|
|
124 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 4 |
Complexity Density: 0.8 |
|
125 |
0 |
@Override... |
126 |
|
public boolean hasNext() |
127 |
|
{ |
128 |
0 |
if (fromRanges.hasNext()) |
129 |
|
{ |
130 |
0 |
return true; |
131 |
|
} |
132 |
0 |
if (currentFromRange == null || fromPosition >= currentFromRange[1]) |
133 |
|
{ |
134 |
0 |
return false; |
135 |
|
} |
136 |
0 |
return true; |
137 |
|
} |
138 |
|
|
139 |
|
|
140 |
|
|
141 |
|
|
142 |
|
@throws |
143 |
|
|
144 |
|
@throws |
145 |
|
|
146 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
147 |
0 |
@Override... |
148 |
|
public AlignedCodon next() throws IncompleteCodonException |
149 |
|
{ |
150 |
0 |
if (!hasNext()) |
151 |
|
{ |
152 |
0 |
throw new NoSuchElementException(); |
153 |
|
} |
154 |
|
|
155 |
0 |
int[] codon = getNextCodon(); |
156 |
0 |
int[] alignedCodon = getAlignedCodon(codon); |
157 |
|
|
158 |
0 |
String peptide = getPeptide(); |
159 |
0 |
int peptideCol = toPosition - 1 - Mapping.this.to.getStart(); |
160 |
0 |
return new AlignedCodon(alignedCodon[0], alignedCodon[1], |
161 |
|
alignedCodon[2], peptide, peptideCol); |
162 |
|
} |
163 |
|
|
164 |
|
|
165 |
|
|
166 |
|
|
167 |
|
|
168 |
|
@return |
169 |
|
@throws |
170 |
|
|
171 |
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 3 |
Complexity Density: 0.3 |
|
172 |
0 |
private String getPeptide()... |
173 |
|
{ |
174 |
|
|
175 |
|
|
176 |
0 |
if (toPosition <= currentToRange[1]) |
177 |
|
{ |
178 |
0 |
SequenceI seq = Mapping.this.to; |
179 |
0 |
char pep = seq.getCharAt(toPosition - seq.getStart()); |
180 |
0 |
toPosition++; |
181 |
0 |
return String.valueOf(pep); |
182 |
|
} |
183 |
0 |
if (!toRanges.hasNext()) |
184 |
|
{ |
185 |
0 |
throw new NoSuchElementException( |
186 |
|
"Ran out of peptide at position " + toPosition); |
187 |
|
} |
188 |
0 |
currentToRange = toRanges.next(); |
189 |
0 |
toPosition = currentToRange[0]; |
190 |
0 |
return getPeptide(); |
191 |
|
} |
192 |
|
|
193 |
|
|
194 |
|
|
195 |
|
|
196 |
|
@throws |
197 |
|
|
198 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 4 |
Complexity Density: 0.4 |
|
199 |
0 |
private int[] getNextCodon()... |
200 |
|
{ |
201 |
0 |
int[] codon = new int[3]; |
202 |
0 |
int codonbase = 0; |
203 |
|
|
204 |
0 |
while (codonbase < 3) |
205 |
|
{ |
206 |
0 |
if (fromPosition <= currentFromRange[1]) |
207 |
|
{ |
208 |
|
|
209 |
|
|
210 |
|
|
211 |
0 |
codon[codonbase++] = fromPosition++; |
212 |
|
} |
213 |
|
else |
214 |
|
{ |
215 |
|
|
216 |
|
|
217 |
|
|
218 |
0 |
if (!fromRanges.hasNext()) |
219 |
|
{ |
220 |
0 |
throw new IncompleteCodonException(); |
221 |
|
} |
222 |
0 |
currentFromRange = fromRanges.next(); |
223 |
0 |
fromPosition = currentFromRange[0]; |
224 |
|
} |
225 |
|
} |
226 |
0 |
return codon; |
227 |
|
} |
228 |
|
|
229 |
|
|
230 |
|
|
231 |
|
|
232 |
|
|
233 |
|
|
234 |
|
@param |
235 |
|
@return |
236 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
237 |
0 |
private int[] getAlignedCodon(int[] codon)... |
238 |
|
{ |
239 |
0 |
int[] aligned = new int[codon.length]; |
240 |
0 |
for (int i = 0; i < codon.length; i++) |
241 |
|
{ |
242 |
0 |
aligned[i] = getAlignedColumn(codon[i]); |
243 |
|
} |
244 |
0 |
return aligned; |
245 |
|
} |
246 |
|
|
247 |
|
|
248 |
|
|
249 |
|
|
250 |
|
|
251 |
|
@param |
252 |
|
@return |
253 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 5 |
Complexity Density: 0.71 |
|
254 |
0 |
private int getAlignedColumn(int sequencePos)... |
255 |
|
{ |
256 |
|
|
257 |
|
|
258 |
|
|
259 |
0 |
int truePos = sequencePos - (start - 1); |
260 |
0 |
int length = alignedSeq.getLength(); |
261 |
0 |
while (alignedBases < truePos && alignedColumn < length) |
262 |
|
{ |
263 |
0 |
char c = alignedSeq.getCharAt(alignedColumn++); |
264 |
0 |
if (c != gap && !Comparison.isGap(c)) |
265 |
|
{ |
266 |
0 |
alignedBases++; |
267 |
|
} |
268 |
|
} |
269 |
0 |
return alignedColumn - 1; |
270 |
|
} |
271 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
272 |
0 |
@Override... |
273 |
|
public void remove() |
274 |
|
{ |
275 |
|
|
276 |
|
} |
277 |
|
|
278 |
|
} |
279 |
|
|
280 |
|
|
281 |
|
|
282 |
|
|
283 |
|
|
284 |
|
|
285 |
|
MapList map = null; |
286 |
|
|
287 |
|
|
288 |
|
|
289 |
|
|
290 |
|
SequenceI to = null; |
291 |
|
|
292 |
|
|
293 |
|
|
294 |
|
|
295 |
|
private String mappedFromId; |
296 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
297 |
0 |
public Mapping(MapList map)... |
298 |
|
{ |
299 |
0 |
super(); |
300 |
0 |
this.map = map; |
301 |
|
} |
302 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
303 |
0 |
public Mapping(SequenceI to, MapList map)... |
304 |
|
{ |
305 |
0 |
this(map); |
306 |
0 |
this.to = to; |
307 |
|
} |
308 |
|
|
309 |
|
|
310 |
|
|
311 |
|
|
312 |
|
@param |
313 |
|
|
314 |
|
@param |
315 |
|
|
316 |
|
@param |
317 |
|
|
318 |
|
|
319 |
|
@param |
320 |
|
|
321 |
|
@param |
322 |
|
|
323 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
324 |
0 |
public Mapping(SequenceI to, int[] exon, int[] is, int i, int j)... |
325 |
|
{ |
326 |
0 |
this(to, new MapList(exon, is, i, j)); |
327 |
|
} |
328 |
|
|
329 |
|
|
330 |
|
|
331 |
|
|
332 |
|
|
333 |
|
@param |
334 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 4 |
Complexity Density: 0.8 |
|
335 |
0 |
public Mapping(Mapping map2)... |
336 |
|
{ |
337 |
0 |
if (map2 != this && map2 != null) |
338 |
|
{ |
339 |
0 |
if (map2.map != null) |
340 |
|
{ |
341 |
0 |
map = new MapList(map2.map); |
342 |
|
} |
343 |
0 |
to = map2.to; |
344 |
0 |
mappedFromId = map2.mappedFromId; |
345 |
|
} |
346 |
|
} |
347 |
|
|
348 |
|
|
349 |
|
@return |
350 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
351 |
0 |
public MapList getMap()... |
352 |
|
{ |
353 |
0 |
return map; |
354 |
|
} |
355 |
|
|
356 |
|
|
357 |
|
@param |
358 |
|
|
359 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
360 |
0 |
public void setMap(MapList map)... |
361 |
|
{ |
362 |
0 |
this.map = map; |
363 |
|
} |
364 |
|
|
365 |
|
|
366 |
|
|
367 |
|
|
368 |
|
@param |
369 |
|
@return |
370 |
|
@see |
371 |
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 12 |
Complexity Density: 1 |
|
372 |
0 |
@Override... |
373 |
|
public boolean equals(Object o) |
374 |
|
{ |
375 |
0 |
if (o == null || !(o instanceof Mapping)) |
376 |
|
{ |
377 |
0 |
return false; |
378 |
|
} |
379 |
0 |
Mapping other = (Mapping) o; |
380 |
0 |
if (other == this) |
381 |
|
{ |
382 |
0 |
return true; |
383 |
|
} |
384 |
0 |
if (other.to != to) |
385 |
|
{ |
386 |
0 |
return false; |
387 |
|
} |
388 |
0 |
if ((map != null && other.map == null) |
389 |
|
|| (map == null && other.map != null)) |
390 |
|
{ |
391 |
0 |
return false; |
392 |
|
} |
393 |
0 |
if ((map == null && other.map == null) || map.equals(other.map)) |
394 |
|
{ |
395 |
0 |
return true; |
396 |
|
} |
397 |
0 |
return false; |
398 |
|
} |
399 |
|
|
400 |
|
|
401 |
|
|
402 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
403 |
0 |
@Override... |
404 |
|
public int hashCode() |
405 |
|
{ |
406 |
0 |
int hashCode = (this.to == null ? 1 : this.to.hashCode()); |
407 |
0 |
if (this.map != null) |
408 |
|
{ |
409 |
0 |
hashCode = hashCode * 31 + this.map.hashCode(); |
410 |
|
} |
411 |
|
|
412 |
0 |
return hashCode; |
413 |
|
} |
414 |
|
|
415 |
|
|
416 |
|
|
417 |
|
|
418 |
|
|
419 |
|
@param |
420 |
|
@return |
421 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
422 |
0 |
public int getPosition(int mpos)... |
423 |
|
{ |
424 |
0 |
if (map != null) |
425 |
|
{ |
426 |
0 |
int[] mp = map.shiftTo(mpos); |
427 |
0 |
if (mp != null) |
428 |
|
{ |
429 |
0 |
return mp[0]; |
430 |
|
} |
431 |
|
} |
432 |
0 |
return mpos; |
433 |
|
} |
434 |
|
|
435 |
|
|
436 |
|
|
437 |
|
|
438 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
439 |
0 |
public int getWidth()... |
440 |
|
{ |
441 |
0 |
if (map != null) |
442 |
|
{ |
443 |
0 |
return map.getFromRatio(); |
444 |
|
} |
445 |
0 |
return 1; |
446 |
|
} |
447 |
|
|
448 |
|
|
449 |
|
|
450 |
|
|
451 |
|
@return |
452 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
453 |
0 |
public int getMappedWidth()... |
454 |
|
{ |
455 |
0 |
if (map != null) |
456 |
|
{ |
457 |
0 |
return map.getToRatio(); |
458 |
|
} |
459 |
0 |
return 1; |
460 |
|
} |
461 |
|
|
462 |
|
|
463 |
|
|
464 |
|
|
465 |
|
|
466 |
|
@param |
467 |
|
@return |
468 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
469 |
0 |
public int getMappedPosition(int pos)... |
470 |
|
{ |
471 |
0 |
if (map != null) |
472 |
|
{ |
473 |
0 |
int[] mp = map.shiftFrom(pos); |
474 |
0 |
if (mp != null) |
475 |
|
{ |
476 |
0 |
return mp[0]; |
477 |
|
} |
478 |
|
} |
479 |
0 |
return pos; |
480 |
|
} |
481 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
482 |
0 |
public int[] getMappedWord(int pos)... |
483 |
|
{ |
484 |
0 |
if (map != null) |
485 |
|
{ |
486 |
0 |
int[] mp = map.shiftFrom(pos); |
487 |
0 |
if (mp != null) |
488 |
|
{ |
489 |
0 |
return new int[] { mp[0], mp[0] + mp[2] * (map.getToRatio() - 1) }; |
490 |
|
} |
491 |
|
} |
492 |
0 |
return null; |
493 |
|
} |
494 |
|
|
495 |
|
|
496 |
|
|
497 |
|
|
498 |
|
|
499 |
|
@param |
500 |
|
@return |
501 |
|
|
|
|
| 0% |
Uncovered Elements: 20 (20) |
Complexity: 5 |
Complexity Density: 0.42 |
|
502 |
0 |
public SequenceFeature[] locateFeature(SequenceFeature f)... |
503 |
|
{ |
504 |
0 |
if (true) |
505 |
|
{ |
506 |
0 |
if (map != null) |
507 |
|
{ |
508 |
0 |
int[] frange = map.locateInFrom(f.getBegin(), f.getEnd()); |
509 |
0 |
if (frange == null) |
510 |
|
{ |
511 |
|
|
512 |
0 |
return null; |
513 |
|
} |
514 |
0 |
SequenceFeature[] vf = new SequenceFeature[frange.length / 2]; |
515 |
0 |
for (int i = 0, v = 0; i < frange.length; i += 2, v++) |
516 |
|
{ |
517 |
0 |
vf[v] = new SequenceFeature(f, frange[i], frange[i + 1], |
518 |
|
f.getFeatureGroup(), f.getScore()); |
519 |
0 |
if (frange.length > 2) |
520 |
|
{ |
521 |
0 |
vf[v].setDescription(f.getDescription() + "\nPart " + (v + 1)); |
522 |
|
} |
523 |
|
} |
524 |
0 |
return vf; |
525 |
|
} |
526 |
|
} |
527 |
|
|
528 |
|
|
529 |
0 |
return new SequenceFeature[] { f }; |
530 |
|
} |
531 |
|
|
532 |
|
|
533 |
|
|
534 |
|
|
535 |
|
|
536 |
|
@param |
537 |
|
@param |
538 |
|
@return |
539 |
|
|
540 |
|
|
|
|
| 0% |
Uncovered Elements: 28 (28) |
Complexity: 9 |
Complexity Density: 0.75 |
|
541 |
0 |
public int[] locateRange(int from, int to)... |
542 |
|
{ |
543 |
0 |
if (map != null) |
544 |
|
{ |
545 |
0 |
if (from <= to) |
546 |
|
{ |
547 |
0 |
from = (map.getToLowest() < from) ? from : map.getToLowest(); |
548 |
0 |
to = (map.getToHighest() > to) ? to : map.getToHighest(); |
549 |
0 |
if (from > to) |
550 |
|
{ |
551 |
0 |
return null; |
552 |
|
} |
553 |
|
} |
554 |
|
else |
555 |
|
{ |
556 |
0 |
from = (map.getToHighest() > from) ? from : map.getToHighest(); |
557 |
0 |
to = (map.getToLowest() < to) ? to : map.getToLowest(); |
558 |
0 |
if (from < to) |
559 |
|
{ |
560 |
0 |
return null; |
561 |
|
} |
562 |
|
} |
563 |
0 |
return map.locateInFrom(from, to); |
564 |
|
} |
565 |
0 |
return new int[] { from, to }; |
566 |
|
} |
567 |
|
|
568 |
|
|
569 |
|
|
570 |
|
|
571 |
|
|
572 |
|
@param |
573 |
|
@param |
574 |
|
@return |
575 |
|
|
|
|
| 0% |
Uncovered Elements: 28 (28) |
Complexity: 9 |
Complexity Density: 0.75 |
|
576 |
0 |
public int[] locateMappedRange(int from, int to)... |
577 |
|
{ |
578 |
0 |
if (map != null) |
579 |
|
{ |
580 |
|
|
581 |
0 |
if (from <= to) |
582 |
|
{ |
583 |
0 |
from = (map.getFromLowest() < from) ? from : map.getFromLowest(); |
584 |
0 |
to = (map.getFromHighest() > to) ? to : map.getFromHighest(); |
585 |
0 |
if (from > to) |
586 |
|
{ |
587 |
0 |
return null; |
588 |
|
} |
589 |
|
} |
590 |
|
else |
591 |
|
{ |
592 |
0 |
from = (map.getFromHighest() > from) ? from : map.getFromHighest(); |
593 |
0 |
to = (map.getFromLowest() < to) ? to : map.getFromLowest(); |
594 |
0 |
if (from < to) |
595 |
|
{ |
596 |
0 |
return null; |
597 |
|
} |
598 |
|
} |
599 |
0 |
return map.locateInTo(from, to); |
600 |
|
} |
601 |
0 |
return new int[] { from, to }; |
602 |
|
} |
603 |
|
|
604 |
|
|
605 |
|
|
606 |
|
|
607 |
|
|
608 |
|
@param |
609 |
|
@return |
610 |
|
|
|
|
| 0% |
Uncovered Elements: 41 (41) |
Complexity: 8 |
Complexity Density: 0.3 |
|
611 |
0 |
public Mapping intersectVisContigs(int[] viscontigs)... |
612 |
|
{ |
613 |
0 |
Mapping copy = new Mapping(this); |
614 |
0 |
if (map != null) |
615 |
|
{ |
616 |
0 |
int vpos = 0; |
617 |
0 |
int apos = 0; |
618 |
0 |
Vector toRange = new Vector(); |
619 |
0 |
Vector fromRange = new Vector(); |
620 |
0 |
for (int vc = 0; vc < viscontigs.length; vc += 2) |
621 |
|
{ |
622 |
|
|
623 |
0 |
int[] mpr = locateMappedRange(1 + viscontigs[vc], |
624 |
|
viscontigs[vc + 1] - 1); |
625 |
0 |
if (mpr != null) |
626 |
|
{ |
627 |
0 |
for (int m = 0; m < mpr.length; m += 2) |
628 |
|
{ |
629 |
0 |
toRange.addElement(new int[] { mpr[m], mpr[m + 1] }); |
630 |
0 |
int[] xpos = locateRange(mpr[m], mpr[m + 1]); |
631 |
0 |
for (int x = 0; x < xpos.length; x += 2) |
632 |
|
{ |
633 |
0 |
fromRange.addElement(new int[] { xpos[x], xpos[x + 1] }); |
634 |
|
} |
635 |
|
} |
636 |
|
} |
637 |
|
} |
638 |
0 |
int[] from = new int[fromRange.size() * 2]; |
639 |
0 |
int[] to = new int[toRange.size() * 2]; |
640 |
0 |
int[] r; |
641 |
0 |
for (int f = 0, fSize = fromRange.size(); f < fSize; f++) |
642 |
|
{ |
643 |
0 |
r = (int[]) fromRange.elementAt(f); |
644 |
0 |
from[f * 2] = r[0]; |
645 |
0 |
from[f * 2 + 1] = r[1]; |
646 |
|
} |
647 |
0 |
for (int f = 0, fSize = toRange.size(); f < fSize; f++) |
648 |
|
{ |
649 |
0 |
r = (int[]) toRange.elementAt(f); |
650 |
0 |
to[f * 2] = r[0]; |
651 |
0 |
to[f * 2 + 1] = r[1]; |
652 |
|
} |
653 |
0 |
copy.setMap( |
654 |
|
new MapList(from, to, map.getFromRatio(), map.getToRatio())); |
655 |
|
} |
656 |
0 |
return copy; |
657 |
|
} |
658 |
|
|
659 |
|
|
660 |
|
|
661 |
|
|
662 |
|
@return |
663 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
664 |
0 |
public SequenceI getTo()... |
665 |
|
{ |
666 |
0 |
return to; |
667 |
|
} |
668 |
|
|
669 |
|
|
670 |
|
|
671 |
|
|
672 |
|
@param |
673 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
674 |
0 |
public void setTo(SequenceI tto)... |
675 |
|
{ |
676 |
0 |
to = tto; |
677 |
|
} |
678 |
|
|
679 |
|
|
680 |
|
|
681 |
|
|
682 |
|
|
683 |
|
@param |
684 |
|
|
685 |
|
@param |
686 |
|
@return |
687 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
688 |
0 |
public Iterator<AlignedCodon> getCodonIterator(SequenceI seq,... |
689 |
|
char gapChar) |
690 |
|
{ |
691 |
0 |
return new AlignedCodonIterator(seq, gapChar); |
692 |
|
} |
693 |
|
|
694 |
|
|
695 |
|
|
696 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
697 |
0 |
@Override... |
698 |
|
public String toString() |
699 |
|
{ |
700 |
0 |
return String.format("%s %s", this.map.toString(), |
701 |
0 |
this.to == null ? "" : this.to.getName()); |
702 |
|
} |
703 |
|
|
704 |
|
|
705 |
|
|
706 |
|
|
707 |
|
@return |
708 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
709 |
0 |
public String getMappedFromId()... |
710 |
|
{ |
711 |
0 |
return mappedFromId; |
712 |
|
} |
713 |
|
|
714 |
|
|
715 |
|
|
716 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
717 |
0 |
public void setMappedFromId(String mappedFromId)... |
718 |
|
{ |
719 |
0 |
this.mappedFromId = mappedFromId; |
720 |
|
} |
721 |
|
|
722 |
|
} |