X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequence.java;h=d0020314431963b546b577af61ccad89677155fe;hb=cce26350d1d8106b82701deab38a8b20022b4737;hp=6b143ce32258902bf40a77d078a5ee6f37da88d5;hpb=a9315b41e948f66f4632f7d419fda643bc0b9354;p=jalview.git diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 6b143ce..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; @@ -50,7 +53,7 @@ public class Sequence implements SequenceI String vamsasId; DBRefEntry[] dbrefs; - + RNA rna; /** @@ -711,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 { @@ -1000,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; } @@ -1208,9 +1223,15 @@ public class Sequence implements SequenceI { index = value; } - - public void setRNA(RNA r){rna=r;} - - public RNA getRNA() { return rna; } - + + public void setRNA(RNA r) + { + rna = r; + } + + public RNA getRNA() + { + return rna; + } + }