from typecheck import isstring, issequence # --------------------------------------------------------------------------- import setparams as _sg _params = dict( FIELDDELIMITER = u',', RECORDDELIMITER = u'\r\n' if pl.system == 'Windows' else u'\n', PREFIX = u'', SUFFIX = u'', PROLOGUE = u'', EPILOGUE = u'', VERBOSE = False, ENCODING = u'utf8', ) _sg.setparams(_params) del _sg, _params # --------------------------------------------------------------------------- assert len(FIELDDELIMITER) > 0 assert len(RECORDDELIMITER) > 0 FIELDDELIMITER = FIELDDELIMITER.encode(ENCODING) RECORDDELIMITER = RECORDDELIMITER.encode(ENCODING) assert RECORDDELIMITER != FIELDDELIMITER # --------------------------------------------------------------------------- def _tolist(x): return [_tolist(i) for i in x] if issequence(x) else x
# 3. prints the command line to feed to the Command Window of # Cytoscape's Command Tool plugin to run the script (from 2) # and thereby generate the png files specified by the xgmml # files (from 1); # # E.g.: # # % EXPORTTYPE=png python src/onetime/makexgmml.py # commandtool run file="/Users/berriz/Work/Sites/hmslincs/src/onetime/makepng" # # --------------------------------------------------------------------------- import setparams as _sp _params = dict(EXPORTTYPE='svg', SUBDIR='rtk') _sp.setparams(_params) del _sp, _params # --------------------------------------------------------------------------- SRCDIR = op.dirname(op.abspath(__file__)) BASEDIR = op.normpath(op.join(SRCDIR, '..', '..')) DATADIR = op.join(BASEDIR, *('data networks data'.split() + [SUBDIR])) XMLDIR = op.join(BASEDIR, *'data networks xgmml'.split()) for f in gl.glob(op.join(XMLDIR, '*')): os.remove(f) IMGDIR = op.join(BASEDIR, *('django networks static networks img'.split() + [SUBDIR])) print IMGDIR SIGNALING = SUBDIR == 'signaling'
from django.conf import settings __version__ = "$Revision: 24d02504e664 $" # $Source$ # --------------------------------------------------------------------------- import setparams as _sg import os from shutil import copy from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned _params = dict( VERBOSE=False, APPNAME='db', ) _sg.setparams(_params) del _sg, _params # --------------------------------------------------------------------------- logger = logging.getLogger(__name__) @transaction.commit_on_success def main(import_file, file_directory, deploy_dir): """ Read in the qc events for batches - version 1 - for small molecule batches """ sheet_name = 'Sheet1' start_row = 0
# and thereby generate the png files specified by the xgmml # files (from 1); # # E.g.: # # % EXPORTTYPE=png python src/onetime/makexgmml.py # commandtool run file="/Users/berriz/Work/Sites/hmslincs/src/onetime/makepng" # # --------------------------------------------------------------------------- import setparams as _sp _params = dict( EXPORTTYPE = 'svg', SUBDIR = 'rtk' ) _sp.setparams(_params) del _sp, _params # --------------------------------------------------------------------------- SRCDIR = op.dirname(op.abspath(__file__)) BASEDIR = op.normpath(op.join(SRCDIR, '..', '..')) DATADIR = op.join(BASEDIR, *('data networks data'.split() + [SUBDIR])) XMLDIR = op.join(BASEDIR, *'data networks xgmml'.split()) for f in gl.glob(op.join(XMLDIR, '*')): os.remove(f) IMGDIR = op.join(BASEDIR, *('django networks static networks img'.split() + [SUBDIR])) print IMGDIR SIGNALING = SUBDIR == 'signaling'