[Biopython] How to get Free R value and Report mistakes in the documents
Huan Wang
huan.wang at mail.huji.ac.il
Mon Jul 10 09:28:14 UTC 2017
Dear all,
I am a newbie to Biopython and I would like to extract the Free R values
from PDB files.
After asking Google and browsing the Biopython document, I did not find the
solution yet.
It seems that Biopython only can read and get the resolution and journal
information etc. from the header of the PDB file.
http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc150
My question is does the Biopython able to fetch the Free R values from PDB
file? Or I need to write my own script to get those values.
*In addition,* I found two mistakes in the section 11.1.1 Readin a PDB
file.
(1)
>>> from Bio.PDB.PDBParser import PDBParser
>>> p = PDBParser(PERMISSIVE=1)
>>> structure_id = "1fat"
>>> filename = "pdb1fat.ent"
>>> s = p.get_structure(structure_id, filename)
However, the following codes do not work,
>>> resolution = structure.header['resolution']
>>> keywords = structure.header['keywords']
Actually, they should be
>>> resolution = s.header['resolution']
>>> keywords = s.header['keywords']
Because the variable, s, has been defined, however, structure did not.
(2) just below the above-mentioned example,
The dictionary can also be created without creating a Structure object, ie.
directly from the PDB file:
>>> with open(filename, 'r') as handle:
... header_dict = parse_pdb_header(handle)
...
However, it does not work. The error message is "name
'parse_pdb_header' is not defined ".
*Actually, one need to import the module parse_pdb_header **first*, as
shown below,
*>>> from Bio.PDB import parse_pdb_header*
>>> with open(filename, 'r') as handle:
... header_dict = parse_pdb_header(handle)
...
Then, header_dict will get the information from the PDB file.
I hope the developers will correct those mistakes in the document. Thank
you very much.
Best wishes,
Huan
.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20170710/47ea9a25/attachment.html>
More information about the Biopython
mailing list