[Biopython-dev] Adding QUIET argument to PDBParser()

Peter Cock p.j.a.cock at googlemail.com
Tue May 17 10:02:08 UTC 2011


On Fri, May 13, 2011 at 8:35 PM, João Rodrigues <anaryin at gmail.com> wrote:
> Hello all,
>
> Not to let this die.
>
> I've added PERMISSIVE=2 to PDBParser. I also changed the code to remove the
> _handle_pdb_exception method and replace it by the warnings module.
>
> This was done in two commits in my branch:
>
> https://github.com/JoaoRodrigues/biopython/commit/5b44defc3eb0a3505668ac77b59c8980630e6b07
> https://github.com/JoaoRodrigues/biopython/commit/7383e068e41dd624458b3904fcd61a04c3f319c4
>

Is getting ride of _handle_PDB_exception a good idea for performance?
If I have understood your code, you just raise a warning in all cases.
Then, you have a filter that either promotes the warning to an exception
(permissive=0), or silences the warning (permissive=2).

Also, do we want to have the same three options for all the recoverable
errors? e.g. Currently, missing elements never raise an exception.

Peter




More information about the Biopython-dev mailing list