aboutsummaryrefslogtreecommitdiff
path: root/gn3/settings.py
diff options
context:
space:
mode:
authorzsloan2021-11-11 11:23:39 -0600
committerGitHub2021-11-11 11:23:39 -0600
commit8c77af63efae6f06d7c7c3269fc0e41811a8037a (patch)
tree9ffa4b84fd36f09e772db3e218bc980999324c41 /gn3/settings.py
parent607c6e627c23c1bce3b199b145855182ab51b211 (diff)
parent249b85102063debfeeb1b0565956059b8a3af1cf (diff)
downloadgenenetwork3-8c77af63efae6f06d7c7c3269fc0e41811a8037a.tar.gz
Merge branch 'main' into feature/add_rqtl_pairscan
Diffstat (limited to 'gn3/settings.py')
-rw-r--r--gn3/settings.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/gn3/settings.py b/gn3/settings.py
index 150d96d..57c63df 100644
--- a/gn3/settings.py
+++ b/gn3/settings.py
@@ -22,9 +22,6 @@ SQLALCHEMY_TRACK_MODIFICATIONS = False
GN2_BASE_URL = "http://www.genenetwork.org/"
-# biweight script
-BIWEIGHT_RSCRIPT = "~/genenetwork3/scripts/calculate_biweight.R"
-
# wgcna script
WGCNA_RSCRIPT = "wgcna_analysis.R"
# qtlreaper command
@@ -35,13 +32,24 @@ GENOTYPE_FILES = os.environ.get(
"GENOTYPE_FILES", "{}/genotype_files/genotype".format(os.environ.get("HOME")))
# CROSS-ORIGIN SETUP
-CORS_ORIGINS = [
+def parse_env_cors(default):
+ """Parse comma-separated configuration into list of strings."""
+ origins_str = os.environ.get("CORS_ORIGINS", None)
+ if origins_str:
+ return [
+ origin.strip() for origin in origins_str.split(",") if origin != ""]
+ return default
+
+CORS_ORIGINS = parse_env_cors([
"http://localhost:*",
"http://127.0.0.1:*"
-]
+])
CORS_HEADERS = [
"Content-Type",
"Authorization",
"Access-Control-Allow-Credentials"
]
+
+GNSHARE = os.environ.get("GNSHARE", "/gnshare/gn/")
+TEXTDIR = f"{GNSHARE}/web/ProbeSetFreeze_DataMatrix"