1 package jalview.ws.datamodel;
3 import jalview.datamodel.ContactListI;
4 import jalview.datamodel.ContactMatrixI;
5 import jalview.datamodel.Mapping;
6 import jalview.datamodel.SequenceI;
7 import jalview.util.MapList;
9 public interface MappableContactMatrixI extends ContactMatrixI
12 boolean hasReferenceSeq();
14 SequenceI getReferenceSeq();
17 * remaps the matrix to a new reference sequence
21 * - mapping from current reference to new reference - 1:1 only
22 * @return new ContactMatrixI instance with updated mapping
24 MappableContactMatrixI liftOver(SequenceI dsq, Mapping sqmpping);
27 * like ContactMatrixI.getContactList(int column) but
30 * - sequence or other object that this contact matrix is associated
33 * - position in localFrame
34 * @return ContactListI that returns contacts w.r.t. localFrame
37 ContactListI getMappableContactList(SequenceI localFrame, int column);
41 * Similar to AlignedCodonFrame.getMappingBetween
44 * - a reference sequence mappable to this contactMatrix - may be
46 * @return null or the MapList mapping to the coordinates of the reference
47 * sequence (or if hasReferenceSeq() is false, and sequenceRef is
48 * null, any mapping present)
51 MapList getMapFor(SequenceI sequenceRef);
54 * Locate a position in the mapped sequence for a single column in the matrix.
55 * this to resolve positions corresponding to column clusters
58 * - sequence derivced from reference sequence
61 * @return sequence position(s) corresponding to column in contact matrix
63 int[] getMappedPositionsFor(SequenceI localFrame, int column);
66 * Locate a position in the mapped sequence for a contiguous range of columns in the matrix
67 * use this to resolve positions corresponding to column clusters
70 * - sequence derivced from reference sequence
73 * @return sequence position(s) corresponding to column in contact matrix
75 int[] getMappedPositionsFor(SequenceI localFrame, int from, int to);