Changeset 1782:e6ed6e7bced3 in orange-bioinformatics


Ignore:
Timestamp:
05/12/13 18:26:09 (11 months ago)
Author:
Flashpoint <vid.flashpoint@…>
Branch:
default
Children:
1783:4a72eace4f4c, 1787:8caf4af2d6bb
Message:

Added Phenotypes to DictyMutants hierarchy

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiGeneSets.py

    r1781 r1782  
    6767    from . import obiDictyMutants 
    6868    link_fmt = "http://dictybase.org/db/cgi-bin/dictyBase/SC/scsearch.pl?searchdb=strains&search_term=%s&column=all&B1=Submit"  
    69     #genesets = [GeneSet(id=mutant.name, name=mutant.descriptor, genes=obiDictyMutants.mutant_genes(mutant), hierarchy=("Dictybase", ), organism="352472", # 352472 gathered from obiGO.py code_map -> Dicty identifier 
     69    #genesets = [GeneSet(id=mutant.name, name=mutant.descriptor, genes=obiDictyMutants.mutant_genes(mutant), hierarchy=("Dictybase", "Mutants"), organism="352472", # 352472 gathered from obiGO.py code_map -> Dicty identifier 
    7070    #                    link=(link_fmt % mutant.name if mutant.name else None)) \ 
    7171    #                    for mutant in obiDictyMutants.mutants()] 
    7272  
    73     genesets = [GeneSet(id=phenotype, name=phenotype, genes=[obiDictyMutants.mutant_genes(mutant)[0] for mutant in mutants], hierarchy=("Dictybase", ), organism="352472", # 352472 gathered from obiGO.py code_map -> Dicty identifier 
     73    genesets = [GeneSet(id=phenotype, name=phenotype, genes=[obiDictyMutants.mutant_genes(mutant)[0] for mutant in mutants], hierarchy=("Dictybase", "Phenotypes"), organism="352472", # 352472 gathered from obiGO.py code_map -> Dicty identifier 
    7474                        link="") \ 
    7575                        for phenotype, mutants in obiDictyMutants.phenotype_mutants().items()] 
  • server_update/updateDictyBase.py

    r1781 r1782  
    5959Orange server upload for Dicty mutant gene sets 
    6060""" 
    61 from Orange.bio.obiGeneSets import dictyMutantSets, update_server_list 
    62 import cPickle as pickle 
     61from Orange.bio.obiGeneSets import dictyMutantSets, update_server_list, register 
    6362 
    64 mutant_sets = dictyMutantSets() 
     63mutant_sets_split = dictyMutantSets().split_by_hierarchy() 
     64for mutant_sets in mutant_sets_split: 
     65    register(mutant_sets, sf_server) 
    6566 
    66 tmpdir_sets = tempfile.mkdtemp("dictygenesets") 
    67 file_mutants = os.path.join(tmpdir_sets, "tempSets") 
    68  
    69 with open(file_mutants, "wb") as f: 
    70     pickle.dump(mutant_sets, f, -1) 
    71  
    72 fm_dom = "gene_sets" 
    73 fm_name = "DictyMutant phenotypes" 
    74 set_tags = ["Mutant", "phenotype", "dicty"] 
    75  
    76 print file_mutants 
    77  
    78 sf_server.upload(fm_dom, fm_name, file_mutants, title="Dictyostelium discoideum mutant phenotypes", 
    79     tags=set_tags) 
    80 sf_server.unprotect(fm_dom, fm_name) 
    8167update_server_list(sf_server) 
    82  
    83 shutil.rmtree(tmpdir_sets) 
    84  
Note: See TracChangeset for help on using the changeset viewer.