X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequence.java;h=24c409aa5e861f4ff28abb0eb727c8999e5dfeec;hb=a8f483d04205bb8273ee311c12968b7e86d205fa;hp=580c85021a8850e8f4b423bf954677e9154c785d;hpb=59d682209891099d46b960509907c79e3fb276fe;p=jalview.git
diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java
index 580c850..24c409a 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.2)
+ * 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;
@@ -22,6 +23,8 @@ import jalview.analysis.AlignSeq;
import java.util.Enumeration;
import java.util.Vector;
+import fr.orsay.lri.varna.models.rna.RNA;
+
/**
*
* Implements the SequenceI interface for a char[] based sequence object.
@@ -48,6 +51,8 @@ public class Sequence implements SequenceI
String vamsasId;
DBRefEntry[] dbrefs;
+
+ RNA rna;
/**
* This annotation is displayed below the alignment but the positions are tied
@@ -60,7 +65,7 @@ public class Sequence implements SequenceI
*/
int index = -1;
- /** array of seuqence features - may not be null for a valid sequence object */
+ /** array of sequence features - may not be null for a valid sequence object */
public SequenceFeature[] sequenceFeatures;
/**
@@ -707,6 +712,7 @@ public class Sequence implements SequenceI
{
tmp = new char[i];
System.arraycopy(sequence, 0, tmp, 0, i);
+ j=sequence.length;
}
else
{
@@ -715,6 +721,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 +1001,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;
}
@@ -1200,4 +1221,9 @@ public class Sequence implements SequenceI
{
index = value;
}
+
+ public void setRNA(RNA r){rna=r;}
+
+ public RNA getRNA() { return rna; }
+
}