From: jprocter Date: Fri, 27 Apr 2007 12:24:09 +0000 (+0000) Subject: blc header lines inserted as 'comment' alignment property X-Git-Tag: Release_2_3~137 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dacca12e91b93a02664e9cd77773455c44eb8799;p=jalview.git blc header lines inserted as 'comment' alignment property --- diff --git a/src/jalview/io/BLCFile.java b/src/jalview/io/BLCFile.java index 8f91aa2..c40e125 100755 --- a/src/jalview/io/BLCFile.java +++ b/src/jalview/io/BLCFile.java @@ -81,6 +81,8 @@ extends AlignFile public void parse() throws IOException { + StringBuffer headerLines=new StringBuffer(); + int numHeaderLines = 0; // number of lines appended. StringBuffer[] seqstrings=null; if (suffix!=null) { try { @@ -124,6 +126,11 @@ extends AlignFile 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); @@ -169,7 +176,12 @@ extends AlignFile 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); + } } /**