From: tcofoegbu Date: Mon, 10 Oct 2016 14:58:55 +0000 (+0100) Subject: JAL-2262 JAL-2195 bug fix for mapping local structure files X-Git-Tag: Release_2_10_0b1~3^2~15^2~6^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e97cd6659f6bcac55dc030e770192b0044960dc5;p=jalview.git JAL-2262 JAL-2195 bug fix for mapping local structure files --- diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index b74f101..7774dac 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -199,7 +199,8 @@ public class PDBChain } for (int i = 0; i < features.length; i++) { - if (features[i].getFeatureGroup().equals(pdbid)) + if (features[i].getFeatureGroup() != null + && features[i].getFeatureGroup().equals(pdbid)) { SequenceFeature tx = new SequenceFeature(features[i]); tx.setBegin(1 + residues.elementAt(tx.getBegin() - offset).atoms diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 1800ef0..c73657f 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -151,7 +151,15 @@ public class JmolParser extends StructureFile implements JmolStatusListener List prot = new ArrayList(); PDBChain tmpchain; String pdbId = (String) ms.getInfo(0, "title"); - setId(pdbId); + + if (pdbId == null) + { + setId(safeName(getDataName())); + } + else + { + setId(pdbId); + } List significantAtoms = convertSignificantAtoms(ms); for (Atom tmpatom : significantAtoms) { @@ -166,7 +174,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener tmpchain.atoms.addElement(tmpatom); } catch (Exception e) { - tmpchain = new PDBChain(pdbId, tmpatom.chain); + tmpchain = new PDBChain(getId(), tmpatom.chain); getChains().add(tmpchain); tmpchain.atoms.addElement(tmpatom); } @@ -177,10 +185,6 @@ public class JmolParser extends StructureFile implements JmolStatusListener makeResidueList(); makeCaBondList(); - if (getId() == null) - { - setId(safeName(getDataName())); - } for (PDBChain chain : getChains()) { SequenceI chainseq = postProcessChain(chain); diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 612b168..2e0975d 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -390,6 +390,11 @@ 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; + } } catch (Exception ex) { ex.printStackTrace();