JAL-674 use the getMapping/transfer to transfer annotation when creating a mapping...
authorJim Procter <jprocter@dundee.ac.uk>
Wed, 12 Nov 2014 12:40:24 +0000 (12:40 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Wed, 12 Nov 2014 12:40:24 +0000 (12:40 +0000)
src/jalview/structure/StructureSelectionManager.java

index 7a1b100..017bae9 100644 (file)
@@ -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);
     }
     // ///////