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

João Rodrigues anaryin at gmail.com
Tue May 17 10:14:25 UTC 2011


Hey,

That's something I noticed too. Some errors still have
PDBConstructionException as a base class, while most of them have
PDBConstructionWarning. Only these latter are regulated by the new scheme. I
believe they were also raised before, but inside the _handle_pdb_exception
function IIRC.

Regarding performance, that's something we can easily check with the
benchmarks. The difference is not big, the PDB branch and 1.57+ differ just
in that particular detail.

Cheers,

João [...] Rodrigues
http://nmr.chem.uu.nl/~joao



On Tue, May 17, 2011 at 12:02 PM, Peter Cock <p.j.a.cock at googlemail.com>wrote:

> 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