* visibility */
udpateCalcId(returnedAnnot);
- int graphGroup = getNextGraphGroup(viewport.getAlignment());
+ int graphGroup = viewport.getAlignment().getLastGraphGroup();
shiftGraphGroup(returnedAnnot, graphGroup);
List<AlignmentAnnotation> annotations = new ArrayList<>();
for (AlignmentAnnotation ala : returnedAnnot)
{
SequenceI seq = job.seqNames.get(ala.sequenceRef.getName());
- SequenceI aseq = getRootDatasetSequence(seq);
+ SequenceI aseq = seq.getRootDatasetSequence();
Annotation[] gappedAnnots = createGappedAnnotations(ala.annotations, job.start, job.gapMap);
ala.sequenceRef = aseq;
ala.annotations = gappedAnnots;
continue;
hasFeatures = true;
SequenceI seq = job.seqNames.get(sq.getName());
- SequenceI datasetSeq = getRootDatasetSequence(seq);
+ SequenceI datasetSeq = seq.getRootDatasetSequence();
List<ContiguousI> sourceRange = findContiguousRanges(datasetSeq, job.gapMap, job.start, job.end);
int[] sourceStartEnd = ContiguousI.toStartEndArray(sourceRange);
Mapping mp = new Mapping(new MapList(
}
}
- private static int getNextGraphGroup(AlignmentI alignment)
- {
- if (alignment == null || alignment.getAlignmentAnnotation() == null)
- return 1;
- int graphGroup = 1;
- for (AlignmentAnnotation ala : alignment.getAlignmentAnnotation())
- graphGroup = Math.max(graphGroup, ala.graphGroup);
- return graphGroup;
- }
-
private static void shiftGraphGroup(Iterable<AlignmentAnnotation> annotations, int shift)
{
for (AlignmentAnnotation ala : annotations)
}
}
- private static SequenceI getRootDatasetSequence(SequenceI sequence)
- {
- while (sequence.getDatasetSequence() != null)
- {
- sequence = sequence.getDatasetSequence();
- }
- return sequence;
- }
-
private Annotation[] createGappedAnnotations(Annotation[] annotations, int start, boolean[] gapMap)
{
var size = Math.max(viewport.getAlignment().getWidth(), gapMap.length);