Changeset 1782:e6ed6e7bced3 in orange-bioinformatics for server_update/updateDictyBase.py


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.