JAL-4184 export description line in stockholm
[jalview.git] / src / jalview / io / StockholmFile.java
index 5d645ca..eeadcbf 100644 (file)
@@ -219,7 +219,7 @@ public class StockholmFile extends AlignFile
     if (!r.search(nextLine()))
     {
       throw new IOException(MessageManager
-              .getString("exception.stockholm_invalid_format"));
+                           .getString("exception.stockholm_invalid_format") +" ("+r+")");
     }
     else
     {
@@ -1048,9 +1048,18 @@ public class StockholmFile extends AlignFile
       }
     }
 
-    // output annotations
+    // output description and annotations
+
     while (i < slen && (seq = s[i]) != null)
     {
+      if (seq.getDescription()!=null)
+      {
+        // out.append("#=GR ");
+        out.append(new Format("%-" + maxid + "s").form(
+                "#=GS " + printId(seq, jvSuffix) + " DE " + seq.getDescription()));
+        out.append(newline);
+      }
+
       AlignmentAnnotation[] alAnot = seq.getAnnotation();
       if (alAnot != null)
       {