Changeset 1834:91f840200ae3 in orange-bioinformatics for _bioinformatics/obiTaxonomy.py


Ignore:
Timestamp:
07/03/13 14:47:13 (10 months ago)
Author:
Flashpoint <vid.flashpoint@…>
Branch:
default
Message:

Changed the exception value from KEGG.OrganismNotFound to obiTaxonomy.UnknownSpeciesIdentifier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiTaxonomy.py

    r1828 r1834  
    3333            "4577",  # Zea mays 
    3434             ]  
     35 
     36def taxname_to_taxid(name): 
     37    """Return taxonomy ID for a taxonomy name""" 
     38    ids = { 
     39    "Arabidopsis thaliana": "3702", 
     40    "Bos taurus": "9913", 
     41    "Caenorhabditis elegans": "6239",   
     42    "Chlamydomonas reinhardtii": "3055", 
     43    "Danio rerio": "7955", 
     44    "Dictyostelium discoideum": "352472",  
     45    "Drosophila melanogaster": "7227", 
     46    "Escherichia coli": "562", 
     47    "Hepatitis C virus": "11103", 
     48    "Homo sapiens": "9606", 
     49    "Mus musculus": "10090",  
     50    "Mycoplasma pneumoniae": "2104", 
     51    "Oryza sativa": "4530",   
     52    "Plasmodium falciparum": "5833",  
     53    "Pneumocystis carinii": "4754", 
     54    "Rattus norvegicus": "10116",  
     55    "Saccharomyces cerevisiae": "4932",   
     56    "Schizosaccharomyces pombe": "4896",   
     57    "Takifugu rubripes": "31033", 
     58    "Xenopus laevis": "8355", 
     59    "Zea mays": "4577" } 
     60    if name in ids.keys(): 
     61        return ids[name] 
     62    return [] 
    3563 
    3664def essential_taxids(): 
Note: See TracChangeset for help on using the changeset viewer.