X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FStockholmFile.java;h=28f062f8d48478811156f9e212f4fedf1aa56b3a;hb=fecbdab721ea3f701b9c8107a5aac5371617943d;hp=cff328b040d35d7cb99db90779b53cc1c3c30928;hpb=a1984b1c8c273ed33c7ce9283039f4027dcae2de;p=jalview.git diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index cff328b..28f062f 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -90,7 +90,7 @@ public class StockholmFile extends AlignFile // use the following regex to decide an annotations (whole) line is NOT an RNA // SS (it contains only E,H,e,h and other non-brace/non-alpha chars) private static final Regex NOT_RNASS = new Regex( - "^[^<>[\\](){}A-DF-Za-df-z]*$"); + "^[^<>[\\](){}ADFJ-RUVWYZadfj-ruvwyz]*$"); StringBuffer out; // output buffer @@ -218,8 +218,9 @@ public class StockholmFile extends AlignFile r = new Regex("# STOCKHOLM ([\\d\\.]+)"); if (!r.search(nextLine())) { - throw new IOException(MessageManager - .getString("exception.stockholm_invalid_format")); + throw new IOException( + MessageManager.getString("exception.stockholm_invalid_format") + + " (" + r + ")"); } else { @@ -1048,9 +1049,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) {