aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-09-11 04:00:59 -0500
committerFrederick Muriuki Muriithi2024-09-11 04:00:59 -0500
commit8618fdc8f4c05153f48e1afdbf9d2c337ba79929 (patch)
tree00500ed03223b284ab535fd16e242ca6e5cc387b /gn2/wqflask
parentd001c1e7cae8f69435545b8715038b1d0fc1ee62 (diff)
downloadgenenetwork2-8618fdc8f4c05153f48e1afdbf9d2c337ba79929.tar.gz
BugFix: Avoid string interpolation for building URLs
The string interpolation previously used was leading to a URL of the form `http://localhost:9080api/rqtl/compute` rather than `http://localhost:9080/api/rqtl/compute`.
Diffstat (limited to 'gn2/wqflask')
-rw-r--r--gn2/wqflask/marker_regression/rqtl_mapping.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gn2/wqflask/marker_regression/rqtl_mapping.py b/gn2/wqflask/marker_regression/rqtl_mapping.py
index b7739228..571935cb 100644
--- a/gn2/wqflask/marker_regression/rqtl_mapping.py
+++ b/gn2/wqflask/marker_regression/rqtl_mapping.py
@@ -8,6 +8,7 @@ from typing import Dict
from typing import List
from typing import Optional
from typing import TextIO
+from urllib.parse import urljoin
import numpy as np
@@ -54,7 +55,8 @@ def run_rqtl(trait_name, vals, samples, dataset, pair_scan, mapping_scale, model
if perm_strata_list:
post_data["pstrata"] = True
- rqtl_output = requests.post(GN3_LOCAL_URL + "api/rqtl/compute", data=post_data).json()
+ rqtl_output = requests.post(urljoin(GN3_LOCAL_URL, "api/rqtl/compute"),
+ data=post_data).json()
if num_perm > 0:
return rqtl_output['perm_results'], rqtl_output['suggestive'], rqtl_output['significant'], rqtl_output['results']
else: