X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAlignmentUtils.java;h=37f225c02aa70867c3041652349bc6914a2dc797;hb=2c2992b8822b686f7f12022a66aa41f6969d06d0;hp=17aab155d78b2d468971df9f39389319b648d9d3;hpb=d2b08d9048af25114cff8deabbd320471119d88d;p=jalview.git diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 17aab15..37f225c 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -2558,7 +2558,8 @@ public class AlignmentUtils if (!unmapped.contains(seq)) { char[] newSeq = new char[width]; - Arrays.fill(newSeq, gap); + Arrays.fill(newSeq, gap); // JBPComment - doubt this is faster than the + // Integer iteration below int newCol = 0; int lastCol = 0; @@ -2590,6 +2591,7 @@ public class AlignmentUtils System.arraycopy(newSeq, 0, tmp, 0, lastCol + 1); newSeq = tmp; } + // TODO: optimise SequenceI to avoid char[]->String->char[] seq.setSequence(String.valueOf(newSeq)); realignedCount++; } @@ -2639,6 +2641,8 @@ public class AlignmentUtils { SequenceI alignedSequence = alignedDatasets.get(seq .getDatasetSequence()); + // TODO: getSequenceAsString() will be deprecated in the future + // TODO: need to leave to SequenceI implementor to update gaps seq.setSequence(alignedSequence.getSequenceAsString()); }