*/\r
Sequence parseId(String id)\r
{\r
+ id = id.trim();\r
Sequence seq = new Sequence("","");\r
int space = id.indexOf(" ");\r
if(space>-1)\r
StringTokenizer st;\r
st = new StringTokenizer(id, "|");\r
\r
- while (st.countTokens()>2)\r
+ while (st.countTokens()>1)\r
{\r
- seq.addDBRef( new DBRefEntry( st.nextToken(), "0", st.nextToken()));\r
+ String a = st.nextToken();\r
+ String b = st.nextToken();\r
+ System.out.print(a+" "+b+" ");\r
+ seq.addDBRef( new DBRefEntry( a, "0", b));\r
}\r
\r
if(st.hasMoreTokens())\r
*/\r
package jalview.io;\r
\r
-import jalview.analysis.*;\r
-\r
import jalview.datamodel.*;\r
\r
import java.io.*;\r
{\r
if (line.length() > 0)\r
{\r
- // Do we have an id line?\r
- // JBPNote - this code needs to be standardised to EBI/whatever for the\r
- // >dbref/dbref/dbref|refid1|refid2|refid3 'human-readable' style of naming (should it really exist)\r
if (line.charAt(0)=='>')\r
{\r
- seq = parseId(line.substring(1));\r
-\r
if (count != 0)\r
{\r
seq.setSequence(sb.toString());\r
seqs.addElement(seq);\r
}\r
\r
+ seq = parseId(line.substring(1));\r
+\r
count++;\r
sb = new StringBuffer();\r
}\r