From: Jim Procter Date: Sun, 11 Feb 2018 11:04:57 +0000 (+0000) Subject: JAL-2781 use SIFTs mapping rather than maxChain AlignSeq to propagate annotation... X-Git-Tag: Release_2_10_4~68^2~19 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=602686d713d7b4554b96d09847a77a675dae3aab;p=jalview.git JAL-2781 use SIFTs mapping rather than maxChain AlignSeq to propagate annotation and sequence features to sequence being associated --- diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 35e2536..2b429d7 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -526,10 +526,10 @@ public class StructureSelectionManager siftsMapping = getStructureMapping(seq, pdbFile, targetChainId, pdb, maxChain, sqmpping, maxAlignseq); seqToStrucMapping.add(siftsMapping); - maxChain.makeExactMapping(maxAlignseq, seq); - maxChain.transferRESNUMFeatures(seq, null);// FIXME: is this + maxChain.makeExactMapping(siftsMapping, seq); + maxChain.transferRESNUMFeatures(seq, "IEA: SIFTS");// FIXME: is this // "IEA:SIFTS" ? - maxChain.transferResidueAnnotation(siftsMapping, sqmpping); + maxChain.transferResidueAnnotation(siftsMapping, null); ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); } catch (SiftsException e) @@ -540,7 +540,8 @@ public class StructureSelectionManager targetChainId, maxChain, pdb, maxAlignseq); seqToStrucMapping.add(nwMapping); maxChain.makeExactMapping(maxAlignseq, seq); - maxChain.transferRESNUMFeatures(seq, null); // FIXME: is this + maxChain.transferRESNUMFeatures(seq, "IEA:Jalview"); // FIXME: is + // this // "IEA:Jalview" ? maxChain.transferResidueAnnotation(nwMapping, sqmpping); ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); @@ -551,11 +552,16 @@ public class StructureSelectionManager List foundSiftsMappings = new ArrayList<>(); for (PDBChain chain : pdb.getChains()) { + StructureMapping siftsMapping = null; try { - StructureMapping siftsMapping = getStructureMapping(seq, + siftsMapping = getStructureMapping(seq, pdbFile, chain.id, pdb, chain, sqmpping, maxAlignseq); foundSiftsMappings.add(siftsMapping); + chain.makeExactMapping(siftsMapping, seq); + chain.transferRESNUMFeatures(seq, "IEA: SIFTS");// FIXME: is this + // "IEA:SIFTS" ? + chain.transferResidueAnnotation(siftsMapping, null); } catch (SiftsException e) { System.err.println(e.getMessage()); @@ -564,11 +570,6 @@ public class StructureSelectionManager if (!foundSiftsMappings.isEmpty()) { seqToStrucMapping.addAll(foundSiftsMappings); - maxChain.makeExactMapping(maxAlignseq, seq); - maxChain.transferRESNUMFeatures(seq, null);// FIXME: is this - // "IEA:SIFTS" ? - maxChain.transferResidueAnnotation(foundSiftsMappings.get(0), - sqmpping); ds.addPDBId(sqmpping.getTo().getAllPDBEntries().get(0)); } else @@ -639,7 +640,7 @@ public class StructureSelectionManager PDBChain chain = pdb.findChain(targetChainId); if (chain != null) { - chain.transferResidueAnnotation(curChainMapping, sqmpping); + chain.transferResidueAnnotation(curChainMapping, null); } } catch (Exception e) {