[Biopython-dev] Strange behaviour in efetching Pubmed citations

Maurice Ling mauriceling at gmail.com
Mon Nov 26 15:23:31 UTC 2012


Hi

I found something strange in my download script to pull a list of pubmed
citations. This was working in the past (back in 2008 period)...

The script is

ID_start = 19000000
ID_stop = 19000010
downtime = 1.2

from Bio import Entrez
from Bio import Medline
import string
import time
import cPickle

Entrez.email = 'maurice.ling at sdstate.edu'

while (ID_start < ID_stop):
    try:
        handle = Entrez.efetch(db="pubmed", id=[str(ID_start)],
rettype="medline",
                           retmode="text")
        records = list(Medline.parse(handle))[0]
        print records
        cPickle.dump(records, open(str(ID_start) + '.txt', 'w'), -1)
        ID_start = ID_start + 1
        time.sleep(downtime)
        print 'ID count: ', str(ID_start)
    except:
        print 'ID count: error ', str(ID_start)
        ID_start = ID_start + 1

But the results from print records kept showing the same thing:

{'STAT': 'MEDLINE', 'IP': '2', 'JT': 'Biochemical medicine', 'DA':
'19760116', 'FAU': ['Makar, A B', 'McMartin, K E', 'Palese, M', 'Tephly, T
R'], 'DP': '1975 Jun', 'OWN': 'NLM', 'PT': ['Journal Article', "Research
Support, U.S. Gov't, P.H.S."], 'LA': ['eng'], 'CRDT': ['1975/06/01 00:00'],
'DCOM': '19760116', 'LR': '20091111', 'PG': '117-26', 'TI': 'Formate assay
in body fluids: application in methanol poisoning.', 'RN': ['0 (Formates)',
'124-38-9 (Carbon Dioxide)', '67-56-1 (Methanol)', 'EC 1.2.- (Aldehyde
Oxidoreductases)'], 'PL': 'UNITED STATES', 'TA': 'Biochem Med', 'JID':
'0151424', 'VI': '13', 'IS': '0006-2944 (Print) 0006-2944 (Linking)', 'AU':
['Makar AB', 'McMartin KE', 'Palese M', 'Tephly TR'], 'MHDA': '1975/06/01
00:01', 'MH': ['Aldehyde Oxidoreductases/metabolism', 'Animals', 'Body
Fluids/*analysis', 'Carbon Dioxide/blood', 'Formates/blood/*poisoning',
'Haplorhini', 'Humans', 'Hydrogen-Ion Concentration', 'Kinetics',
'Methanol/blood', 'Methods', 'Pseudomonas/enzymology'], 'EDAT':
'1975/06/01', 'SO': 'Biochem Med. 1975 Jun;13(2):117-26.', 'SB': 'IM',
'PMID': '1', 'PST': 'ppublish'}

It seems to keep efetching PMID 1 (http://www.ncbi.nlm.nih.gov/pubmed/1)

Any idea?

Thanks in advance.

Maurice LING
mobile: +1(605)5920300, +6596669233
www: http://maurice.vodien.com
CV: http://maurice.vodien.com/maurice_resume.pdf
Linkedin: http://www.linkedin.com/in/mauriceling
ResearchGate: https://www.researchgate.net/profile/Maurice_HT_Ling



More information about the Biopython-dev mailing list