From 9e9c7a6358edca8b749b6f760f7faabe364feadf Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 7 Sep 2016 11:57:09 +0100 Subject: [PATCH] =?utf8?q?JAL-1803=20transfer=20mapped=20chain=E2=80=99s=20P?= =?utf8?q?DBEntry=20to=20the=20*dataset*=20SequenceI=20it=20was=20mapped=20t?= =?utf8?q?o?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../structure/StructureSelectionManager.java | 31 +++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 182a48f..c27289c 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -428,6 +428,12 @@ public class StructureSelectionManager { boolean infChain = true; final SequenceI seq = sequenceArray[s]; + SequenceI ds = seq; + while (ds.getDatasetSequence() != null) + { + ds = ds.getDatasetSequence(); + } + if (targetChainIds != null && targetChainIds[s] != null) { infChain = false; @@ -518,8 +524,11 @@ public class StructureSelectionManager pdb, maxChain, sqmpping, maxAlignseq); seqToStrucMapping.add(siftsMapping); maxChain.makeExactMapping(maxAlignseq, seq); - maxChain.transferRESNUMFeatures(seq, null); + maxChain.transferRESNUMFeatures(seq, null);// FIXME: is this + // "IEA:SIFTS" ? maxChain.transferResidueAnnotation(siftsMapping, sqmpping); + ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); + } catch (SiftsException e) { // fall back to NW alignment @@ -527,6 +536,11 @@ public class StructureSelectionManager StructureMapping nwMapping = getNWMappings(seq, pdbFile, targetChainId, maxChain, pdb, maxAlignseq); seqToStrucMapping.add(nwMapping); + maxChain.makeExactMapping(maxAlignseq, seq); + maxChain.transferRESNUMFeatures(seq, null); // FIXME: is this + // "IEA:Jalview" ? + maxChain.transferResidueAnnotation(nwMapping, sqmpping); + ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); } } else @@ -549,15 +563,21 @@ public class StructureSelectionManager { seqToStrucMapping.addAll(foundSiftsMappings); maxChain.makeExactMapping(maxAlignseq, seq); - maxChain.transferRESNUMFeatures(seq, null); + maxChain.transferRESNUMFeatures(seq, null);// FIXME: is this + // "IEA:SIFTS" ? maxChain.transferResidueAnnotation(foundSiftsMappings.get(0), sqmpping); + ds.addPDBId(sqmpping.getTo().getAllPDBEntries().get(0)); } else { StructureMapping nwMapping = getNWMappings(seq, pdbFile, maxChainId, maxChain, pdb, maxAlignseq); seqToStrucMapping.add(nwMapping); + maxChain.transferRESNUMFeatures(seq, null); // FIXME: is this + // "IEA:Jalview" ? + maxChain.transferResidueAnnotation(nwMapping, sqmpping); + ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); } } } @@ -566,8 +586,11 @@ public class StructureSelectionManager setProgressBar(null); setProgressBar(MessageManager .getString("status.obtaining_mapping_with_nw_alignment")); - seqToStrucMapping.add(getNWMappings(seq, pdbFile, maxChainId, - maxChain, pdb, maxAlignseq)); + StructureMapping nwMapping = getNWMappings(seq, pdbFile, + maxChainId, maxChain, pdb, maxAlignseq); + seqToStrucMapping.add(nwMapping); + ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); + } if (forStructureView) -- 1.7.10.2