From e0172c233914b64dc561b0a3b0d9aad850e99efc Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 29 Oct 2014 10:44:33 +0000 Subject: [PATCH] JAL-1264 JAL-674 method to copy annotation on structure positions to associated sequence positions --- src/jalview/structure/StructureMapping.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/jalview/structure/StructureMapping.java b/src/jalview/structure/StructureMapping.java index d2dcb34..9236331 100644 --- a/src/jalview/structure/StructureMapping.java +++ b/src/jalview/structure/StructureMapping.java @@ -20,7 +20,8 @@ */ package jalview.structure; -import jalview.datamodel.*; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.SequenceI; public class StructureMapping { @@ -98,4 +99,18 @@ public class StructureMapping } return -1; } + + /** + * transfer a copy of an alignment annotation row in the PDB chain coordinate + * system onto the mapped sequence + * + * @param ana + * @return the copy that was remapped to the mapped sequence + */ + public AlignmentAnnotation transfer(AlignmentAnnotation ana) + { + AlignmentAnnotation ala_copy = new AlignmentAnnotation(ana); + ala_copy.remap(sequence, mapping, 0, -1, 1); + return ala_copy; + } } -- 1.7.10.2