Repository navigation
More robust support for MMcif parsing non-polymeric chains - #394
Conversation
|
I think this looks good. It's a better solution than discarding it. I've only found a small issue that I fixed in my fork and pull requested to your branch. If you accept my PR to your branch it will appear here too. Thanks! |
Adding back-reference from chain to compound
|
Thanks Jose for taking the time to look through this and add in your fix. This change will be useful for non-conventional mmCIF files like isolated ligands, etc. |
More robust support for MMcif parsing non-polymeric chains
|
I've found a small issue with this, the PDB parser is not consistent with the mmCIF parser for entries like 4a10. Weirdly in the PDB file for 4a10, the waters are assigned to a separate chain F different from all the polymers. The PDB parser seems to throw the chain away, whilst with the above patch the mmCIF parser keeps the chain. I found the problem by running this test manually (excluded from maven in normal builds): |
|
I see in the PDBFileParser, line 2136: Are there certain BioJava API functions that having water-only chains is a problem? There could be a valid reason for having such information in the file. For example, when making the models there might be many temporary chains containing only waters or ligands. I would argue that parsers should do their best to create Structures that are faithful to the PDB/mmCIF being parsed. It's easy to remove chains after the Structure has been parsed but frustrating if the parsers are simply throwing away data without a reason. |
|
I agree that the parser should not throw it away, so we should try to do something about it. I'm working on it in branch https://github.com/josemduarte/biojava/tree/nonpoly-only-chains. The issue is that a Chain in Biojava currently is expected to have some polymer groups (nucleotides or aminoacids), if you don't have them at all many things go wrong: there's no sequence, no representative atoms (CA or phosphates), etc. |
This changes the behavior of parsers quite a lot: compounds are assigned to pure non-poly chains.
|
Alright the issue should be fixed with my last commits. Now all chains are parsed and new compounds created if they don't exist in file. Both for PDB and mmCIF parsers |
|
Jose, Thanks for doing the further work in both parsers! This should now be a On Tue, Feb 2, 2016 at 4:23 PM, Jose Manuel Duarte <[email protected]
Matt Larson, PhD |
This pull request is for a change to support issue #305 (More robust PDB/mmCIF parsing for non-deposited files). I've added a unit test for how PDBFileParser and SimpleMMcifConsumer parse non-polymeric chains to TestNonDepositedFiles.java. The default behavior of the PDBFileParser is to accept chains that have no protein or nucleic acid residues and to create from these new Chain(s) in the Structure. We should preserve the information in a Structure for a user's supplied input (if valid). SimpleMMcifConsumer is modified to create Compounds for an orphaned non-polymer chain.