Changeset 1828:857938f13079 in orange-bioinformatics


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

Location:
_bioinformatics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiDicty.py

    r1686 r1828  
    17671767    domain = "dictybase" 
    17681768    filename = "information_mappings.pck" 
    1769     tags = [ "Dictyostelium discoideum", "gene", "essential", "dictyBase" ]  
     1769    tags = [ "Dictyostelium discoideum", "gene", "essential", "dictyBase"]  
    17701770  
    17711771    @classmethod 
  • _bioinformatics/obiGeneSets.py

    r1825 r1828  
    333333        title = "Gene sets: " + ", ".join(hierarchy) + \ 
    334334            ((" (" + taxname + ")") if org != None else "") 
    335         tags = list(hierarchy) + [ "gene sets", taxname ] + \ 
     335        tags = list(hierarchy) + [ "gene sets", taxname ] + obiTaxonomy.shortname(org) +\ 
    336336            ([ "essential" ] if org in obiTaxonomy.essential_taxids() else [] ) 
    337337        serverFiles.upload(sfdomain, fn, tfname, title, tags) 
     
    359359    return hierd 
    360360 
    361 def load_local(hierarchy, organism): 
     361 
     362 
     363 
    362364    files = map(lambda x: x[:2], list_local()) 
    363365    hierd = build_hierarchy_dict(files) 
  • _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.