Changeset 1893:35769c9c9490 in orange-bioinformatics for orangecontrib/bio/obiTaxonomy.py


Ignore:
Timestamp:
10/18/13 18:51:20 (6 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Added caching of name lookups in obiTaxonomy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/obiTaxonomy.py

    r1873 r1893  
    354354            if callback and i in milestones: 
    355355                callback(i) 
    356      
     356 
     357 
     358@pickled_cache(None, [("Taxonomy", "ncbi_taxonomy.tar.gz")], version=1) 
    357359def name(taxid): 
    358     """ Return the scientific name for organism with taxid. 
     360    """ 
     361    Return the scientific name for organism with taxid. 
    359362    """ 
    360363    return Taxonomy()[taxid] 
    361364 
     365 
     366@pickled_cache(None, [("Taxonomy", "ncbi_taxonomy.tar.gz")], version=1) 
    362367def other_names(taxid): 
    363     """ Return a list of (name, name_type) tuples but exclude the scientific name. 
     368    """ 
     369    Return a list of (name, name_type) tuples excluding the scientific name. 
     370 
     371    Use :func:`name` to retrieve the scientific name. 
     372 
    364373    """ 
    365374    return  Taxonomy().other_names(taxid) 
     375 
    366376 
    367377@pickled_cache(None, [("Taxonomy", "ncbi_taxonomy.tar.gz")], version=1) 
Note: See TracChangeset for help on using the changeset viewer.