git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'features/JAL-2371collectionColourScheme' into develop
[jalview.git]
/
src
/
jalview
/
io
/
StockholmFile.java
diff --git
a/src/jalview/io/StockholmFile.java
b/src/jalview/io/StockholmFile.java
index
bec7d82
..
2061f29
100644
(file)
--- a/
src/jalview/io/StockholmFile.java
+++ b/
src/jalview/io/StockholmFile.java
@@
-97,7
+97,8
@@
public class StockholmFile extends AlignFile
this.al = al;
}
this.al = al;
}
- public StockholmFile(String inFile, String type) throws IOException
+ public StockholmFile(String inFile, DataSourceType type)
+ throws IOException
{
super(inFile, type);
}
{
super(inFile, type);
}
@@
-829,8
+830,7
@@
public class StockholmFile extends AlignFile
{
if (DETECT_BRACKETS.search(pos))
{
{
if (DETECT_BRACKETS.search(pos))
{
- ann.secondaryStructure = Rna.getRNASecStrucState(
- pos).charAt(0);
+ ann.secondaryStructure = Rna.getRNASecStrucState(pos).charAt(0);
}
else
{
}
else
{
@@
-881,8
+881,13
@@
public class StockholmFile extends AlignFile
return annot;
}
return annot;
}
- public String print(SequenceI[] s)
+ @Override
+ public String print(SequenceI[] s, boolean jvSuffix)
{
{
+ out = new StringBuffer();
+ out.append("# STOCKHOLM 1.0");
+ out.append(newline);
+
// find max length of id
int max = 0;
int maxid = 0;
// find max length of id
int max = 0;
int maxid = 0;
@@
-890,7
+895,7
@@
public class StockholmFile extends AlignFile
Hashtable dataRef = null;
while ((in < s.length) && (s[in] != null))
{
Hashtable dataRef = null;
while ((in < s.length) && (s[in] != null))
{
- String tmp = printId(s[in]);
+ String tmp = printId(s[in], jvSuffix);
if (s[in].getSequence().length > max)
{
max = s[in].getSequence().length;
if (s[in].getSequence().length > max)
{
max = s[in].getSequence().length;
@@
-987,7
+992,7
@@
public class StockholmFile extends AlignFile
// out.append("#=GR ");
out.append(new Format("%-" + maxid + "s").form("#=GR "
// out.append("#=GR ");
out.append(new Format("%-" + maxid + "s").form("#=GR "
- + printId(s[i]) + " " + key + " "));
+ + printId(s[i], jvSuffix) + " " + key + " "));
ann = alAnot[j].annotations;
boolean isrna = alAnot[j].isValidStruc();
String seq = "";
ann = alAnot[j].annotations;
boolean isrna = alAnot[j].isValidStruc();
String seq = "";
@@
-1001,7
+1006,8
@@
public class StockholmFile extends AlignFile
}
}
}
}
- out.append(new Format("%-" + maxid + "s").form(printId(s[i]) + " "));
+ out.append(new Format("%-" + maxid + "s")
+ .form(printId(s[i], jvSuffix) + " "));
out.append(s[i].getSequenceAsString());
out.append(newline);
i++;
out.append(s[i].getSequenceAsString());
out.append(newline);
i++;
@@
-1054,6
+1060,10
@@
public class StockholmFile extends AlignFile
out.append(newline);
}
}
out.append(newline);
}
}
+
+ out.append("//");
+ out.append(newline);
+
return out.toString();
}
return out.toString();
}
@@
-1106,13
+1116,12
@@
public class StockholmFile extends AlignFile
return seq;
}
return seq;
}
- @Override
public String print()
{
out = new StringBuffer();
out.append("# STOCKHOLM 1.0");
out.append(newline);
public String print()
{
out = new StringBuffer();
out.append("# STOCKHOLM 1.0");
out.append(newline);
- print(getSeqsAsArray());
+ print(getSeqsAsArray(), false);
out.append("//");
out.append(newline);
out.append("//");
out.append(newline);