JAL-2349 allow PAE or other contact matrices to hold a coordinate mapping allowing...
[jalview.git] / src / jalview / ws / datamodel / MappableContactMatrixI.java
diff --git a/src/jalview/ws/datamodel/MappableContactMatrixI.java b/src/jalview/ws/datamodel/MappableContactMatrixI.java
new file mode 100644 (file)
index 0000000..4abaa5d
--- /dev/null
@@ -0,0 +1,31 @@
+package jalview.ws.datamodel;
+
+import jalview.datamodel.ContactListI;
+import jalview.datamodel.ContactMatrixI;
+import jalview.datamodel.Mapping;
+import jalview.datamodel.SequenceI;
+
+public interface MappableContactMatrixI extends ContactMatrixI
+{
+
+  boolean hasReferenceSeq();
+
+  SequenceI getReferenceSeq();
+  /**
+   * remaps the matrix to a new reference sequence
+   * @param dsq 
+   * @param sqmpping - mapping from current reference to new reference - 1:1 only
+   * @return new ContactMatrixI instance with updated mapping
+   */
+  MappableContactMatrixI liftOver(SequenceI dsq, Mapping sqmpping);
+  
+  /**
+   * like ContactMatrixI.getContactList(int column) but
+   * @param localFrame - sequence or other object that this contact matrix is associated with
+   * @param column - position in localFrame
+   * @return ContactListI that returns contacts w.r.t. localFrame
+   */
+  
+  ContactListI getMappableContactList(SequenceI localFrame, int column);
+
+}