Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check PDB file format #55

Open
jonblack opened this issue Jan 13, 2015 · 2 comments
Open

Check PDB file format #55

jonblack opened this issue Jan 13, 2015 · 2 comments

Comments

@jonblack
Copy link
Contributor

This issue was copied from cmbi/xssp-api#64.

When PDB file is chosen as an option, check that the file is indeed a PDB file and give a clear error message indicating so.

Initially it was believed that the error message given by xssp would be enough, but it seems not to be the case. There are still users providing fasta files.

@jonblack
Copy link
Contributor Author

The PDB parser ignores missing sections and ends up failing on invalid data because no chains could be parsed. Whilst this is robust, the error message shown isn't very useful:

  if (mChains.empty())
    throw mas_exception("empty protein, or no valid complete residues");

The PDB file specification has mandatory record types, such as HEADER. Ideally the parser should report missing mandatory sections, but that's a lot of effort.

@touwwouter
What do you think about adding a check where, if the HEADER record type isn't present (which according to the specification should be the first line and only appears once as a single line), that we raise a mas_exception with the text "Not a PDB file"?

@touwwouter touwwouter removed this from the next milestone May 6, 2015
@touwwouter
Copy link
Collaborator

(We talked about this, but given the recent activity I will comment here). More informative error messages are helpful. I think, however, that files should be allowed if they have ATOM/HETATM records. Even without HEADER.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants