X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FStockholmFile.java;h=a47e1ea3c19a77e4c7f2cc873e863ec9e4271fdd;hb=db1b28364c2034ea432c0668100c1ec9e0d17523;hp=3fd0505738e23bbdd0da3dde1e7f9bd8868c491b;hpb=8b27085fa7fc5f2877e078421284c2636b85b8c6;p=jalview.git diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index 3fd0505..a47e1ea 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -800,9 +800,9 @@ public class StockholmFile extends AlignFile { String convert1, convert2 = null; - convert1 = OPEN_PAREN.replaceAll(annots); - convert2 = CLOSE_PAREN.replaceAll(convert1); - annots = convert2; + // convert1 = OPEN_PAREN.replaceAll(annots); + // convert2 = CLOSE_PAREN.replaceAll(convert1); + // annots = convert2; String type = label; if (label.contains("_cons")) @@ -830,8 +830,7 @@ public class StockholmFile extends AlignFile { if (DETECT_BRACKETS.search(pos)) { - ann.secondaryStructure = Rna.getRNASecStrucState( - pos).charAt(0); + ann.secondaryStructure = Rna.getRNASecStrucState(pos).charAt(0); } else { @@ -979,15 +978,19 @@ public class StockholmFile extends AlignFile { for (int j = 0; j < alAnot.length; j++) { - if (ds.getSequenceFeatures() != null) + + String key = type2id(alAnot[j].label); + boolean isrna = alAnot[j].isValidStruc(); + + if (isrna) { - feature = ds.getSequenceFeatures()[0].type; + // hardwire to secondary structure if there is RNA secondary + // structure on the annotation + key = "SS"; } - // ?bug - feature may still have previous loop value - String key = type2id(feature); - if (key == null) { + continue; } @@ -995,7 +998,6 @@ public class StockholmFile extends AlignFile out.append(new Format("%-" + maxid + "s").form("#=GR " + printId(s[i], jvSuffix) + " " + key + " ")); ann = alAnot[j].annotations; - boolean isrna = alAnot[j].isValidStruc(); String seq = ""; for (int k = 0; k < ann.length; k++) {