From: Jim Procter Date: Fri, 21 Nov 2014 08:59:49 +0000 (+0000) Subject: JAL-1569 formatting X-Git-Tag: Jalview_2_9~148^2~13 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d9f963f9290e699cd00304461ebdc85c5bc4c53a;p=jalview.git JAL-1569 formatting --- diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index 0a18be0..1c84f00 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -23,7 +23,6 @@ */ package jalview.io; -import jalview.datamodel.AlignmentI; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; @@ -842,7 +841,9 @@ public class StockholmFile extends AlignFile { annot = (AlignmentAnnotation) e.nextElement(); if (annot.label.equals(type)) + { break; + } annot = null; } if (annot == null) @@ -887,7 +888,9 @@ public class StockholmFile extends AlignFile for (int idb = 0; idb < s[in].getDBRef().length; idb++) { if (dataRef == null) + { dataRef = new Hashtable(); + } String datAs1 = s[in].getDBRef()[idb].getSource().toString() + " ; " @@ -960,7 +963,9 @@ public class StockholmFile extends AlignFile String key = type2id(feature); if (key == null) + { continue; + } // out.append("#=GR "); out.append(new Format("%-" + maxid + "s").form("#=GR " @@ -1021,12 +1026,18 @@ public class StockholmFile extends AlignFile String label; if (aa.label.equals("seq")) + { label = "seq_cons"; + } else + { label = type2id(aa.label.toLowerCase()) + "_cons"; + } if (label == null) + { label = aa.label; + } out.append(new Format("%-" + maxid + "s").form("#=GC " + label + " ")); @@ -1038,9 +1049,13 @@ public class StockholmFile extends AlignFile { char ll = aa.annotations[j].secondaryStructure; if (Character.toString(ll).equals(" ")) + { seq += "C"; + } else + { seq += ll; + } } else if (ch.length() == 1) { @@ -1121,7 +1136,7 @@ public class StockholmFile extends AlignFile } if (key != null) { - return (String) key; + return key; } System.err.println("Warning : Unknown Stockholm annotation type: " + type);