}
@Override
- public ContactMatrixI getContactMatrixFor(AlignmentAnnotation ann)
+ public ContactMatrixI getContactMatrixFor(AlignmentAnnotation _aa)
{
- return cmholder.getContactMatrixFor(ann);
+ ContactMatrixI cm = cmholder.getContactMatrixFor(_aa);
+ if (cm==null && _aa.groupRef!=null)
+ {
+ cm = _aa.groupRef.getContactMatrixFor(_aa);
+ }
+ if (cm==null && _aa.sequenceRef!=null)
+ {
+ cm = _aa.sequenceRef.getContactMatrixFor(_aa);
+ if (cm==null)
+ {
+ // TODO fix up this logic and unify with getContactListFor
+ cm = _aa.sequenceRef.getDatasetSequence().getContactMatrixFor(_aa);
+ }
+ }
+ return cm;
}
@Override