Changeset 1828:857938f13079 in orange-bioinformatics for _bioinformatics/obiTaxonomy.py


Ignore:
Timestamp:
07/01/13 15:11:05 (10 months ago)
Author:
Flashpoint <vid.flashpoint@…>
Branch:
default
Message:

Added an organisms shortname() function to the obiTaxonomy.py to add short names to geneset tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiTaxonomy.py

    r1720 r1828  
    4242            "4932",  # Saccharomyces cerevisiae 
    4343            ]  
     44 
     45def shortname(taxid): 
     46    """ Short names for common_taxids organisms """ 
     47    names = { 
     48    "3702"  : ["arabidopsis", "thaliana", "plant"], 
     49    "9913"  : ["cattle", "cow"], 
     50    "6239"  : ["nematode", "roundworm"], 
     51    "3055"  : ["algae"], 
     52    "7955"  : ["zebrafish"], 
     53    "352472": ["dicty", "amoeba", "slime mold"], 
     54    "7227"  : ["fly", "fruit fly", "vinegar fly"], 
     55    "562"   : ["ecoli", "coli", "bacterium"], 
     56    "11103" : ["virus, hepatitis"], 
     57    "9606"  : ["human"], 
     58    "10090" : ["mouse", "mus"], 
     59    "2104"  : ["bacterium", "mycoplasma"], 
     60    "4530"  : ["asian rice", "rice", "cereal", "plant"], 
     61    "5833"  : ["plasmodium", "malaria", "parasite"], 
     62    "4754"  : ["pneumonia", "fungus"], 
     63    "10116" : ["rat", "laboratory rat"], 
     64    "4932"  : ["yeast", "baker yeast", "brewer yeast"], 
     65    "4896"  : ["yeast", "fission yeast"], 
     66    "31033" : ["fish", "pufferfish"], 
     67    "8355"  : ["frog", "african clawed frog"], 
     68    "4577"  : ["corn", "cereal grain", "plant"] 
     69    } 
     70    if taxid in names.keys(): 
     71        return names[taxid] 
     72    return [] 
    4473 
    4574default_database_path = os.path.join(orngEnviron.bufferDir, "bigfiles", "Taxonomy") 
Note: See TracChangeset for help on using the changeset viewer.