Simple datamodel for RNAalifold.exe output and method to convert from
[jabaws.git] / testsrc / compbio / data / sequence / SequenceUtilTester.java
index e646c1e..25c81a1 100644 (file)
@@ -140,6 +140,37 @@ public class SequenceUtilTester {
                }\r
        }\r
 \r
+       // Potential Bug :- Sequence names are shortened to 2-3 letters\r
+       @Test\r
+       public void testReadFastaWriteClustal() {\r
+               \r
+               try {\r
+                       FileInputStream fio = new FileInputStream(\r
+                                       AllTestSuit.TEST_DATA_PATH + "TO1381.fasta");\r
+                       assertNotNull(fio);\r
+                       List<FastaSequence> fseqs = SequenceUtil.readFasta(fio);\r
+                       assertNotNull(fseqs);\r
+                       fio.close();\r
+                       \r
+                       char gapChar = '-';\r
+                       FileOutputStream fou = new FileOutputStream(\r
+                                       AllTestSuit.TEST_DATA_PATH + "TO1381.aln.written");\r
+                       SequenceUtil.writeClustal(fou, fseqs, gapChar);\r
+                       fou.close();\r
+                       \r
+               } catch (FileNotFoundException e) {\r
+                       e.printStackTrace();\r
+                       fail(e.getLocalizedMessage());\r
+               } catch (IOException e) {\r
+                       e.printStackTrace();\r
+                       fail(e.getLocalizedMessage());\r
+               }\r
+       }               \r
+               \r
+                       \r
+\r
+                       \r
+       \r
        /**\r
         * This test tests the loading of horizontally formatted Jronn output file\r
         */\r
@@ -409,3 +440,4 @@ public class SequenceUtilTester {
                }\r
        }\r
 }\r
+\r