bug fix for Features/Annotations file parameter parsing in JalviewLite reported and...
[jalview.git] / src / jalview / io / BLCFile.java
index 8f91aa2..fa6f8e2 100755 (executable)
@@ -54,6 +54,10 @@ extends AlignFile
   {
     super(inFile, type);
   }
+  public BLCFile(FileParse source) throws IOException
+  {
+    super(source);
+  }
 
   /**
    * DOCUMENT ME!
@@ -81,6 +85,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 +130,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 +180,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);
+    }
   }
 
   /**