JAL-3365 per-sequence secondary structure symbol ‘X’ is not properly exported and...
authorJim Procter <j.procter@dundee.ac.uk>
Sat, 16 Apr 2022 12:38:11 +0000 (13:38 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Mon, 18 Apr 2022 12:28:48 +0000 (13:28 +0100)
examples/PF001426_full.stk [new file with mode: 0644]
src/jalview/io/StockholmFile.java
test/jalview/io/StockholmFileTest.java

diff --git a/examples/PF001426_full.stk b/examples/PF001426_full.stk
new file mode 100644 (file)
index 0000000..dd484f1
Binary files /dev/null and b/examples/PF001426_full.stk differ
index 5d645ca..22690a4 100644 (file)
@@ -1170,6 +1170,14 @@ public class StockholmFile extends AlignFile
             : (annot.displayCharacter == null
                     ? String.valueOf(annot.secondaryStructure)
                     : annot.displayCharacter);
+
+    if (annot != null && annot.displayCharacter != null
+            && " X".equals(annot.displayCharacter))
+    {
+      // set a breakpoint here to catch output of 'X' which is currently a
+      // failing test case
+      // System.out.println("foo");
+    }
     if (ch == null)
     {
       ch = " ";
index b1995ab..8b52f50 100644 (file)
@@ -61,6 +61,7 @@ public class StockholmFileTest
   }
 
   static String PfamFile = "examples/PF00111_seed.stk",
+          PfamFile2 = "examples/PF001426_full.stk",
           RfamFile = "examples/RF00031_folded.stk",
           RnaSSTestFile = "examples/rna_ss_test.stk";
 
@@ -69,6 +70,8 @@ public class StockholmFileTest
   {
     testFileIOwithFormat(new File(PfamFile), FileFormat.Stockholm, -1, 0,
             false, false, false);
+    testFileIOwithFormat(new File(PfamFile2), FileFormat.Stockholm, -1, 0,
+            false, false, false);
   }
 
   @Test(groups = { "Functional" })