From e96fc72825d181bbb0dede55a0bca7aa4e64232d Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 22 Mar 2005 12:17:29 +0000 Subject: [PATCH 1/1] read start end if available --- src/jalview/io/BLCFile.java | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) 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 { -- 1.7.10.2