JAL-1270 more fix for failing Functional test
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 13 Apr 2016 14:39:19 +0000 (15:39 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 13 Apr 2016 14:39:19 +0000 (15:39 +0100)
src/MCview/PDBChain.java
test/MCview/PDBChainTest.java
test/jalview/ext/jmol/JmolParserTest.java
test/jalview/structure/Mapping.java
test/jalview/structure/StructureSelectionManagerTest.java

index 108ccf1..3b84ee3 100755 (executable)
@@ -394,9 +394,12 @@ public class PDBChain
                 || ResidueProperties.nucleotideIndex[nucname
                         .charAt((deoxyn ? 1 : 0))] == -1)
         {
-          seq.append("X");
-          // System.err.println("PDBReader:Null aa3Hash for " +
-          // tmpat.resName);
+            char r = ResidueProperties
+                    .getSingleCharacterCode(ResidueProperties
+                            .getCanonicalAminoAcid(tmpat.resName));
+            seq.append(r == '0' ? 'X' : r);
+            // System.err.println("PDBReader:Null aa3Hash for " +
+            // tmpat.resName);
         }
         else
         {
index 9255e5a..ff745ac 100644 (file)
@@ -32,6 +32,7 @@ import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.TaylorColourScheme;
+import jalview.structure.StructureViewSettings;
 
 import java.awt.Color;
 import java.util.Vector;
@@ -55,6 +56,7 @@ public class PDBChainTest
   public void setUp()
   {
     System.out.println("setup");
+    StructureViewSettings.setShowSeqFeatures(true);
     c = new PDBChain("1GAQ", "A");
   }
 
index a68f7c8..7ac1579 100644 (file)
@@ -50,7 +50,8 @@ public class JmolParserTest
    * 1QCF is the full PDB file including headers, HETATM etc
    */
   String[] testFile = new String[] { "./examples/1GAQ.txt",
-      "./test/jalview/ext/jmol/1xyz.pdb" };
+      "./test/jalview/ext/jmol/1xyz.pdb",
+      "./test/jalview/ext/jmol/1qcf.pdb" };
 
   //@formatter:off
   // a modified and very cut-down extract of 4UJ4
index 1630110..8674ed8 100644 (file)
@@ -250,6 +250,7 @@ public class Mapping
   @Test(groups = { "Functional" })
   public void compareTransferredToRefPDBAnnot() throws Exception
   {
+    StructureViewSettings.setShowSeqFeatures(true);
     AlignFrame ref = new FileLoader(false)
             .LoadFileWaitTillLoaded("test/jalview/ext/jmol/1QCF.pdb",
                     jalview.io.FormatAdapter.FILE);
index 3529375..999d158 100644 (file)
@@ -43,6 +43,7 @@ public class StructureSelectionManagerTest
   @BeforeMethod(alwaysRun = true)
   public void setUp()
   {
+    StructureViewSettings.setShowSeqFeatures(true);
     ssm = new StructureSelectionManager();
   }