fix regex for annotation subtype to use non-whitespace presence rather than word...
authorjprocter <Jim Procter>
Mon, 21 Jan 2008 16:57:16 +0000 (16:57 +0000)
committerjprocter <Jim Procter>
Mon, 21 Jan 2008 16:57:16 +0000 (16:57 +0000)
src/jalview/io/StockholmFile.java

index e7b1c6e..bac1916 100644 (file)
@@ -97,7 +97,7 @@ public class StockholmFile extends AlignFile
     rend = new Regex("\\/\\/"); // Find the end of an alignment\r
     p = new Regex("(\\S+)\\/(\\d+)\\-(\\d+)"); // split sequence id in\r
                                                 // id/from/to\r
-    s = new Regex("(\\S+)\\s+(\\w{2})\\s+(.*)"); // Parses annotation subtype\r
+    s = new Regex("(\\S+)\\s+(\\S*)\\s+(.*)"); // Parses annotation subtype\r
     r = new Regex("#=(G[FSRC]?)\\s+(.*)"); // Finds any annotation line\r
     x = new Regex("(\\S+)\\s+(\\S+)"); // split id from sequence\r
 \r
@@ -432,7 +432,8 @@ public class StockholmFile extends AlignFile
           }\r
           else\r
           {\r
-            throw new IOException("Error parsing " + line);\r
+            System.err.println("Warning - couldn't parse sequence annotation row line:\n"+line);\r
+            // throw new IOException("Error parsing " + line);\r
           }\r
         }\r
         else\r