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

From OpenWetWare
Jump to navigationJump to search
(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...)
 
 
Line 3: Line 3:
*The following is the code to return a list of review references for the disease returned through Xiaodi's code.   
*The following is the code to return a list of review references for the disease returned through Xiaodi's code.   


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

Latest revision as of 08:30, 5 April 2007

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