Merge branch 'develop' into spike/JAL-4047/JAL-4048_columns_in_sequenceID
[jalview.git] / src / mc_view / PDBChain.java
index 6d02630..2970ccf 100755 (executable)
@@ -39,6 +39,7 @@ import jalview.schemes.ResidueProperties;
 import jalview.structure.StructureImportSettings;
 import jalview.structure.StructureMapping;
 import jalview.util.Comparison;
+import jalview.ws.datamodel.MappableContactMatrixI;
 
 public class PDBChain
 {
@@ -700,9 +701,10 @@ public class PDBChain
               ana = new AlignmentAnnotation(ana);
               ana.liftOver(dsq, sqmpping);
               dsq.addAlignmentAnnotation(ana);
-              if (cm != null)
+              if (cm != null && cm instanceof MappableContactMatrixI)
               {
-                dsq.addContactListFor(ana, cm);
+                dsq.addContactListFor(ana, ((MappableContactMatrixI) cm)
+                        .liftOver(dsq, sqmpping));
               }
             }
             else
@@ -717,8 +719,8 @@ public class PDBChain
         // Useful for debugging mappings - adds annotation for mapped position
         float min = -1, max = 0;
         Annotation[] an = new Annotation[sq.getEnd() - sq.getStart() + 1];
-        for (int i = sq.getStart(), j = sq.getEnd(),
-                k = 0; i <= j; i++, k++)
+        for (int i = sq.getStart(), j = sq
+                .getEnd(), k = 0; i <= j; i++, k++)
         {
           int prn = mapping.getPDBResNum(k + 1);