JAL-674 patch test to verify presence of annotation on the sequence associated with...
authorJim Procter <jprocter@dundee.ac.uk>
Thu, 30 Oct 2014 15:24:00 +0000 (15:24 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Thu, 30 Oct 2014 15:24:00 +0000 (15:24 +0000)
test/jalview/structure/Mapping.java

index cd7fafe..4dfd1af 100644 (file)
@@ -47,15 +47,6 @@ public class Mapping
         // annotation on the associated sequence
         for (AlignmentAnnotation alan : firstChain.getAnnotation())
         {
-          if (alan.hasIcons)
-          {
-            hasSecStr = true;
-          }
-          if (alan.graph == alan.LINE_GRAPH)
-          {
-            hasTemp = true;
-          }
-
           AlignmentAnnotation transfer = origMap.transfer(alan);
           System.out.println("pdb:" + firstChain.getSequenceAsString());
           System.out.println("ann:" + alan.toString());
@@ -96,6 +87,20 @@ public class Mapping
         }
       }
     }
+    hasSecStr = false;
+    hasTemp = false;
+    // test for presence of transferred annotation on sequence
+    for (AlignmentAnnotation alan : sq.getAnnotation())
+    {
+      if (alan.hasIcons)
+      {
+        hasSecStr = true;
+      }
+      if (alan.graph == alan.LINE_GRAPH)
+      {
+        hasTemp = true;
+      }
+    }
     assertTrue("No secondary structure transferred to associated sequence.",hasSecStr);
     assertTrue("No temperature factor transferred to associated sequence.",hasTemp);
   }