You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Quaternary Symmetry Detection Broken with MMTF #517
Using structures downloaded with the MMTF format break the QuatSymmetryDetector algorithm. It is related to the chemical component information. The tests explicitly set the format to MMCIF, so that is why the bug was not noticed when changing MMTF to default.
Here the stacktrace when the line cache.setUseMmCif(true); in TestQuatSymmetryDetection or DemoOrientBioAssembly is commented out (MMTF used):
java.lang.NullPointerException
at org.biojava.nbio.structure.io.mmcif.ChemCompGroupFactory.getChemComp(ChemCompGroupFactory.java:47)
at org.biojava.nbio.structure.HetatomImpl.getChemComp(HetatomImpl.java:429)
at org.biojava.nbio.structure.ChainImpl.getSeqResSequence(ChainImpl.java:576)
at org.biojava.nbio.structure.symmetry.core.ProteinChainExtractor.extractProteinChains(ProteinChainExtractor.java:121)
at org.biojava.nbio.structure.symmetry.core.ProteinChainExtractor.run(ProteinChainExtractor.java:95)
at org.biojava.nbio.structure.symmetry.core.ProteinChainExtractor.getCalphaTraces(ProteinChainExtractor.java:60)
at org.biojava.nbio.structure.symmetry.core.ProteinSequenceClusterer.extractProteinChains(ProteinSequenceClusterer.java:98)
at org.biojava.nbio.structure.symmetry.core.ProteinSequenceClusterer.run(ProteinSequenceClusterer.java:88)
at org.biojava.nbio.structure.symmetry.core.ProteinSequenceClusterer.getSequenceAlignmentClusters(ProteinSequenceClusterer.java:56)
at org.biojava.nbio.structure.symmetry.core.ClusterProteinChains.run(ClusterProteinChains.java:84)
at org.biojava.nbio.structure.symmetry.core.ClusterProteinChains.(ClusterProteinChains.java:42)
at org.biojava.nbio.structure.symmetry.core.QuatSymmetryDetector.run(QuatSymmetryDetector.java:104)
at org.biojava.nbio.structure.symmetry.core.QuatSymmetryDetector.hasProteinSubunits(QuatSymmetryDetector.java:74)
at org.biojava.nbio.structure.symmetry.analysis.CalcBioAssemblySymmetry.orient(CalcBioAssemblySymmetry.java:70)
at demo.DemoOrientBioAssembly.runPDB(DemoOrientBioAssembly.java:108)
at demo.DemoOrientBioAssembly.main(DemoOrientBioAssembly.java:81)
As a side discussion related to this issue, should we make sure that tests do not change the defaults unless they are testing for a specific detail of the non-default options?
In this case, the format from which the structure is parsed should not make a difference in the symmetry detection. Otherwise, there is a problem with the parsing.
I am not sure what changed since Friday, but TestQuatSymmetryDetection in the current master branch, commenting out the cache.setUseMmCif(true); line, throws the mentioned Exception again.
@abradle pull request #538 does not fully fix this issue. I switched all tests of TestQuatSymmetryDetector back to mmtf and two of them fail. I pushed the commit to the master branch and it is failing in those tests.
As a hint, I think something of the chemical component information is not populated when generating the biological assemblies from symmetry mates and a NPE is thrown.
Thank you for looking at it and sorry to be insisting.
I've reassigned this one to me. I've been wanting to have a look at it for a while (it breaks the biojava build right now), but haven't got round to do it. I'll try in the next days.
One additional issue I'm seeing right now: the tests outcome is different if run from maven than if they are run altogether in eclipse. That's due to issue #103 i.e. the singleton problem in AtomCache biting yet again.
For this particular case, what happens is that mmcif is used for some tests and then (if running in the same JVM) later tests reuse that state of the AtomCache without resetting it to mmtf.
I tracked down the issue in TestQuatSymmetryDetection to a problem in the mmtf inflation where seqres groups are not populated correctly. They should at least have a PDBname (3-letter aminoacid code).
Activity
abradle commentedon Jun 17, 2016
Hi Aleix!
Is this using the latest master? I think I found this bug (Wednesday) and fixed it Thursday.
lafita commentedon Jun 17, 2016
As a side discussion related to this issue, should we make sure that tests do not change the defaults unless they are testing for a specific detail of the non-default options?
In this case, the format from which the structure is parsed should not make a difference in the symmetry detection. Otherwise, there is a problem with the parsing.
lafita commentedon Jun 17, 2016
Thanks @abradle. I was unlucky and had not pulled your fix yet. Everything working fine now.
abradle commentedon Jun 17, 2016
Aweseome! Yes I agree with that rule.
lafita commentedon Jun 17, 2016
I will change the tests to use the default (MMTF) to make sure future changes in the format work fine with this part.
Use default file format (MMTF) for QuatSymmetry test and demo
lafita commentedon Jun 20, 2016
I am not sure what changed since Friday, but
TestQuatSymmetryDetectionin the current master branch, commenting out thecache.setUseMmCif(true);line, throws the mentioned Exception again.abradle commentedon Jul 15, 2016
Sorry - forgot about this - thanks for assigning. Will look into it (seems to be to do with chem comps for seq res groups).
Remove the useMmcif from test
Change all QuatSymmetry tests to mmtf format
lafita commentedon Jul 18, 2016
@abradle pull request #538 does not fully fix this issue. I switched all tests of
TestQuatSymmetryDetectorback to mmtf and two of them fail. I pushed the commit to the master branch and it is failing in those tests.As a hint, I think something of the chemical component information is not populated when generating the biological assemblies from symmetry mates and a
NPEis thrown.Thank you for looking at it and sorry to be insisting.
josemduarte commentedon Jul 25, 2016
I've reassigned this one to me. I've been wanting to have a look at it for a while (it breaks the biojava build right now), but haven't got round to do it. I'll try in the next days.
josemduarte commentedon Jul 26, 2016
One additional issue I'm seeing right now: the tests outcome is different if run from maven than if they are run altogether in eclipse. That's due to issue #103 i.e. the singleton problem in AtomCache biting yet again.
For this particular case, what happens is that mmcif is used for some tests and then (if running in the same JVM) later tests reuse that state of the AtomCache without resetting it to mmtf.
josemduarte commentedon Jul 26, 2016
Correction: the singleton problem is in
StructureIO, notAtomCachejosemduarte commentedon Jul 26, 2016
I tracked down the issue in
TestQuatSymmetryDetectionto a problem in the mmtf inflation where seqres groups are not populated correctly. They should at least have a PDBname (3-letter aminoacid code).I've extended
TestMmtfRoundTripto test the seqres groups to demonstrate the issue, see this branch: https://github.com/josemduarte/biojava/tree/fixIssue517Fixing biojava#517