X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequence.java;h=d0020314431963b546b577af61ccad89677155fe;hb=cce26350d1d8106b82701deab38a8b20022b4737;hp=fa063ff40efec2716d95361aaf912661a901272a;hpb=507800557a9b27cc6e1a3f831cbb7d18c9d173d0;p=jalview.git
diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java
index fa063ff..d002031 100755
--- a/src/jalview/datamodel/Sequence.java
+++ b/src/jalview/datamodel/Sequence.java
@@ -1,19 +1,22 @@
/*
- * 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.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* 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 .
+ * 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 +25,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.
@@ -49,6 +54,8 @@ public class Sequence implements SequenceI
DBRefEntry[] dbrefs;
+ RNA rna;
+
/**
* This annotation is displayed below the alignment but the positions are tied
* to the residues of this sequence
@@ -60,7 +67,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,7 +714,7 @@ public class Sequence implements SequenceI
{
tmp = new char[i];
System.arraycopy(sequence, 0, tmp, 0, i);
- j=sequence.length;
+ j = sequence.length;
}
else
{
@@ -996,6 +1003,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;
}
@@ -1204,4 +1223,15 @@ public class Sequence implements SequenceI
{
index = value;
}
+
+ public void setRNA(RNA r)
+ {
+ rna = r;
+ }
+
+ public RNA getRNA()
+ {
+ return rna;
+ }
+
}