From: Jim Procter Date: Fri, 21 Nov 2014 09:01:03 +0000 (+0000) Subject: JAL-674 add RNA sequence associated annotation to alignment as hidden annotation X-Git-Tag: Jalview_2_9~148^2~12 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5f3ef8297b73e71bf3afb7ecc75d16879b8c330d;p=jalview.git JAL-674 add RNA sequence associated annotation to alignment as hidden annotation --- diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index 1c84f00..7ca07c8 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -366,6 +366,7 @@ public class StockholmFile extends AlignFile AlignmentAnnotation an = (AlignmentAnnotation) vv .elementAt(ii); seqO.addAlignmentAnnotation(an); + annotations.add(an); } } } @@ -635,9 +636,13 @@ public class StockholmFile extends AlignFile strucAnn = new Hashtable(); } - Vector newStruc = new Vector(); + Vector newStruc = new Vector(); parseAnnotationRow(newStruc, type, ns); - + for (AlignmentAnnotation alan : newStruc) + { + alan.visible = false; + } + // annotations.addAll(newStruc); strucAnn.put(type, newStruc); seqAnn.put(acc, strucAnn); } @@ -1041,11 +1046,12 @@ public class StockholmFile extends AlignFile out.append(new Format("%-" + maxid + "s").form("#=GC " + label + " ")); + boolean isrna = aa.isValidStruc(); for (int j = 0; j < aa.annotations.length; j++) { String ch = (aa.annotations[j] == null) ? "-" : aa.annotations[j].displayCharacter; - if (ch.length() == 0) + if (ch.length() == 0 || isrna) { char ll = aa.annotations[j].secondaryStructure; if (Character.toString(ll).equals(" "))