Changeset 1720:354d91b1af9f in orange-bioinformatics for server_update/updateSTRING.py


Ignore:
Timestamp:
09/01/12 14:58:03 (20 months ago)
Author:
markotoplak
Branch:
default
Message:

Fixed update scripts for STRING and Taxonomy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server_update/updateSTRING.py

    r1717 r1720  
    22##!contact=ales.erjavec@fri.uni-lj.si 
    33 
    4 import obiPPI, orngServerFiles 
     4from Orange.bio import obiPPI 
     5import Orange.utils.serverfiles as orngServerFiles 
    56import os, sys, shutil, urllib2, gzip 
    67from getopt import getopt 
     
    1314serverFiles = orngServerFiles.ServerFiles(username, password) 
    1415 
    15 import obiPPI 
    16  
    1716filename = orngServerFiles.localpath("PPI", obiPPI.STRING.FILENAME) 
    1817 
    19 if os.path.exists(filename): 
    20     os.remove(filename) 
     18if False: 
     19    if os.path.exists(filename): 
     20        os.remove(filename) 
    2121 
    22 obiPPI.STRING.download_data("v9.0") 
     22    obiPPI.STRING.download_data("v9.0") 
    2323 
    24 gzfile = gzip.GzipFile(filename + ".gz", "wb") 
    25 shutil.copyfileobj(open(filename, "rb"), gzfile) 
     24    gzfile = gzip.GzipFile(filename + ".gz", "wb") 
     25    shutil.copyfileobj(open(filename, "rb"), gzfile) 
    2626 
    27 serverFiles.upload("PPI", obiPPI.STRING.FILENAME, filename + ".gz",  
    28                    "STRING Protein interactions (Creative Commons Attribution 3.0 License)", 
    29                    tags=["protein interaction", "STRING",  
    30                          "#compression:gz", "#version:%s" % obiPPI.STRING.VERSION] 
    31                    ) 
    32 serverFiles.unprotect("PPI", obiPPI.STRING.FILENAME) 
     27    serverFiles.upload("PPI", obiPPI.STRING.FILENAME, filename + ".gz",  
     28                       "STRING Protein interactions (Creative Commons Attribution 3.0 License)", 
     29                       tags=["protein interaction", "STRING",  
     30                             "#compression:gz", "#version:%s" % obiPPI.STRING.VERSION] 
     31                       ) 
     32    serverFiles.unprotect("PPI", obiPPI.STRING.FILENAME) 
    3333 
    3434# The second part 
Note: See TracChangeset for help on using the changeset viewer.