From: amwaterhouse Date: Tue, 22 Mar 2005 12:17:29 +0000 (+0000) Subject: read start end if available X-Git-Tag: Release_2_0~527 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e96fc72825d181bbb0dede55a0bca7aa4e64232d;p=jalview.git read start end if available --- diff --git a/src/jalview/io/BLCFile.java b/src/jalview/io/BLCFile.java index 8db0a9a..920a12d 100755 --- a/src/jalview/io/BLCFile.java +++ b/src/jalview/io/BLCFile.java @@ -70,11 +70,37 @@ public class BLCFile extends AlignFile { if (abracket > -1) { - if(line.indexOf(" ")>-1) + if(line.indexOf(" ")>-1)// { - ids.addElement(line.substring(abracket+1, line.indexOf(" ", abracket+1))); - starts.addElement("0"); - ends.addElement("0"); + ///Colur it be this format? + //>54402046 0 1 137 137: + // or this?? + // 1 >L1H14 30539 343 + try{ + ids.addElement(line.substring(abracket + 1, + line.indexOf(" ", abracket + 1))); + + + // remove p Value + line = line.substring(abracket + 1); + line = line.substring(line.indexOf(" ") + 1); + line = line.trim(); + line = line.substring(line.indexOf(" ") + 1); + line = line.trim(); + int value = Integer.parseInt(line.substring(0, line.indexOf(" "))); + starts.addElement(value+""); + line = line.substring(line.indexOf(" ") + 1); + line = line.trim(); + value = Integer.parseInt(line.substring(0, line.indexOf(" "))); + ends.addElement(value+""); + + }catch(Exception ex) + { + System.out.println("err"); + starts.addElement("0"); + ends.addElement("0"); + } + } else {