[Biopython-dev] [Bug 2475] BioSQL.Loader should reuse existing taxon entries in lineage
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Mon Apr 7 04:45:53 EDT 2008
http://bugzilla.open-bio.org/show_bug.cgi?id=2475
------- Comment #16 from ericgibert at yahoo.fr 2008-04-07 04:45 EST -------
Created an attachment (id=896)
--> (http://bugzilla.open-bio.org/attachment.cgi?id=896&action=view)
Parser for many Taxons returned from NCBI Taxonomy db
This version allows the parsing of 1 to many taxons. The 'record' is a list of
dictionaries.
Application:
# get multiple answers
print "Multiple records search:"
search_handle = Bio.Entrez.esearch(db = "taxonomy", term = "orthetrum c*",
retmode = "XML")
IdList = Bio.Entrez.read(search_handle)["IdList"]
handle = Bio.Entrez.efetch(db = "taxonomy", id = IdList, retmode = "XML")
orthetrum_list = Bio.Entrez.read(handle)
print len(orthetrum_list), "Orthetrum match your search:"
for orthetrum in orthetrum_list:
print orthetrum["Rank"], orthetrum["ScientificName"], "has the TaxId",
orthetrum["TaxId"], "and its parent is", orthetrum["ParentTaxId"]
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list