From: Jim Procter Date: Wed, 8 Dec 2021 18:52:45 +0000 (+0000) Subject: JAL-3929 don’t use the url encoded pdbId in feature group when transferring features... X-Git-Tag: Release_2_11_2_0~21^2~1^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=57381bb294ebc639073c198d14b03e16ca6aff97;p=jalview.git JAL-3929 don’t use the url encoded pdbId in feature group when transferring features from associated structure to a sequence --- diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index ad57831..0ab9baf 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -548,7 +548,7 @@ public class StructureSelectionManager pdb, maxChain, sqmpping, maxAlignseq, siftsClient); seqToStrucMapping.add(siftsMapping); maxChain.makeExactMapping(siftsMapping, seq); - maxChain.transferRESNUMFeatures(seq, "IEA: SIFTS"); + maxChain.transferRESNUMFeatures(seq, "IEA: SIFTS",pdb.getId()); maxChain.transferResidueAnnotation(siftsMapping, null); ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); @@ -560,7 +560,7 @@ public class StructureSelectionManager targetChainId, maxChain, pdb, maxAlignseq); seqToStrucMapping.add(nwMapping); maxChain.makeExactMapping(maxAlignseq, seq); - maxChain.transferRESNUMFeatures(seq, "IEA:Jalview"); // FIXME: is + maxChain.transferRESNUMFeatures(seq, "IEA:Jalview",pdb.getId()); // FIXME: is // this // "IEA:Jalview" ? maxChain.transferResidueAnnotation(nwMapping, sqmpping); @@ -580,7 +580,7 @@ public class StructureSelectionManager siftsClient); foundSiftsMappings.add(siftsMapping); chain.makeExactMapping(siftsMapping, seq); - chain.transferRESNUMFeatures(seq, "IEA: SIFTS");// FIXME: is this + chain.transferRESNUMFeatures(seq, "IEA: SIFTS",pdb.getId());// FIXME: is this // "IEA:SIFTS" ? chain.transferResidueAnnotation(siftsMapping, null); } catch (SiftsException e) @@ -605,7 +605,7 @@ public class StructureSelectionManager StructureMapping nwMapping = getNWMappings(seq, pdbFile, maxChainId, maxChain, pdb, maxAlignseq); seqToStrucMapping.add(nwMapping); - maxChain.transferRESNUMFeatures(seq, null); // FIXME: is this + maxChain.transferRESNUMFeatures(seq, null,pdb.getId()); // FIXME: is this // "IEA:Jalview" ? maxChain.transferResidueAnnotation(nwMapping, sqmpping); ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); @@ -773,7 +773,7 @@ public class StructureSelectionManager maxChain.makeExactMapping(maxAlignseq, seq); jalview.datamodel.Mapping sqmpping = maxAlignseq .getMappingFromS1(false); - maxChain.transferRESNUMFeatures(seq, null); + maxChain.transferRESNUMFeatures(seq, null, pdb.getId()); HashMap mapping = new HashMap<>(); int resNum = -10000; diff --git a/src/mc_view/PDBChain.java b/src/mc_view/PDBChain.java index 70fda66..425bc18 100755 --- a/src/mc_view/PDBChain.java +++ b/src/mc_view/PDBChain.java @@ -229,11 +229,16 @@ public class PDBChain * @param seq * @param status * The Status of the transferred annotation - * @param actualGroupId the group id for the features on the destination sequence (e.g. the official accession ID) + * + * @param altPDBID the group id for the features on the destination sequence (e.g. the official accession ID) */ public void transferRESNUMFeatures(SequenceI seq, - String status) + String status, String altPDBID) { + if (altPDBID==null) + { + altPDBID = pdbid; + } SequenceI sq = seq; while (sq != null && sq.getDatasetSequence() != null) { @@ -266,7 +271,7 @@ public class PDBChain int newEnd = 1 + residues.elementAt(feature.getEnd() - offset).atoms .elementAt(0).alignmentMapping; SequenceFeature tx = new SequenceFeature(feature, newBegin, newEnd, - pdbid, feature.getScore()); + altPDBID, feature.getScore()); tx.setStatus(status + ((tx.getStatus() == null || tx.getStatus().length() == 0) ? ""