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
fileFormat enum wip changes
[jalview.git]
/
src
/
jalview
/
io
/
StockholmFile.java
diff --git
a/src/jalview/io/StockholmFile.java
b/src/jalview/io/StockholmFile.java
index
813b184
..
cb4c786
100644
(file)
--- a/
src/jalview/io/StockholmFile.java
+++ b/
src/jalview/io/StockholmFile.java
@@
-884,8
+884,12
@@
public class StockholmFile extends AlignFile
return annot;
}
return annot;
}
- public String print(SequenceI[] s)
+ @Override
+ public String print(SequenceI[] s, boolean jvsuffix)
{
{
+ // 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;
@@
-893,7
+897,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;
@@
-990,7
+994,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 = "";
@@
-1004,7
+1008,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++;
@@
-1057,6
+1062,8
@@
public class StockholmFile extends AlignFile
out.append(newline);
}
}
out.append(newline);
}
}
+ // out.append("//");
+ // out.append(newline);
return out.toString();
}
return out.toString();
}
@@
-1109,19
+1116,6
@@
public class StockholmFile extends AlignFile
return seq;
}
return seq;
}
- @Override
- public String print()
- {
- out = new StringBuffer();
- out.append("# STOCKHOLM 1.0");
- out.append(newline);
- print(getSeqsAsArray());
-
- out.append("//");
- out.append(newline);
- return out.toString();
- }
-
private static Hashtable typeIds = null;
static
{
private static Hashtable typeIds = null;
static
{