From 57381bb294ebc639073c198d14b03e16ca6aff97 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 8 Dec 2021 18:52:45 +0000 Subject: [PATCH] =?utf8?q?JAL-3929=20don=E2=80=99t=20use=20the=20url=20encod?= =?utf8?q?ed=20pdbId=20in=20feature=20group=20when=20transferring=20features?= =?utf8?q?=20from=20associated=20structure=20to=20a=20sequence?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/structure/StructureSelectionManager.java | 10 +++++----- src/mc_view/PDBChain.java | 11 ++++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) 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) ? "" -- 1.7.10.2