- if (sstart != 0)\r
- {\r
- seqs.addElement(new Sequence(id, seq.toString(),\r
- sstart, send));\r
- }\r
- else\r
- {\r
- seqs.addElement(new Sequence(id, seq.toString(), 1,\r
- seq.length()));\r
- }\r
- }\r
-\r
- count++;\r
-\r
- StringTokenizer str = new StringTokenizer(line, " ");\r
-\r
- id = str.nextToken();\r
- id = id.substring(1);\r
-\r
- com.stevesoft.pat.Regex dbId = new com.stevesoft.pat.Regex(\r
- "[A-Za-z-]+/?[A-Za-z-]+\\|(\\w+)\\|(.+)");\r
-\r
- // JBPNote At the moment - we don't get rid of the friendly names but this\r
- // behaviour is probably wrong in the long run.\r
- if (dbId.search(id))\r
- {\r
- String dbid = dbId.stringMatched(1);\r
- String idname = dbId.stringMatched(2);\r
-\r
- if ((idname.length() > 0) &&\r
- (idname.indexOf("_") > -1))\r
- {\r
- id = idname; // use the friendly name - apparently no dbid\r
- }\r
- else if (dbid.length() > 1)\r
- {\r
- id = dbid; // ignore the friendly name - we lose uniprot accession ID otherwise\r
- }\r
+ if (!isValidProteinSequence(sb.toString()))\r
+ {\r
+ throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS\r
+ +" : "+seq.getName()\r
+ +" : "+invalidCharacter);\r
+ }\r
+\r
+ seq.setSequence(sb.toString());\r
+ seqs.addElement(seq);\r