public void parse()
throws IOException
{
+ StringBuffer headerLines=new StringBuffer();
+ int numHeaderLines = 0; // number of lines appended.
StringBuffer[] seqstrings=null;
if (suffix!=null) {
try {
Sequence seq = parseId(line);
seqs.addElement(seq);
+ } else {
+ // header lines - keep them for the alignment comments.
+ headerLines.append(line);
+ headerLines.append("\n");
+ numHeaderLines++;
}
}
while (!idsFound);
newSeq.setSequence(seqstrings[i].toString());
}
-
+ if (seqs.size()>0)
+ {
+ if (headerLines.length()>1+numHeaderLines) // could see if buffer is just whitespace or not.
+ setAlignmentProperty("Comments", headerLines.toString());
+ setAlignmentProperty("iteration", ""+iterationCount);
+ }
}
/**