Commits

Flashpoint  committed 857938f

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

  • Participants
  • Parent commits d9c6f60

Comments (0)

Files changed (3)

File _bioinformatics/obiDicty.py

 
     domain = "dictybase"
     filename = "information_mappings.pck"
-    tags = [ "Dictyostelium discoideum", "gene", "essential", "dictyBase" ] 
+    tags = [ "Dictyostelium discoideum", "gene", "essential", "dictyBase"] 
  
     @classmethod
     def version(cls):

File _bioinformatics/obiGeneSets.py

         taxname = obiTaxonomy.name(org)
         title = "Gene sets: " + ", ".join(hierarchy) + \
             ((" (" + taxname + ")") if org != None else "")
-        tags = list(hierarchy) + [ "gene sets", taxname ] + \
+        tags = list(hierarchy) + [ "gene sets", taxname ] + obiTaxonomy.shortname(org) +\
             ([ "essential" ] if org in obiTaxonomy.essential_taxids() else [] )
         serverFiles.upload(sfdomain, fn, tfname, title, tags)
         serverFiles.unprotect(sfdomain, fn)
             hierd[(hier[:i], org)].append(ind)
     return hierd
 
-def load_local(hierarchy, organism):
+
+
+
     files = map(lambda x: x[:2], list_local())
     hierd = build_hierarchy_dict(files)
 

File _bioinformatics/obiTaxonomy.py

             "4932",  # Saccharomyces cerevisiae
             ] 
 
+def shortname(taxid):
+    """ Short names for common_taxids organisms """
+    names = {
+    "3702"  : ["arabidopsis", "thaliana", "plant"],
+    "9913"  : ["cattle", "cow"],
+    "6239"  : ["nematode", "roundworm"],
+    "3055"  : ["algae"],
+    "7955"  : ["zebrafish"],
+    "352472": ["dicty", "amoeba", "slime mold"],
+    "7227"  : ["fly", "fruit fly", "vinegar fly"],
+    "562"   : ["ecoli", "coli", "bacterium"],
+    "11103" : ["virus, hepatitis"],
+    "9606"  : ["human"],
+    "10090" : ["mouse", "mus"],
+    "2104"  : ["bacterium", "mycoplasma"],
+    "4530"  : ["asian rice", "rice", "cereal", "plant"],
+    "5833"  : ["plasmodium", "malaria", "parasite"],
+    "4754"  : ["pneumonia", "fungus"],
+    "10116" : ["rat", "laboratory rat"],
+    "4932"  : ["yeast", "baker yeast", "brewer yeast"],
+    "4896"  : ["yeast", "fission yeast"],
+    "31033" : ["fish", "pufferfish"],
+    "8355"  : ["frog", "african clawed frog"],
+    "4577"  : ["corn", "cereal grain", "plant"]
+    }
+    if taxid in names.keys():
+        return names[taxid]
+    return []
+
 default_database_path = os.path.join(orngEnviron.bufferDir, "bigfiles", "Taxonomy")
 
 class MultipleSpeciesException(Exception):