JAL-674 switch from .transfer to .liftOver for transfer of annotation
authorJim Procter <jprocter@dundee.ac.uk>
Wed, 12 Nov 2014 12:39:05 +0000 (12:39 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Wed, 12 Nov 2014 12:39:05 +0000 (12:39 +0000)
src/MCview/PDBChain.java

index 5dd38a4..2dd6d37 100755 (executable)
@@ -487,22 +487,17 @@ public class PDBChain
     }
   }
 
-  public AlignmentAnnotation[] transferResidueAnnotation(SequenceI seq,
-          String status)
-  {
-    AlignmentAnnotation[] transferred = null;
-
-    return transferred;
-
-  }
-
   /**
    * copy any sequence annotation onto the sequence mapped using the provided
    * StructureMapping
    * 
    * @param mapping
+   *          - positional mapping between destination sequence and pdb resnum
+   * @param sqmpping
+   *          - mapping between destination sequence and local chain
    */
-  public void transferResidueAnnotation(StructureMapping mapping)
+  public void transferResidueAnnotation(
+          StructureMapping mapping, jalview.datamodel.Mapping sqmpping)
   {
     SequenceI sq = mapping.getSequence();
     SequenceI dsq = sq;
@@ -524,7 +519,8 @@ public class PDBChain
           if (transfer == null || transfer.size() == 0)
           {
             ana.liftOver(sequence, shadowMap);
-            mapping.transfer(ana);
+            ana.liftOver(dsq, sqmpping);
+            dsq.addAlignmentAnnotation(ana);
           }
           else
           {
@@ -542,7 +538,8 @@ public class PDBChain
                   ana.getCalcId(), ana.label);
           if (transfer == null || transfer.size() == 0)
           {
-            mapping.transfer(ana);
+            ana.liftOver(dsq, sqmpping);
+            // mapping.transfer(ana);
           }
           else
           {