Harvard:Biophysics 101/2007/Notebook:Resmi Charalel/2007-4-5

From OpenWetWare
Revision as of 08:30, 5 April 2007 by RCharalel (talk | contribs) (→‎OMIM to Review Articles in Pubmed)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

OMIM to Review Articles in Pubmed

  • The following is the code to return a list of review references for the disease returned through Xiaodi's code.
from Bio import PubMed
from Bio import Medline
import string

disease = a.name

search_term = "Review[ptyp] "+disease
#print search_term

review_ids = PubMed.search_for(search_term)

rec_parser = Medline.RecordParser()
medline_dict = PubMed.Dictionary(parser = rec_parser)

count = 1

for did in review_ids[0:5]:
    cur_record = medline_dict[did]
    print '\n', count, ')  ', string.rstrip(cur_record.title), cur_record.authors, string.strip(cur_record.source)
    count=count+1