- { // use new ds mechanism here
- Sequence ds = new Sequence(command.seqs[i].getName(),
- jalview.analysis.AlignSeq.extractGaps(
- jalview.util.Comparison.GapChars,
- command.seqs[i].getSequenceAsString()
- ),
- command.seqs[i].getStart(),
- command.seqs[i].getEnd());
- ds.setDescription(command.seqs[i].getDescription());
+ {
+ SequenceI ds;
+ if (newDSWasNeeded)
+ {
+ ds = command.oldds[i];
+ }
+ else
+ {
+ // make a new DS sequence
+ // use new ds mechanism here
+ ds = new Sequence(command.seqs[i].getName(),
+ jalview.analysis.AlignSeq.extractGaps(
+ jalview.util.Comparison.GapChars,
+ command.seqs[i].getSequenceAsString()),
+ command.seqs[i].getStart(), command.seqs[i].getEnd());
+ ds.setDescription(command.seqs[i].getDescription());
+ }
+ if (command.oldds == null)
+ {
+ command.oldds = new SequenceI[command.seqs.length];
+ }
+ command.oldds[i] = command.seqs[i].getDatasetSequence();