aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/marker_regression/rqtl_mapping.py5
-rw-r--r--wqflask/wqflask/marker_regression/run_mapping.py10
2 files changed, 9 insertions, 6 deletions
diff --git a/wqflask/wqflask/marker_regression/rqtl_mapping.py b/wqflask/wqflask/marker_regression/rqtl_mapping.py
index 09afb8d1..121ce53b 100644
--- a/wqflask/wqflask/marker_regression/rqtl_mapping.py
+++ b/wqflask/wqflask/marker_regression/rqtl_mapping.py
@@ -20,7 +20,7 @@ logger = utility.logger.getLogger(__name__)
GN3_RQTL_URL = "http://localhost:8086/api/rqtl/compute"
GN3_TMP_PATH = "/export/local/home/zas1024/genenetwork3/tmp"
-def run_rqtl(trait_name, vals, samples, dataset, mapping_scale, model, method, num_perm, perm_strata_list, do_control, control_marker, manhattan_plot, cofactors):
+def run_rqtl(trait_name, vals, samples, dataset, pair_scan, mapping_scale, model, method, num_perm, perm_strata_list, do_control, control_marker, manhattan_plot, cofactors):
"""Run R/qtl by making a request to the GN3 endpoint and reading in the output file(s)"""
pheno_file = write_phenotype_file(trait_name, samples, vals, dataset, cofactors, perm_strata_list)
@@ -38,6 +38,9 @@ def run_rqtl(trait_name, vals, samples, dataset, mapping_scale, model, method, n
"scale": mapping_scale
}
+ if pair_scan:
+ post_data["pair_scan"] = True
+
if do_control == "true" and control_marker:
post_data["control_marker"] = control_marker
diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py
index 8b9f89d2..6c1c92cb 100644
--- a/wqflask/wqflask/marker_regression/run_mapping.py
+++ b/wqflask/wqflask/marker_regression/run_mapping.py
@@ -232,19 +232,19 @@ class RunMapping:
self.score_type = "LOD"
self.control_marker = start_vars['control_marker']
self.do_control = start_vars['do_control']
- if 'mapmethod_rqtl_geno' in start_vars:
- self.method = start_vars['mapmethod_rqtl_geno']
+ if 'mapmethod_rqtl' in start_vars:
+ self.method = start_vars['mapmethod_rqtl']
else:
self.method = "em"
- self.model = start_vars['mapmodel_rqtl_geno']
+ self.model = start_vars['mapmodel_rqtl']
self.pair_scan = False
if 'pair_scan' in start_vars:
self.pair_scan = True
if self.permCheck and self.num_perm > 0:
self.perm_output, self.suggestive, self.significant, results = rqtl_mapping.run_rqtl(
- self.this_trait.name, self.vals, self.samples, self.dataset, self.mapping_scale, self.model, self.method, self.num_perm, self.perm_strata, self.do_control, self.control_marker, self.manhattan_plot, self.covariates)
+ self.this_trait.name, self.vals, self.samples, self.dataset, self.pair_scan, self.mapping_scale, self.model, self.method, self.num_perm, self.perm_strata, self.do_control, self.control_marker, self.manhattan_plot, self.covariates)
else:
- results = rqtl_mapping.run_rqtl(self.this_trait.name, self.vals, self.samples, self.dataset, self.mapping_scale, self.model, self.method,
+ results = rqtl_mapping.run_rqtl(self.this_trait.name, self.vals, self.samples, self.dataset, self.pair_scan, self.mapping_scale, self.model, self.method,
self.num_perm, self.perm_strata, self.do_control, self.control_marker, self.manhattan_plot, self.covariates)
elif self.mapping_method == "reaper":
if "startMb" in start_vars: # ZS: Check if first time page loaded, so it can default to ON