aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorzsloan2021-07-26 20:47:37 +0000
committerzsloan2021-09-23 19:29:59 +0000
commit971c5f1342770b999c62e345a9ebf942a0410758 (patch)
treea38ce615f6666cca288293ca7832f5b03a46a21e /gn3/api
parent91804b4d4f5f82ddad30b68691456885b39309c9 (diff)
downloadgenenetwork3-971c5f1342770b999c62e345a9ebf942a0410758.tar.gz
Added pairscan boolean kwarg and process_rqtl_pairscan function for reading in pairscan results + renamed process_rqtl_output to process_rqtl_mapping to distinguish between that and pairscan
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/rqtl.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py
index ebb746c..ff76356 100644
--- a/gn3/api/rqtl.py
+++ b/gn3/api/rqtl.py
@@ -25,7 +25,7 @@ run the rqtl_wrapper script and return the results as JSON
# Split kwargs by those with values and boolean ones that just convert to True/False
kwargs = ["model", "method", "nperm", "scale", "control_marker"]
- boolean_kwargs = ["addcovar", "interval", "pstrata"]
+ boolean_kwargs = ["addcovar", "interval", "pstrata", "pairscan"]
all_kwargs = kwargs + boolean_kwargs
rqtl_kwargs = {"geno": genofile, "pheno": phenofile}
@@ -48,9 +48,11 @@ run the rqtl_wrapper script and return the results as JSON
"output", rqtl_cmd.get('output_file'))):
os.system(rqtl_cmd.get('rqtl_cmd'))
- rqtl_output['results'] = process_rqtl_output(rqtl_cmd.get('output_file'))
+ if "pairscan" in boolean_kwargs:
+ rqtl_output['results'] = process_rqtl_pairscan(rqtl_cmd.get('output_file'))
+ else:
+ rqtl_output['results'] = process_rqtl_mapping(rqtl_cmd.get('output_file'))
- rqtl_output['results'] = process_rqtl_output(rqtl_cmd.get('output_file'))
if int(rqtl_kwargs['nperm']) > 0:
rqtl_output['perm_results'], rqtl_output['suggestive'], rqtl_output['significant'] = \
process_perm_output(rqtl_cmd.get('output_file'))