Merge branch 'develop' into feature/JAL-4227_Rfam2020_sslines
[jalview.git] / test / jalview / io / StockholmFileTest.java
index 6b2982d..4a047c7 100644 (file)
@@ -62,7 +62,7 @@ public class StockholmFileTest
 
   static String PfamFile = "examples/PF00111_seed.stk",
           RfamFile = "examples/RF00031_folded.stk",
-          RnaSSTestFile = "examples/rna_ss_test.stk";
+          RnaSSTestFile = "examples/rna_ss_test.stk",RnaSS_fromRfamTestFile="examples/RF00162.stk";
 
   @Test(groups = { "Functional" })
   public void pfamFileIO() throws Exception
@@ -136,27 +136,30 @@ public class StockholmFileTest
             "Couldn't find Uniprot DBRef on re-imported sequence.");
 
   }
+
   @Test(groups = { "Functional" })
   public void descriptionLineOutput() throws Exception
   {
     // quick test that sequence description is exported & reimported
 
     SequenceI sq = new Sequence("FER2_SPIOL", "AASSDDDFFF");
-    String expected_descr="This is a description !@&^%@£@";
+    String expected_descr = "This is a description !@&^%@£@";
     sq.setDescription(expected_descr);
     AppletFormatAdapter af = new AppletFormatAdapter();
     String toStockholm = af.formatSequences(FileFormat.Stockholm,
             new Alignment(new SequenceI[]
             { sq }), false);
     System.out.println(toStockholm);
-    
+
     // bleh - java.util.Regex sucks
-    assertTrue(toStockholm.contains(expected_descr),"Couldn't locate expected description srting in generated Stockholm file.");
-    
+    assertTrue(toStockholm.contains(expected_descr),
+            "Couldn't locate expected description srting in generated Stockholm file.");
+
     AlignmentI fromStockholm = af.readFile(toStockholm,
             DataSourceType.PASTE, FileFormat.Stockholm);
     SequenceI importedSeq = fromStockholm.getSequenceAt(0);
-    assertEquals( "Description did not get reimported.",expected_descr,importedSeq.getDescription());
+    assertEquals("Description did not get reimported.", expected_descr,
+            importedSeq.getDescription());
   }
 
   /**
@@ -720,6 +723,13 @@ public class StockholmFileTest
   {
     roundTripSSForRNA(aliFile, annFileFullWuss);
   }
+  
+  @Test(groups= { "Functional" })
+  public void rfamSS() throws Exception {
+    testFileIOwithFormat(new File(RnaSS_fromRfamTestFile), FileFormat.Stockholm, 2, 1,
+            false, false, false);
+  }
+
 
   @Test(groups = { "Functional" })
   public void detectWussBrackets()