*/
final Iterable<AlignmentAnnotation> matchedAlignmentAnnotations = al
.findAnnotations(seq, dsann.getCalcId(), dsann.label);
- if (matchedAlignmentAnnotations == null
- || !matchedAlignmentAnnotations.iterator().hasNext())
+ boolean found = false;
+ if (matchedAlignmentAnnotations != null)
+ {
+ for (AlignmentAnnotation matched : matchedAlignmentAnnotations)
+ {
+ if (dsann.description.equals(matched.description))
+ {
+ found = true;
+ break;
+ }
+ }
+ }
+ if (!found)
{
result.add(dsann);
if (labelForCalcId != null)
}
}
+ public static AlignmentAnnotation getFirstSequenceAnnotationOfType(
+ AlignmentI al, int graphType)
+ {
+ AlignmentAnnotation[] anns = al.getAlignmentAnnotation();
+ if (anns != null)
+ {
+ for (AlignmentAnnotation aa : anns)
+ {
+ if (aa.sequenceRef != null && aa.graph == graphType)
+ return aa;
+ }
+ }
+ return null;
+ }
+
/**
* Returns true if either sequence has a cross-reference to the other
*