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

From OpenWetWare
Revision as of 08:29, 5 April 2007 by RCharalel (talk | contribs) (New page: ==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. <\pre> from Bio import PubMed fro...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.

<\pre> from Bio import PubMed from Bio import Medline import string

disease = a.name

search_term = "Review[ptyp] "+disease

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