From 39a3725d4d499eb0f1bd14e3c049cd954faddfdc Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Wed, 13 Apr 2016 15:39:19 +0100 Subject: [PATCH] JAL-1270 more fix for failing Functional test --- src/MCview/PDBChain.java | 9 ++++++--- test/MCview/PDBChainTest.java | 2 ++ test/jalview/ext/jmol/JmolParserTest.java | 3 ++- test/jalview/structure/Mapping.java | 1 + test/jalview/structure/StructureSelectionManagerTest.java | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index 108ccf1..3b84ee3 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -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 { diff --git a/test/MCview/PDBChainTest.java b/test/MCview/PDBChainTest.java index 9255e5a..ff745ac 100644 --- a/test/MCview/PDBChainTest.java +++ b/test/MCview/PDBChainTest.java @@ -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"); } diff --git a/test/jalview/ext/jmol/JmolParserTest.java b/test/jalview/ext/jmol/JmolParserTest.java index a68f7c8..7ac1579 100644 --- a/test/jalview/ext/jmol/JmolParserTest.java +++ b/test/jalview/ext/jmol/JmolParserTest.java @@ -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 diff --git a/test/jalview/structure/Mapping.java b/test/jalview/structure/Mapping.java index 1630110..8674ed8 100644 --- a/test/jalview/structure/Mapping.java +++ b/test/jalview/structure/Mapping.java @@ -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); diff --git a/test/jalview/structure/StructureSelectionManagerTest.java b/test/jalview/structure/StructureSelectionManagerTest.java index 3529375..999d158 100644 --- a/test/jalview/structure/StructureSelectionManagerTest.java +++ b/test/jalview/structure/StructureSelectionManagerTest.java @@ -43,6 +43,7 @@ public class StructureSelectionManagerTest @BeforeMethod(alwaysRun = true) public void setUp() { + StructureViewSettings.setShowSeqFeatures(true); ssm = new StructureSelectionManager(); } -- 1.7.10.2