Back to index

python-biopython  1.60
swissprot.py
Go to the documentation of this file.
00001 """Example of connecting with exPASy and parsing SwissProt records."""
00002 
00003 # biopython
00004 from Bio import ExPASy, SwissProt
00005 
00006 # 'O23729', 'O23730', 'O23731', Chalcone synthases from Orchid
00007 
00008 ids = ['O23729', 'O23730', 'O23731']
00009 
00010 for id in ids:
00011     handle = ExPASy.get_sprot_raw(id)
00012     record = SwissProt.read(handle)
00013     print "description:", record.description
00014     for ref in record.references:
00015         print "authors:", ref.authors
00016         print "title:", ref.title
00017 
00018     print "classification:", record.organism_classification
00019     print
00020