X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fstructure%2FStructureMapping.java;fp=src%2Fjalview%2Fstructure%2FStructureMapping.java;h=e0033e165d0c1e67aa2caa24dcc37864b665ff2a;hb=f9cf34a5681f00ec37e1254f92c3be9cb6c37ee8;hp=e4749c9be07fbaec1a7cea84891ac0b55aed17e8;hpb=68c26e8852772be21fdb5b091fa9083d8cdb6eec;p=jalview.git diff --git a/src/jalview/structure/StructureMapping.java b/src/jalview/structure/StructureMapping.java index e4749c9..e0033e1 100644 --- a/src/jalview/structure/StructureMapping.java +++ b/src/jalview/structure/StructureMapping.java @@ -64,6 +64,11 @@ public class StructureMapping return pdbid; } + /** + * + * @param seqpos + * @return 0 or corresponding atom number for the sequence position + */ public int getAtomNum(int seqpos) { if (mapping.length > seqpos) @@ -76,6 +81,11 @@ public class StructureMapping } } + /** + * + * @param seqpos + * @return 0 or the corresponding residue number for the sequence position + */ public int getPDBResNum(int seqpos) { if (mapping.length > seqpos) @@ -88,6 +98,11 @@ public class StructureMapping } } + /** + * + * @param pdbResNum + * @return -1 or the corresponding sequence position for a pdb residue number + */ public int getSeqPos(int pdbResNum) { for (int i = 0; i < mapping.length; i++) @@ -118,7 +133,10 @@ public class StructureMapping { ds = ds.getDatasetSequence(); } - ala_copy.remap(ds, mapping, 0, -1, 1); + // need to relocate annotation from pdb coordinates to local sequence + // -1,-1 doesn't look at pdbresnum but fails to remap sequence positions... + + ala_copy.remap(ds, mapping, -1, -1, 0); ds.addAlignmentAnnotation(ala_copy); if (ds != sequence) {