[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 19:08:29 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2751





------- Comment #8 from eric.talevich at gmail.com  2009-02-09 14:08 EST -------
(In reply to comment #7)

Works for me. Thanks!

> I can appreciate that getting these warnings hundreds of times from a single
> file would be annoying, so perhaps if the fields are just blank a single
> warning should be given?

I haven't explored the rest of Biopython's internals yet -- is there a general
logging/warning system where verbosity is configured globally?

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?


> 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.

Scientific Python's PDB parser handles the file without complaint.


> 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.


-- 
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