about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gn3/computations/rqtl2.py2
-rw-r--r--tests/unit/test_rqtl2.py9
2 files changed, 6 insertions, 5 deletions
diff --git a/gn3/computations/rqtl2.py b/gn3/computations/rqtl2.py
index 206af1c..ae1e475 100644
--- a/gn3/computations/rqtl2.py
+++ b/gn3/computations/rqtl2.py
@@ -67,7 +67,7 @@ def compose_rqtl2_cmd(rqtl_path, input_file,
         "directory": workspace_dir,
         "output_file": output_file,
         "nperm": data.get("nperm", 0),
-        "method": data.get("method"),
+        "method": data.get("method", "HK"),
         "threshold": data.get("threshold", 1),
         "cores": config.get('MULTIPROCESSOR_PROCS', 1)
     }
diff --git a/tests/unit/test_rqtl2.py b/tests/unit/test_rqtl2.py
index f7830db..ddce91b 100644
--- a/tests/unit/test_rqtl2.py
+++ b/tests/unit/test_rqtl2.py
@@ -73,7 +73,7 @@ def test_compose_rqtl2_cmd():
     input_file = "/tmp/575732e-691e-49e5-8d82-30c564927c95/input_file.json"
     output_file = "/tmp/575732e-691e-49e5-8d82-30c564927c95/output_file.json"
     directory = "/tmp/575732e-691e-49e5-8d82-30c564927c95"
-    expected_results = f"Rscript /rqtl2_wrapper.R --input_file {input_file} --directory {directory} --output_file {output_file} --nperm 12 --threshold 0.05 --cores 1"
+    expected_results = f"Rscript /rqtl2_wrapper.R --input_file {input_file} --directory {directory} --output_file {output_file} --nperm 12 --method LMM --threshold 0.05 --cores 1"
 
     # test for using default configs
     assert compose_rqtl2_cmd(rqtl_path="/rqtl2_wrapper.R",
@@ -82,12 +82,13 @@ def test_compose_rqtl2_cmd():
                              workspace_dir=directory,
                              data={
                                  "nperm": 12,
-                                 "threshold": 0.05
+                                 "threshold": 0.05,
+                                 "method" : "LMM"
                              },
                              config={}) == expected_results
 
-    # test for default permutation  and threshold and  custom configs
-    expected_results = f"/bin/rscript /rqtl2_wrapper.R --input_file {input_file} --directory {directory} --output_file {output_file} --nperm 0 --threshold 1 --cores 12"
+    # test for default permutation, method  and threshold and  custom configs
+    expected_results = f"/bin/rscript /rqtl2_wrapper.R --input_file {input_file} --directory {directory} --output_file {output_file} --nperm 0 --method HK --threshold 1 --cores 12"
     assert (compose_rqtl2_cmd(rqtl_path="/rqtl2_wrapper.R",
                               input_file=input_file,
                               output_file=output_file,