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:
f174f7c
)
New padgaps works out number of gaps to insert, delete
author
amwaterhouse
<Andrew Waterhouse>
Fri, 27 Oct 2006 16:13:57 +0000
(16:13 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Fri, 27 Oct 2006 16:13:57 +0000
(16:13 +0000)
src/jalview/datamodel/Alignment.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/Alignment.java
b/src/jalview/datamodel/Alignment.java
index
cb73d0c
..
713cb0d
100755
(executable)
--- a/
src/jalview/datamodel/Alignment.java
+++ b/
src/jalview/datamodel/Alignment.java
@@
-597,7
+597,8
@@
public class Alignment implements AlignmentI
return dataset;
}
return dataset;
}
- public boolean padGaps() {
+ public boolean padGaps()
+ {
boolean modified=false;
//Remove excess gaps from the end of alignment
boolean modified=false;
//Remove excess gaps from the end of alignment
@@
-620,14
+621,17
@@
public class Alignment implements AlignmentI
maxLength++;
maxLength++;
+ int cLength;
for (int i = 0; i < sequences.size();
i++)
{
current = getSequenceAt(i);
for (int i = 0; i < sequences.size();
i++)
{
current = getSequenceAt(i);
+ cLength = current.getLength();
- if (current.getLength() < maxLength)
+ if (cLength < maxLength)
{
{
- current.insertCharAt(maxLength - 1, gapCharacter);
+ current.insertCharAt(cLength,
+ maxLength-cLength, gapCharacter);
modified=true;
}
else if(current.getLength() > maxLength)
modified=true;
}
else if(current.getLength() > maxLength)