git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e04072
)
JAL-1569 formatting
author
Jim Procter
<jprocter@dundee.ac.uk>
Fri, 21 Nov 2014 08:59:49 +0000
(08:59 +0000)
committer
Jim Procter
<jprocter@dundee.ac.uk>
Fri, 21 Nov 2014 08:59:49 +0000
(08:59 +0000)
src/jalview/io/StockholmFile.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/StockholmFile.java
b/src/jalview/io/StockholmFile.java
index
0a18be0
..
1c84f00
100644
(file)
--- a/
src/jalview/io/StockholmFile.java
+++ b/
src/jalview/io/StockholmFile.java
@@
-23,7
+23,6
@@
*/
package jalview.io;
*/
package jalview.io;
-import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
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))
{
annot = (AlignmentAnnotation) e.nextElement();
if (annot.label.equals(type))
+ {
break;
break;
+ }
annot = null;
}
if (annot == null)
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)
for (int idb = 0; idb < s[in].getDBRef().length; idb++)
{
if (dataRef == null)
+ {
dataRef = new Hashtable();
dataRef = new Hashtable();
+ }
String datAs1 = s[in].getDBRef()[idb].getSource().toString()
+ " ; "
String datAs1 = s[in].getDBRef()[idb].getSource().toString()
+ " ; "
@@
-960,7
+963,9
@@
public class StockholmFile extends AlignFile
String key = type2id(feature);
if (key == null)
String key = type2id(feature);
if (key == null)
+ {
continue;
continue;
+ }
// out.append("#=GR ");
out.append(new Format("%-" + maxid + "s").form("#=GR "
// 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"))
String label;
if (aa.label.equals("seq"))
+ {
label = "seq_cons";
label = "seq_cons";
+ }
else
else
+ {
label = type2id(aa.label.toLowerCase()) + "_cons";
label = type2id(aa.label.toLowerCase()) + "_cons";
+ }
if (label == null)
if (label == null)
+ {
label = aa.label;
label = aa.label;
+ }
out.append(new Format("%-" + maxid + "s").form("#=GC " + 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(" "))
{
char ll = aa.annotations[j].secondaryStructure;
if (Character.toString(ll).equals(" "))
+ {
seq += "C";
seq += "C";
+ }
else
else
+ {
seq += ll;
seq += ll;
+ }
}
else if (ch.length() == 1)
{
}
else if (ch.length() == 1)
{
@@
-1121,7
+1136,7
@@
public class StockholmFile extends AlignFile
}
if (key != null)
{
}
if (key != null)
{
- return (String) key;
+ return key;
}
System.err.println("Warning : Unknown Stockholm annotation type: "
+ type);
}
System.err.println("Warning : Unknown Stockholm annotation type: "
+ type);