*/\r
public class FastaFile extends AlignFile\r
{\r
+ /**\r
+ * Length of a sequence line\r
+ */\r
+ int len = 72;\r
+\r
+ StringBuffer out;\r
+\r
/**\r
* Creates a new FastaFile object.\r
*/\r
\r
annotations.addElement(aa);\r
}\r
- annotation = true;\r
}\r
else\r
annotation = false;\r
\r
if (!firstLine)\r
{\r
- if (!annotation && !isValidProteinSequence(sb.toString().toCharArray()))\r
- {\r
- throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS\r
- +" : "+seq.getName()\r
- +" : "+invalidCharacter);\r
- }\r
-\r
seq.setSequence(sb.toString());\r
\r
if (!annotation)\r
firstLine = false;\r
\r
sb = new StringBuffer();\r
+\r
+ if (line.startsWith(">#_"))\r
+ annotation = true;\r
}\r
else\r
{\r
\r
else if (!firstLine)\r
{\r
-\r
- if (!isValidProteinSequence(sb.toString().toCharArray()))\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
}\r
}\r
\r
-\r
/**\r
* DOCUMENT ME!\r
*\r
*/\r
public String print(SequenceI[] s)\r
{\r
- int len = 72;\r
- StringBuffer out = new StringBuffer();\r
+ out = new StringBuffer();\r
int i = 0;\r
\r
while ((i < s.length) && (s[i] != null))\r