From: tcofoegbu Date: Mon, 17 Oct 2016 11:32:38 +0000 (+0100) Subject: JAL-2262 JAL-2195 Improvement to set PDBId availability in a flag X-Git-Tag: Release_2_10_0b1~3^2~13 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8a5e0bc033d75200f22202146b5dc448b2b70a39;p=jalview.git JAL-2262 JAL-2195 Improvement to set PDBId availability in a flag --- diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 5866d51..b2ba256 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -154,10 +154,12 @@ public class JmolParser extends StructureFile implements JmolStatusListener if (pdbId == null) { setId(safeName(getDataName())); + setPDBIdAvailable(false); } else { setId(pdbId); + setPDBIdAvailable(true); } List significantAtoms = convertSignificantAtoms(ms); for (Atom tmpatom : significantAtoms) diff --git a/src/jalview/io/StructureFile.java b/src/jalview/io/StructureFile.java index 2fe386b..26c202c 100644 --- a/src/jalview/io/StructureFile.java +++ b/src/jalview/io/StructureFile.java @@ -67,6 +67,8 @@ public abstract class StructureFile extends AlignFile private Vector chains; + private boolean pdbIdAvailable; + public StructureFile(String inFile, String type) throws IOException { super(inFile, type); @@ -467,4 +469,19 @@ public abstract class StructureFile extends AlignFile { return new PDBFeatureSettings(); } + + /** + * Answers true if the structure file has a PDBId + * + * @return + */ + public boolean isPPDBIdAvailable() + { + return pdbIdAvailable; + } + + public void setPDBIdAvailable(boolean pdbIdAvailable) + { + this.pdbIdAvailable = pdbIdAvailable; + } } diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 2e0975d..7e691be 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -390,11 +390,9 @@ public class StructureSelectionManager { registerPDBFile(pdb.getId().trim(), pdbFile); } - // if PDB/mmCIF file is local then don't perform SIFTS MAPPING - if (pdb.getId().contains(".")) - { - isMapUsingSIFTs = false; - } + // if PDBId is unavailable then skip SIFTS mapping execution path + isMapUsingSIFTs = pdb.isPPDBIdAvailable(); + } catch (Exception ex) { ex.printStackTrace();