break;\r
}\r
\r
- if (line.indexOf(">") > -1)\r
+ int abracket = line.indexOf(">");\r
+\r
+ if (abracket > -1)\r
{\r
\r
- if(line.indexOf(" ")>-1 )\r
+ if(line.indexOf(" ")>-1)\r
{\r
- //>54402046 0 1 137 137: immunog\r
- ids.addElement(line.substring(1, line.indexOf(" ")));\r
-\r
- // remove p Value\r
- line = line.substring(line.indexOf(" ") + 1);\r
- line = line.trim();\r
-\r
- line = line.substring(line.indexOf(" ") + 1);\r
- line = line.trim();\r
- starts.addElement(line.substring(0, line.indexOf(" ")));\r
- line = line.substring(line.indexOf(" ") + 1);\r
- line = line.trim();\r
- ends.addElement(line.substring(0, line.indexOf(" ")));\r
+ ids.addElement(line.substring(abracket+1, line.indexOf(" ", abracket+1)));\r
+ starts.addElement("0");\r
+ ends.addElement("0");\r
}\r
else\r
{\r
- ids.addElement( line.substring(line.indexOf(">") + 1, line.indexOf("/")));\r
+ ids.addElement( line.substring(abracket + 1, 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
+ ends.addElement(line.substring(line.indexOf("-") + 1));\r
}\r
}\r
}while(!idsFound);\r
while ((line = nextLine()).indexOf("*")==-1)\r
{\r
for(int i=0; i<ids.size(); i++)\r
- seqstrings[i].append( line.charAt(i+starCol) );\r
+ {\r
+ if(line.length()>i+starCol)\r
+ seqstrings[i].append(line.charAt(i + starCol));\r
+ }\r
}\r
\r
for(int i=0; i<ids.size(); i++)\r