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 (from parent 1:
7b3105f
)
fix for JAL-527
author
jprocter
<Jim Procter>
Wed, 12 May 2010 08:38:07 +0000
(08:38 +0000)
committer
jprocter
<Jim Procter>
Wed, 12 May 2010 08:38:07 +0000
(08:38 +0000)
src/jalview/analysis/AlignSeq.java
patch
|
blob
|
history
diff --git
a/src/jalview/analysis/AlignSeq.java
b/src/jalview/analysis/AlignSeq.java
index
15727ef
..
bf66f30
100755
(executable)
--- a/
src/jalview/analysis/AlignSeq.java
+++ b/
src/jalview/analysis/AlignSeq.java
@@
-501,12
+501,24
@@
public class AlignSeq
// TODO: Use original sequence characters rather than re-translated
// characters in output
// Find the biggest id length for formatting purposes
// TODO: Use original sequence characters rather than re-translated
// characters in output
// Find the biggest id length for formatting purposes
+ String s1id=s1.getName(),s2id=s2.getName();
int maxid = s1.getName().length();
if (s2.getName().length() > maxid)
{
maxid = s2.getName().length();
}
int maxid = s1.getName().length();
if (s2.getName().length() > maxid)
{
maxid = s2.getName().length();
}
-
+ if (maxid>30) {
+ maxid = 30;
+ // JAL-527 - truncate the sequence ids
+ if (s1.getName().length()>maxid)
+ {
+ s1id = s1.getName().substring(0,30);
+ }
+ if (s2.getName().length()>maxid)
+ {
+ s2id = s2.getName().substring(0,30);
+ }
+ }
int len = 72 - maxid - 1;
int nochunks = ((aseq1.length - count) / len) + 1;
pid = 0;
int len = 72 - maxid - 1;
int nochunks = ((aseq1.length - count) / len) + 1;
pid = 0;
@@
-525,7
+537,7
@@
public class AlignSeq
for (int j = 0; j < nochunks; j++)
{
// Print the first aligned sequence
for (int j = 0; j < nochunks; j++)
{
// Print the first aligned sequence
- output.append(new Format("%" + (maxid) + "s").form(s1.getName())
+ output.append(new Format("%" + (maxid) + "s").form(s1id)
+ " ");
for (int i = 0; i < len; i++)
+ " ");
for (int i = 0; i < len; i++)
@@
-572,8
+584,7
@@
public class AlignSeq
// Now print the second aligned sequence
output = output.append("\n");
// Now print the second aligned sequence
output = output.append("\n");
- output = output.append(new Format("%" + (maxid) + "s").form(s2
- .getName())
+ output = output.append(new Format("%" + (maxid) + "s").form(s2id)
+ " ");
for (int i = 0; i < len; i++)
+ " ");
for (int i = 0; i < len; i++)