import jalview.util.DBRefUtils;
import jalview.util.MapList;
import jalview.util.StringUtils;
+import jalview.ws.datamodel.alphafold.MappableContactMatrix;
/**
*
_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);
AlignmentAnnotation aa = cmholder.addContactList(cm);
Annotation _aa[] = new Annotation[getLength()];
- Annotation dummy = new Annotation(0.0f);
- for (int i = 0; i < _aa.length; _aa[i++] = dummy)
+
+ for (int i = 0; i < _aa.length; _aa[i++] = new Annotation(0.0f))
{
;
}
aa.annotations = _aa;
+ aa.setSequenceRef(this);
+ if (cm instanceof MappableContactMatrix
+ && !((MappableContactMatrix) cm).hasReferenceSeq())
+ {
+ ((MappableContactMatrix) cm).setRefSeq(this);
+ }
+ aa.createSequenceMapping(this, getStart(), false);
addAlignmentAnnotation(aa);
return aa;
}
+ @Override
+ public void addContactListFor(AlignmentAnnotation annotation,
+ ContactMatrixI cm)
+ {
+ cmholder.addContactListFor(annotation, cm);
+ }
}