JAL-2349 store/restore mappable contact matrix in project and fix up interactive...
[jalview.git] / src / jalview / ws / datamodel / MappableContactMatrixI.java
1 package jalview.ws.datamodel;
2
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;
8
9 public interface MappableContactMatrixI extends ContactMatrixI
10 {
11
12   boolean hasReferenceSeq();
13
14   SequenceI getReferenceSeq();
15   /**
16    * remaps the matrix to a new reference sequence
17    * @param dsq 
18    * @param sqmpping - mapping from current reference to new reference - 1:1 only
19    * @return new ContactMatrixI instance with updated mapping
20    */
21   MappableContactMatrixI liftOver(SequenceI dsq, Mapping sqmpping);
22   
23   /**
24    * like ContactMatrixI.getContactList(int column) but
25    * @param localFrame - sequence or other object that this contact matrix is associated with
26    * @param column - position in localFrame
27    * @return ContactListI that returns contacts w.r.t. localFrame
28    */
29   
30   ContactListI getMappableContactList(SequenceI localFrame, int column);
31
32   /**
33    * 
34    * Similar to AlignedCodonFrame.getMappingBetween 
35    * 
36    * @param sequenceRef - a reference sequence mappable to this contactMatrix - may be null
37    * @return null or the MapList mapping to the coordinates of the reference sequence (or if hasReferenceSeq() is false, and sequenceRef is null, any mapping present)
38    * 
39    */
40   MapList getMapFor(SequenceI sequenceRef);
41
42 }