_aa.adjustForAlignment(); // uses annotation's own record of
// sequence-column mapping
datasetSequence.addAlignmentAnnotation(_aa);
+
+ // transfer contact matrices
+ ContactMatrixI cm = getContactMatrixFor(aa);
+ if (cm != null)
+ {
+ datasetSequence.addContactListFor(_aa, cm);
+ }
}
}
}
////
//// Contact Matrix Holder Boilerplate
////
- ContactMapHolder cmholder = new ContactMapHolder();
+ ContactMapHolderI cmholder = new ContactMapHolder();
@Override
public Collection<ContactMatrixI> getContactMaps()
}
@Override
+ public ContactMatrixI getContactMatrixFor(AlignmentAnnotation ann)
+ {
+ return cmholder.getContactMatrixFor(ann);
+ }
+
+ @Override
public ContactListI getContactListFor(AlignmentAnnotation _aa, int column)
{
return cmholder.getContactListFor(_aa, column);
;
}
aa.annotations = _aa;
+ aa.setSequenceRef(this);
+ aa.createSequenceMapping(this, getStart(), false);
addAlignmentAnnotation(aa);
return aa;
}
+ @Override
+ public void addContactListFor(AlignmentAnnotation annotation,
+ ContactMatrixI cm)
+ {
+ cmholder.addContactListFor(annotation, cm);
+ }
}