JAL-2349 allow contact map to be associated with a reference sequence
authorJim Procter <j.procter@dundee.ac.uk>
Wed, 18 Aug 2021 15:39:35 +0000 (16:39 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Wed, 18 Aug 2021 15:39:35 +0000 (16:39 +0100)
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/ContactMatrix.java
src/jalview/datamodel/ContactMatrixI.java
src/jalview/datamodel/SeqDistanceContactMatrix.java

index 7f73110..9e55911 100755 (executable)
@@ -2062,6 +2062,11 @@ public class Alignment implements AlignmentI, AutoCloseable
     aa.editable = false;
     // aa.autoCalculated = true;
     contactmaps.put(aa.annotationId, cm);
+    // TODO: contact matrices could be intra or inter - more than one refseq possible! 
+    if (cm.hasReferenceSeq())
+    {
+      aa.setSequenceRef(cm.getReferenceSeq());
+    }
     addAnnotation(aa);
     return aa;
   }
index 801b292..07934a1 100644 (file)
@@ -137,4 +137,18 @@ public class ContactMatrix implements ContactMatrixI
   {
     return max;
   }
+
+  @Override
+  public boolean hasReferenceSeq()
+  {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+  @Override
+  public SequenceI getReferenceSeq()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
 }
index 2b7b4ec..c16b457 100644 (file)
@@ -9,4 +9,8 @@ public interface ContactMatrixI
 
   float getMax();
 
+  boolean hasReferenceSeq();
+
+  SequenceI getReferenceSeq();
+
 }
index 8f9bdf6..bb2299b 100644 (file)
@@ -67,4 +67,18 @@ public class SeqDistanceContactMatrix implements ContactMatrixI
     });
   }
 
+  @Override
+  public boolean hasReferenceSeq()
+  {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+  @Override
+  public SequenceI getReferenceSeq()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
 }