From 2bb0a2c4156ec75795c595df0c6300411557b066 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 21 Mar 2005 18:48:39 +0000 Subject: [PATCH] blc file reader modified --- src/jalview/io/BLCFile.java | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/jalview/io/BLCFile.java b/src/jalview/io/BLCFile.java index 5f45aec..8db0a9a 100755 --- a/src/jalview/io/BLCFile.java +++ b/src/jalview/io/BLCFile.java @@ -65,31 +65,23 @@ public class BLCFile extends AlignFile { break; } - if (line.indexOf(">") > -1) + int abracket = line.indexOf(">"); + + if (abracket > -1) { - if(line.indexOf(" ")>-1 ) + if(line.indexOf(" ")>-1) { - //>54402046 0 1 137 137: immunog - ids.addElement(line.substring(1, line.indexOf(" "))); - - // remove p Value - line = line.substring(line.indexOf(" ") + 1); - line = line.trim(); - - line = line.substring(line.indexOf(" ") + 1); - line = line.trim(); - starts.addElement(line.substring(0, line.indexOf(" "))); - line = line.substring(line.indexOf(" ") + 1); - line = line.trim(); - ends.addElement(line.substring(0, line.indexOf(" "))); + ids.addElement(line.substring(abracket+1, line.indexOf(" ", abracket+1))); + starts.addElement("0"); + ends.addElement("0"); } else { - ids.addElement( line.substring(line.indexOf(">") + 1, line.indexOf("/"))); + ids.addElement( line.substring(abracket + 1, line.indexOf("/"))); line = line.substring(line.indexOf("/") + 1); starts.addElement(line.substring(0, line.indexOf("-"))); - ends.addElement(line.substring(line.indexOf("-")+1)); + ends.addElement(line.substring(line.indexOf("-") + 1)); } } }while(!idsFound); @@ -105,7 +97,10 @@ public class BLCFile extends AlignFile { while ((line = nextLine()).indexOf("*")==-1) { for(int i=0; ii+starCol) + seqstrings[i].append(line.charAt(i + starCol)); + } } for(int i=0; i