From: Jim Procter Date: Mon, 1 Dec 2014 21:49:16 +0000 (+0000) Subject: JAL-1199 JAL-1569 incremental patch allow non-standard annotation to be output X-Git-Tag: Release_2_8_2~1^2~4^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=78c75d17d486be63f023a9eed386a0b40954d95b;hp=1852685ff3c86b4939b4e7fcc0233b420f711dde;p=jalview.git JAL-1199 JAL-1569 incremental patch allow non-standard annotation to be output --- diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index 96c462c..3b9fb00 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -1027,13 +1027,21 @@ public class StockholmFile extends AlignFile } else { - label = (key = type2id(aa.label.toLowerCase())) + "_cons"; + key = type2id(aa.label.toLowerCase()); + if (key == null) + { + label = aa.label; + } + else + { + label = key + "_cons"; + } } - if (label == null) { label = aa.label; } + label = label.replace(" ", "_"); out.append(new Format("%-" + maxid + "s").form("#=GC " + label + " ")); @@ -1067,7 +1075,7 @@ public class StockholmFile extends AlignFile String ch = (annot == null) ? ((sequenceI == null) ? "-" : Character .toString(sequenceI.getCharAt(k))) : annot.displayCharacter; - if (key.equals("SS")) + if (key != null && key.equals("SS")) { if (annot == null) {