From 84e882e59ed2ba127f53e77c8ae52b3358638771 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 20 Oct 2014 13:48:40 +0100 Subject: [PATCH] JAL-674 don't create multiple secondary structure lines for a particular sequence/PDB mapping --- .../structure/StructureSelectionManager.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 8a5f02a..4d94b2d 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -189,9 +189,26 @@ public class StructureSelectionManager * the tried and tested MCview pdb mapping */ MCview.PDBfile pdb = null; + boolean parseSecStr=true; + for (SequenceI sq:sequence) + { + SequenceI ds = sq;while (ds.getDatasetSequence()!=null) { ds = ds.getDatasetSequence();}; + if (ds.getAnnotation()!=null) + { + for (AlignmentAnnotation ala:ds.getAnnotation()) + { + // false if any annotation present from this structure + if (MCview.PDBfile.isCalcIdForFile(ala.getCalcId(), pdbFile)) + { + parseSecStr = false; + } + } + } + } try { - pdb = new MCview.PDBfile(pdbFile, protocol); + pdb = new MCview.PDBfile(true, parseSecStr, pdbFile, protocol); + } catch (Exception ex) { ex.printStackTrace(); -- 1.7.10.2