[Biopython-dev] [Bug 2751] PDBParser crashes on empty tempFactor fields
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Mon Feb 9 15:36:26 EST 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2751
biopython-bugzilla at maubp.freeserve.co.uk changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #9 from biopython-bugzilla at maubp.freeserve.co.uk 2009-02-09 15:36 EST -------
(In reply to comment #8)
>
> I haven't explored the rest of Biopython's internals yet -- is
> there a generallogging/warning system where verbosity is
> configured globally?
No, this is specific to Bio.PDB, presumably a reaction to the number
of technically invalid but still useful PDB files one has to deal with.
> Another issue: These warnings are printed to standard out, rather
> than standard error; that would screw up a pipeline. Tracebacks,
> for instance, are printed on standard error. I assume this
> complain->stdout situation is the case across the
> codebase -- should I file a separate bug for that?
Please do - but keep it focused on Bio.PDB as I can't think of any
other modules which do anything similar off hand.
> > If you can find any official PDB examples which do this, or get
> > clarification regarding the "legality" of omitting these fields,
> > then I would be happy to change this code. Where are you
> > getting your PDB files from?
>
> Another person in my lab reported the problem. Some other program
> extracted the 'B' chain from the full PDB file to create this one;
> I don't know which one, but I believe it's out in the wild, rather
> than a home-grown script.
Fair enough. If you can chase that up, it will make other people's
lives a tiny bit easier in the future - assuming my reading of the PDB
format is valid that is ;)
You should be able work with the full PDB file in Biopython, and just
look at the one chain you are interested in.
> Scientific Python's PDB parser handles the file without complaint.
If I was convinced missing occupancy or B-factors were valid then I agree
Biopython shouldn't "complain" either.
> > Note that I have not attempted to deal with ANISOU, SIGUIJ or SIGATM
> > records. Do you have any examples of this, or were these changes just
> > defensive programming?
>
> I have no examples, it's just defensive. Using try_float() instead of
> float() everywhere re-raises any ValueExceptions as
> PDBConstructionExceptions, and only eats the exception if a default value
> is supplied. Some Scheme sympathies showing, I guess -- it's a closure that
> generally works the same as the float constructor, but with our own error
> handling.
Fair enough. I didn't want to make any "invasive" changes without
the original author's input. Anyway, marking this bug as fixed.
Thank you Eric!
Peter
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list