read start end if available
authoramwaterhouse <Andrew Waterhouse>
Tue, 22 Mar 2005 12:17:29 +0000 (12:17 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 22 Mar 2005 12:17:29 +0000 (12:17 +0000)
src/jalview/io/BLCFile.java

index 8db0a9a..920a12d 100755 (executable)
@@ -70,11 +70,37 @@ public class BLCFile extends AlignFile {
       if (abracket > -1)\r
       {\r
 \r
-        if(line.indexOf(" ")>-1)\r
+        if(line.indexOf(" ")>-1)//\r
         {\r
-          ids.addElement(line.substring(abracket+1, line.indexOf(" ", abracket+1)));\r
-          starts.addElement("0");\r
-          ends.addElement("0");\r
+          ///Colur it be this format?\r
+          //>54402046         0             1   137   137:\r
+          // or this??\r
+          //     1   >L1H14       30539  343\r
+          try{\r
+            ids.addElement(line.substring(abracket + 1,\r
+                                          line.indexOf(" ", abracket + 1)));\r
+\r
+\r
+            // remove p Value\r
+            line = line.substring(abracket + 1);\r
+            line = line.substring(line.indexOf(" ") + 1);\r
+            line = line.trim();\r
+            line = line.substring(line.indexOf(" ") + 1);\r
+            line = line.trim();\r
+            int value = Integer.parseInt(line.substring(0, line.indexOf(" ")));\r
+            starts.addElement(value+"");\r
+            line = line.substring(line.indexOf(" ") + 1);\r
+            line = line.trim();\r
+            value = Integer.parseInt(line.substring(0, line.indexOf(" ")));\r
+            ends.addElement(value+"");\r
+\r
+          }catch(Exception ex)\r
+          {\r
+            System.out.println("err");\r
+            starts.addElement("0");\r
+            ends.addElement("0");\r
+          }\r
+\r
         }\r
         else\r
         {\r