Skip to content

Quaternary Symmetry Detection Broken with MMTF #517

Closed

Description

@lafita

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)

Activity

  1. abradle commented on Jun 17, 2016

    @abradle
    Contributor

    Hi Aleix!

    Is this using the latest master? I think I found this bug (Wednesday) and fixed it Thursday.

  2. lafita commented on Jun 17, 2016

    @lafita
    MemberAuthor

    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.

  3. lafita commented on Jun 17, 2016

    @lafita
    MemberAuthor

    Thanks @abradle. I was unlucky and had not pulled your fix yet. Everything working fine now.

  4. abradle commented on Jun 17, 2016

    @abradle
    Contributor

    Aweseome! Yes I agree with that rule.

  5. lafita commented on Jun 17, 2016

    @lafita
    MemberAuthor

    I will change the tests to use the default (MMTF) to make sure future changes in the format work fine with this part.

  6. lafita commented on Jun 20, 2016

    @lafita
    MemberAuthor

    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.

  7. reopened this on Jun 20, 2016
  8. added this to the BioJava 5.0.0 milestone on Jul 15, 2016
  9. abradle commented on Jul 15, 2016

    @abradle
    Contributor

    Sorry - forgot about this - thanks for assigning. Will look into it (seems to be to do with chem comps for seq res groups).

  10. added a commit that references this issue on Jul 15, 2016
  11. reopened this on Jul 18, 2016
  12. lafita commented on Jul 18, 2016

    @lafita
    MemberAuthor

    @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.

  13. josemduarte commented on Jul 25, 2016

    @josemduarte
    Contributor

    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.

  14. josemduarte commented on Jul 26, 2016

    @josemduarte
    Contributor

    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.

  15. josemduarte commented on Jul 26, 2016

    @josemduarte
    Contributor

    Correction: the singleton problem is in StructureIO, not AtomCache

  16. josemduarte commented on Jul 26, 2016

    @josemduarte
    Contributor

    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).

    I've extended TestMmtfRoundTrip to test the seqres groups to demonstrate the issue, see this branch: https://github.com/josemduarte/biojava/tree/fixIssue517

  17. added a commit that references this issue on Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugBugs and bugfixes

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions