From d537c0ee8ef1907b348237645765671674f8f304 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 30 Aug 2007 11:40:34 +0000 Subject: [PATCH] moved dataset sequence creation onto sequence method --- src/jalview/datamodel/Alignment.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index ba65fd7..f36872e 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -617,7 +617,7 @@ public class Alignment // Create a new dataset for this alignment. // Can only be done once, if dataset is not null // This will not be performed - Sequence[] seqs = new Sequence[getHeight()]; + SequenceI[] seqs = new SequenceI[getHeight()]; SequenceI currentSeq; for (int i = 0; i < getHeight(); i++) { @@ -628,17 +628,7 @@ public class Alignment } else { - seqs[i] = new Sequence(currentSeq.getName(), - AlignSeq.extractGaps( - jalview.util.Comparison.GapChars, - currentSeq.getSequenceAsString() - ), - currentSeq.getStart(), - currentSeq.getEnd()); - seqs[i].sequenceFeatures = currentSeq.getSequenceFeatures(); - seqs[i].setDescription(currentSeq.getDescription()); - getSequenceAt(i).setSequenceFeatures(null); - getSequenceAt(i).setDatasetSequence(seqs[i]); + seqs[i] = currentSeq.createDatasetSequence(); } } -- 1.7.10.2