public Iterable<AlignmentAnnotation> findAnnotations(SequenceI seq,
String calcId, String label)
{
- return AlignmentAnnotation.findAnnotations(
- Arrays.asList(getAlignmentAnnotation()), seq, calcId, label);
+ return annotations == null ? null
+ : AlignmentAnnotation.findAnnotations(
+ Arrays.asList(getAlignmentAnnotation()), seq, calcId,
+ label);
}
@Override
}
@Override
+ public ContactMatrixI getContactMatrixFor(AlignmentAnnotation ann)
+ {
+ return cmholder.getContactMatrixFor(ann);
+ }
+
+ @Override
public ContactListI getContactListFor(AlignmentAnnotation _aa, int column)
{
- return cmholder.getContactListFor(_aa, column);
+ ContactListI cl = cmholder.getContactListFor(_aa, column);
+ if (cl == null && _aa.groupRef != null)
+ {
+ cl = _aa.groupRef.getContactListFor(_aa, column);
+ }
+ if (cl == null && _aa.sequenceRef != null)
+ {
+ cl = _aa.sequenceRef.getContactListFor(_aa, column);
+ if (cl == null && _aa.sequenceRef.getDatasetSequence() != null)
+ {
+ _aa.sequenceRef.getDatasetSequence().getContactListFor(_aa, column);
+ }
+ }
+ return cl;
}
@Override
addAnnotation(aa);
return aa;
}
+
+ @Override
+ public void addContactListFor(AlignmentAnnotation annotation,
+ ContactMatrixI cm)
+ {
+ cmholder.addContactListFor(annotation, cm);
+
+ }
}