From: Jim Procter Date: Tue, 9 May 2017 15:54:15 +0000 (+0100) Subject: JAL-2507 output secondary structure regardless of presence of dataset sequence X-Git-Tag: Release_2_10_2~3^2~88^2~14 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4340010fc364a8f9a6fcab4f8c416393f5bda21d;p=jalview.git JAL-2507 output secondary structure regardless of presence of dataset sequence --- diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index a47e1ea..32e6ff7 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -966,46 +966,39 @@ public class StockholmFile extends AlignFile // output annotations while (i < s.length && s[i] != null) { - if (s[i].getDatasetSequence() != null) + AlignmentAnnotation[] alAnot = s[i].getAnnotation(); + if (alAnot != null) { - SequenceI ds = s[i].getDatasetSequence(); - AlignmentAnnotation[] alAnot; Annotation[] ann; - Annotation annot; - alAnot = s[i].getAnnotation(); - String feature = ""; - if (alAnot != null) + for (int j = 0; j < alAnot.length; j++) { - for (int j = 0; j < alAnot.length; j++) - { - String key = type2id(alAnot[j].label); - boolean isrna = alAnot[j].isValidStruc(); + String key = type2id(alAnot[j].label); + boolean isrna = alAnot[j].isValidStruc(); - if (isrna) - { - // hardwire to secondary structure if there is RNA secondary - // structure on the annotation - key = "SS"; - } - if (key == null) - { + if (isrna) + { + // hardwire to secondary structure if there is RNA secondary + // structure on the annotation + key = "SS"; + } + if (key == null) + { - continue; - } + continue; + } - // out.append("#=GR "); - out.append(new Format("%-" + maxid + "s").form("#=GR " - + printId(s[i], jvSuffix) + " " + key + " ")); - ann = alAnot[j].annotations; - String seq = ""; - for (int k = 0; k < ann.length; k++) - { - seq += outputCharacter(key, k, isrna, ann, s[i]); - } - out.append(seq); - out.append(newline); + // out.append("#=GR "); + out.append(new Format("%-" + maxid + "s").form("#=GR " + + printId(s[i], jvSuffix) + " " + key + " ")); + ann = alAnot[j].annotations; + String seq = ""; + for (int k = 0; k < ann.length; k++) + { + seq += outputCharacter(key, k, isrna, ann, s[i]); } + out.append(seq); + out.append(newline); } }