Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 763d6289e1351f2d34257ce697a3ccb7 > files > 2394

biopython-doc-1.47-2mdv2008.1.x86_64.rpm

"""Example of connecting with exPASy and parsing SwissProt records."""

# biopython
from Bio import ExPASy, SwissProt

# 'O23729', 'O23730', 'O23731', Chalcone synthases from Orchid

ids = ['O23729', 'O23730', 'O23731']

for id in ids:
    handle = ExPASy.get_sprot_raw(id)
    record = SwissProt.read(handle)
    print "description:", record.description
    for ref in record.references:
        print "authors:", ref.authors
        print "title:", ref.title

    print "classification:", record.organism_classification
    print