Changeset 1721:921b3780c6cc in orange-bioinformatics for server_update/updateOMIM.py


Ignore:
Timestamp:
09/14/12 12:20:53 (19 months ago)
Author:
markotoplak
Branch:
default
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server_update/updateOMIM.py

    r1719 r1721  
    22##!contact=ales.erjavec@fri.uni-lj.si 
    33 
     4from common import * 
    45from Orange.bio import obiOMIM 
    5 import Orange.utils.serverfiles as orngServerFiles 
    66 
    7 import orngEnviron 
    87import os, sys 
    98 
    10 from getopt import getopt 
    11  
    12 opt = dict(getopt(sys.argv[1:], "u:p:", ["user=", "password="])[0]) 
    13  
    14 username = opt.get("-u", opt.get("--user", "username")) 
    15 password = opt.get("-p", opt.get("--password", "password")) 
    16  
    17 path = os.path.join(orngEnviron.bufferDir, "tmp_OMIM") 
    18 serverFiles = orngServerFiles.ServerFiles(username, password) 
     9path = os.path.join(environ.buffer_dir, "tmp_OMIM") 
    1910 
    2011try: 
     
    2516obiOMIM.OMIM.download_from_NCBI(filename) 
    2617 
    27 serverFiles.upload("OMIM", "morbidmap", filename, title="Online Mendelian Inheritance in Man (OMIM)", 
     18sf_server.upload("OMIM", "morbidmap", filename, title="Online Mendelian Inheritance in Man (OMIM)", 
    2819                   tags=["genes", "diseases", "human", "OMIM" "#version:%i" % obiOMIM.OMIM.VERSION]) 
    29 serverFiles.unprotect("OMIM", "morbidmap") 
     20sf_server.unprotect("OMIM", "morbidmap") 
Note: See TracChangeset for help on using the changeset viewer.