diff options
author | Lei Yan | 2016-06-16 18:21:01 +0000 |
---|---|---|
committer | Lei Yan | 2016-06-16 18:21:01 +0000 |
commit | 4fec0e6fc0772785a30451d417082bc189f2f6dd (patch) | |
tree | 6548c2d088d5a80561e23df076456caaeda195c7 /wqflask/base/webqtlConfig.py | |
parent | e55f38a72d47fbdf5f652a08e8da1db78f1dcdb5 (diff) | |
parent | d90dc3748557d1d6fbaa59f71fe676b8a7c393ca (diff) | |
download | genenetwork2-4fec0e6fc0772785a30451d417082bc189f2f6dd.tar.gz |
Merge /home/gn2/gene
Diffstat (limited to 'wqflask/base/webqtlConfig.py')
-rw-r--r--[-rwxr-xr-x] | wqflask/base/webqtlConfig.py | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py index 3eaeb56e..f6140ac3 100755..100644 --- a/wqflask/base/webqtlConfig.py +++ b/wqflask/base/webqtlConfig.py @@ -1,7 +1,15 @@ #########################################' # Environment Variables - public +# +# Note: much of this needs to handled by the settings/environment +# scripts. But rather than migrating everything in one go, we'll +# take it a step at a time. First the hard coded paths get replaced +# with those in utility/tools.py +# ######################################### +from utility.tools import valid_path, mk_dir, assert_dir, flat_files, TEMPDIR + #Debug Level #1 for debug, mod python will reload import each time DEBUG = 1 @@ -48,30 +56,28 @@ UCSC_RUDI_TRACK_URL = " http://genome.cse.ucsc.edu/cgi-bin/hgTracks?org=%s&db=%s GENOMEBROWSER_URL="http://ucscbrowser.genenetwork.org/cgi-bin/hgTracks?clade=mammal&org=Mouse&db=mm9&position=%s&hgt.suggest=&pix=800&Submit=submit" ENSEMBLETRANSCRIPT_URL="http://useast.ensembl.org/Mus_musculus/Lucene/Details?species=Mus_musculus;idx=Transcript;end=1;q=%s" +# The following paths are no longer in use! +# HTMLPATH is replaced by GENODIR +# IMGDIR is replaced by GENERATED_IMAGE_DIR + +# Temporary storage: +TMPDIR = mk_dir(TEMPDIR+'/gn2/') +CACHEDIR = mk_dir(TEMPDIR+'/cache/') +# We can no longer write into the git tree: +GENERATED_IMAGE_DIR = mk_dir(TMPDIR+'/generated/') +GENERATED_TEXT_DIR = mk_dir(TMPDIR+'/generated_text/') + +# Flat file directories +GENODIR = flat_files('genotype')+'/' +JSON_GENODIR = flat_files('genotype/json')+'/' +if not valid_path(JSON_GENODIR): + # fall back on old location (move the dir, FIXME) + JSON_GENODIR = flat_files('json') +assert_dir(GENODIR) -GNROOT = "/home/zas1024/gene/" # Will remove this and dependent items later -SECUREDIR = GNROOT + 'secure/' -COMMON_LIB = GNROOT + 'support/admin' -HTMLPATH = GNROOT + 'genotype_files/' -PYLMM_PATH = '/home/zas1024/plink_gemma/' -SNP_PATH = '/home/zas1024/snps/' -IMGDIR = GNROOT + '/wqflask/wqflask/static/output/' -IMAGESPATH = HTMLPATH + 'images/' -UPLOADPATH = IMAGESPATH + 'upload/' -TMPDIR = '/home/zas1024/tmp/' # Will remove this and dependent items later -GENODIR = HTMLPATH + 'genotypes/' -NEWGENODIR = HTMLPATH + 'new_genotypes/' -GENO_ARCHIVE_DIR = GENODIR + 'archive/' -TEXTDIR = HTMLPATH + 'ProbeSetFreeze_DataMatrix/' -CMDLINEDIR = HTMLPATH + 'webqtl/cmdLine/' -ChangableHtmlPath = GNROOT + 'web/' - -SITENAME = 'GN' PORTADDR = "http://50.16.251.170" -BASEHREF = '<base href="http://50.16.251.170/">' + INFOPAGEHREF = '/dbdoc/%s.html' -GLOSSARYFILE = "/glossary.html" CGIDIR = '/webqtl/' #XZ: The variable name 'CGIDIR' should be changed to 'PYTHONDIR' SCRIPTFILE = 'main.py' -REFRESHSTR = '<meta http-equiv="refresh" content="5;url=%s' + SCRIPTFILE +'?sid=%s">' -REFRESHDIR = '%s' + SCRIPTFILE +'?sid=%s' + |