[Biopython] Parsing records off PubMed vs. PubMedCentral.
Jose C. Lacal
Jose.Lacal at OpenPHI.com
Wed Nov 18 23:19:09 UTC 2009
Greetings:
I'm just starting to use BioPython and this may be a dumb question.
I've been following the excellent tutorial at
http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc88
My question refers to section 8.11.1
a.) I am able to query, retrieve and parse files from db="pubmed" as per
the code below. This works.
from Bio import Entrez, Medline
Entrez.email = "Jose.Lacal at OpenPHI.com"
handle = handle = Entrez.esearch(db="pubmed",
term="hypertension[all]&George+Mason+University[affl]",
rettype="medline", retmode="text")
record = Entrez.read(handle)
print record["IdList"]
idlist = record["IdList"]
handle =
Entrez.efetch(db="pubmed",id=idlist,rettype="medline",retmode="text")
records = Medline.parse(handle)
for record in records:
print record["AU"]
b.) But when I change db="pubmed" to db="pmc" I get an error message:
KeyError: 'AU'
It looks like "pmc" does not have the same keys as "pubmed" And I've
been unable to find the equivalent format to parse files downloaded from
"pmc"
Pointers and suggestions most appreciated. regards.
--
----- ----- -----
Jose C. Lacal, Founder & Chief Vision Officer
Open Personalized Health Informatics "OpenPHI"
15625 NW 15th Avenue; Suite 15
Miami, FL 33169-5601 USA www.OpenPHI.com
[M] +1 (954) 553-1984 Jose.Lacal at OpenPHI.com
OpenPHI is an information management company.
We acquire, compile, and manage mailing lists
in the global academic & bio-medical spaces.
See: http://www.openphi.com/healthmining.html
More information about the Biopython
mailing list