From 5f3ef8297b73e71bf3afb7ecc75d16879b8c330d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 21 Nov 2014 09:01:03 +0000 Subject: [PATCH] JAL-674 add RNA sequence associated annotation to alignment as hidden annotation --- src/jalview/io/StockholmFile.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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(" ")) -- 1.7.10.2