{
continue;
}
+ String typename, calcName;
AlignmentAnnotation annot = createAnnotationRowsForScores(
ourAnnot,
- service.serviceType + " (" + scr.getMethod() + ")",
- service.getServiceTypeURI() + "/" + scr.getMethod(),
+ typename = service.serviceType + " ("
+ + scr.getMethod() + ")",
+ calcName = service.getServiceTypeURI() + "/"
+ + scr.getMethod(),
aseq, base + 1, scr);
annot.graph = AlignmentAnnotation.LINE_GRAPH;
}
}
annot._linecolour = col;
+ // finally, update any dataset annotation
+ replaceAnnotationOnAlignmentWith(annot, typename, calcName,
+ aseq);
}
}
}
return annotation;
}
+ protected void replaceAnnotationOnAlignmentWith(
+ AlignmentAnnotation newAnnot, String typeName, String calcId,
+ SequenceI aSeq)
+ {
+ SequenceI dsseq = aSeq.getDatasetSequence();
+ while (dsseq.getDatasetSequence() != null)
+ {
+ dsseq = dsseq.getDatasetSequence();
+ }
+ // look for same annotation on dataset and lift this one over
+ List<AlignmentAnnotation> dsan = dsseq.getAlignmentAnnotations(calcId,
+ typeName);
+ if (dsan != null && dsan.size() > 0)
+ {
+ for (AlignmentAnnotation dssan : dsan)
+ {
+ dsseq.removeAlignmentAnnotation(dssan);
+ }
+ }
+ AlignmentAnnotation dssan = new AlignmentAnnotation(newAnnot);
+ dsseq.addAlignmentAnnotation(dssan);
+ dssan.adjustForAlignment();
+ }
+
private void constructAnnotationFromScore(AlignmentAnnotation annotation,
int base, int alWidth, Score scr)
{