*/\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
if (annotation)\r
{\r
Annotation[] anots = new Annotation[sb.length()];\r
+ String anotString = sb.toString();\r
for (int i = 0; i < sb.length(); i++)\r
{\r
- anots[i] = new Annotation(sb.substring(i, i+1),\r
+ anots[i] = new Annotation(anotString.substring(i, i+1),\r
null,\r
' ', 0);\r
}\r
seq.getName().substring(2), seq.getDescription(),\r
anots);\r
\r
- annotations.add(aa);\r
+ annotations.addElement(aa);\r
}\r
- annotation = true;\r
}\r
else\r
annotation = false;\r
firstLine = false;\r
\r
sb = new StringBuffer();\r
+\r
+ if (line.startsWith(">#_"))\r
+ annotation = true;\r
}\r
else\r
{\r
if (annotation)\r
{\r
Annotation[] anots = new Annotation[sb.length()];\r
+ String anotString = sb.toString();\r
for (int i = 0; i < sb.length(); i++)\r
{\r
- anots[i] = new Annotation(sb.substring(i, i + 1),\r
+ anots[i] = new Annotation(anotString.substring(i, i + 1),\r
null,\r
' ', 0);\r
}\r
seq.getName().substring(2), seq.getDescription(),\r
anots);\r
\r
- annotations.add(aa);\r
+ annotations.addElement(aa);\r
}\r
\r
else if (!firstLine)\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