if missing forward slash
authoramwaterhouse <Andrew Waterhouse>
Wed, 8 Jun 2005 16:23:11 +0000 (16:23 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 8 Jun 2005 16:23:11 +0000 (16:23 +0000)
src/jalview/io/BLCFile.java

index 687eef9..e0750d5 100755 (executable)
@@ -99,11 +99,20 @@ public class BLCFile extends AlignFile {
                             ends.addElement("0");\r
                         }\r
                     } else {\r
-                        ids.addElement(line.substring(abracket + 1,\r
-                                line.indexOf("/")));\r
-                        line = line.substring(line.indexOf("/") + 1);\r
-                        starts.addElement(line.substring(0, line.indexOf("-")));\r
-                        ends.addElement(line.substring(line.indexOf("-") + 1));\r
+                        if(line.indexOf("/")>-1)\r
+                        {\r
+                          ids.addElement(line.substring(abracket + 1,\r
+                              line.indexOf("/")));\r
+                          line = line.substring(line.indexOf("/") + 1);\r
+                          starts.addElement(line.substring(0, line.indexOf("-")));\r
+                          ends.addElement(line.substring(line.indexOf("-") + 1));\r
+                        }\r
+                        else{\r
+                          ids.addElement(line.substring(abracket+1));\r
+                          starts.addElement("0");\r
+                          ends.addElement("0");\r
+                        }\r
+\r
                     }\r
                 }\r
             } while (!idsFound);\r