source: orange-bioinformatics/server_update/updateOMIM.py @ 1721:921b3780c6cc

Revision 1721:921b3780c6cc, 552 bytes checked in by markotoplak, 19 months ago (diff)

Moved common functionality of the server files update scripts to a separate file.

Line 
1##!interval=7
2##!contact=ales.erjavec@fri.uni-lj.si
3
4from common import *
5from Orange.bio import obiOMIM
6
7import os, sys
8
9path = os.path.join(environ.buffer_dir, "tmp_OMIM")
10
11try:
12    os.mkdir(path)
13except OSError:
14    pass
15filename = os.path.join(path, "morbidmap")
16obiOMIM.OMIM.download_from_NCBI(filename)
17
18sf_server.upload("OMIM", "morbidmap", filename, title="Online Mendelian Inheritance in Man (OMIM)",
19                   tags=["genes", "diseases", "human", "OMIM" "#version:%i" % obiOMIM.OMIM.VERSION])
20sf_server.unprotect("OMIM", "morbidmap")
Note: See TracBrowser for help on using the repository browser.