source: orange-bioinformatics/server_update/updateDictyBase.py @ 1824:4c6214cbc159

Revision 1824:4c6214cbc159, 1.4 KB checked in by Flashpoint <vid.flashpoint@…>, 10 months ago (diff)

Shortened the p_val display statement in OWSetEnrichment.py

Line 
1##interval:7
2from common import *
3
4import sys, os
5from gzip import GzipFile
6import tempfile
7from Orange.bio.obiDicty import DictyBase
8import Orange.bio.obiDictyMutants as DictyMutants
9
10tmpdir = tempfile.mkdtemp("dictybase")
11base = DictyBase.pickle_data()
12filename = os.path.join(tmpdir, "tf")
13
14f = open(filename, 'wb')
15f.write(base)
16f.close()
17
18dom = DictyBase.domain
19fn = DictyBase.filename
20
21try:
22    sf_server.create_domain('dictybase')
23except:
24    pass
25
26print filename
27
28sf_server.upload(dom, fn, filename, title="dictyBase gene aliases",
29    tags=DictyBase.tags)
30sf_server.unprotect(dom, fn)
31
32shutil.rmtree(tmpdir)
33
34
35"""
36Orange server upload for DictyMutants
37"""
38
39tmpdir_mutants = tempfile.mkdtemp("dictymutants")
40base_mutants = DictyMutants.download_mutants()
41file_mutants = os.path.join(tmpdir_mutants, "tempMut")
42
43fm = open(file_mutants, "wb")
44fm.write(base_mutants)
45fm.close()
46
47fm_dom = DictyMutants.domain
48fm_name = DictyMutants.pickle_file
49
50print file_mutants
51
52sf_server.upload(fm_dom, fm_name, file_mutants, title="dictyBase mutant phenotypes",
53    tags=DictyMutants.tags)
54sf_server.unprotect(fm_dom, fm_name)
55
56shutil.rmtree(tmpdir_mutants)
57
58"""
59Orange server upload for Dicty mutant gene sets
60"""
61from Orange.bio.obiGeneSets import dictyMutantSets, update_server_list, register
62
63mutant_sets_split = dictyMutantSets().split_by_hierarchy()
64for mutant_sets in mutant_sets_split:
65    register(mutant_sets, sf_server)
Note: See TracBrowser for help on using the repository browser.