From ad315220a610542fe2ba24b33bf506636c330d99 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 25 Apr 2014 13:51:34 +0100 Subject: [PATCH] JAL-1177 propagate sequence associated annotation to dataset sequence --- src/jalview/datamodel/Sequence.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 5fa37e3..cd817ab 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -997,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; } -- 1.7.10.2