aboutsummaryrefslogtreecommitdiff
path: root/gn3/settings.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-06 14:04:59 +0300
committerFrederick Muriuki Muriithi2021-12-06 14:04:59 +0300
commit66406115f41594ba40e3fbbc6f69aace2d11800f (patch)
tree0f3de09b74a3f47918dd4a192665c8a06c508144 /gn3/settings.py
parent77099cac68e8f4792bf54d8e1f7ce6f315bedfa7 (diff)
parent5d2248f1dabbc7dd04f48aafcc9f327817a9c92c (diff)
downloadgenenetwork3-66406115f41594ba40e3fbbc6f69aace2d11800f.tar.gz
Merge branch 'partial-correlations'
Diffstat (limited to 'gn3/settings.py')
-rw-r--r--gn3/settings.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/gn3/settings.py b/gn3/settings.py
index 150d96d..0ac6698 100644
--- a/gn3/settings.py
+++ b/gn3/settings.py
@@ -17,14 +17,10 @@ RQTL_WRAPPER = "rqtl_wrapper.R"
SQL_URI = os.environ.get(
"SQL_URI", "mysql://webqtlout:webqtlout@localhost/db_webqtl")
SECRET_KEY = "password"
-SQLALCHEMY_TRACK_MODIFICATIONS = False
# gn2 results only used in fetching dataset info
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 +31,26 @@ 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"
+
+ROUND_TO = 10