From dede76e8bd1367b22e7d28d420cf33e9f08274a2 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 12 Nov 2014 12:40:24 +0000 Subject: [PATCH] JAL-674 use the getMapping/transfer to transfer annotation when creating a mapping to a sequence --- src/jalview/structure/StructureSelectionManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 7a1b100..017bae9 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -380,7 +380,10 @@ public class StructureSelectionManager + (maxAlignseq.seq1end + sequence[s].getEnd() - 1)); maxChain.makeExactMapping(maxAlignseq, sequence[s]); - + jalview.datamodel.Mapping sqmpping = maxAlignseq + .getMappingFromS1(false); + jalview.datamodel.Mapping omap = new jalview.datamodel.Mapping( + sqmpping.getMap().getInverse()); maxChain.transferRESNUMFeatures(sequence[s], null); // allocate enough slots to store the mapping from positions in @@ -426,7 +429,7 @@ public class StructureSelectionManager mappings[mappings.length - 1] = newMapping; } - maxChain.transferResidueAnnotation(newMapping); + maxChain.transferResidueAnnotation(newMapping, sqmpping); } // /////// -- 1.7.10.2