X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequence.java;h=910c86df2bdb7dbc56363767d0ad42b116f3dd18;hb=b2f9a8d7bce642ff4011bc6d49e02bb0569fbb11;hp=580c85021a8850e8f4b423bf954677e9154c785d;hpb=59d682209891099d46b960509907c79e3fb276fe;p=jalview.git
diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java
index 580c850..910c86d 100755
--- a/src/jalview/datamodel/Sequence.java
+++ b/src/jalview/datamodel/Sequence.java
@@ -1,6 +1,6 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
+ * Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
*
@@ -14,6 +14,7 @@
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.datamodel;
@@ -707,6 +708,7 @@ public class Sequence implements SequenceI
{
tmp = new char[i];
System.arraycopy(sequence, 0, tmp, 0, i);
+ j=sequence.length;
}
else
{
@@ -715,6 +717,9 @@ public class Sequence implements SequenceI
System.arraycopy(sequence, j, tmp, i, sequence.length - j);
}
boolean createNewDs = false;
+ // TODO: take a look at the new dataset creation validation method below -
+ // this could become time comsuming for large sequences - consider making it
+ // more efficient
for (int s = i; s < j; s++)
{
if (jalview.schemes.ResidueProperties.aaIndex[sequence[s]] != 23)
@@ -992,6 +997,18 @@ public class Sequence implements SequenceI
datasetSequence.setPDBId(getPDBId());
setPDBId(null);
datasetSequence.updatePDBIds();
+ if (annotation != null)
+ {
+ Vector _annot = annotation;
+ annotation = null;
+ for (AlignmentAnnotation aa : _annot)
+ {
+ aa.sequenceRef = datasetSequence;
+ aa.adjustForAlignment(); // uses annotation's own record of
+ // sequence-column mapping
+ datasetSequence.addAlignmentAnnotation(aa);
+ }
+ }
}
return datasetSequence;
}