aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2024-04-03 11:09:20 +0200
committerFrederick Muriuki Muriithi2024-09-12 07:40:03 -0500
commitfd25b6bf205e4642cf5f6ba5ed0e0cad73efc0b6 (patch)
tree63511ead7559cfcc360c9ea67229fd3931d3d92e
parentd623d931046495239c7ce9ec3024e028b2f26fde (diff)
downloadgenenetwork3-fd25b6bf205e4642cf5f6ba5ed0e0cad73efc0b6.tar.gz
rqtl_wrapper: minor fixes
-rw-r--r--README.md3
-rw-r--r--gn3/api/general.py2
-rw-r--r--tests/unit/test_commands.py4
3 files changed, 4 insertions, 5 deletions
diff --git a/README.md b/README.md
index d22948c..c75e059 100644
--- a/README.md
+++ b/README.md
@@ -122,11 +122,10 @@ See also instructions in [.guix.scm](.guix.scm).
These configurations should be set in an external config file, pointed to with the environment variable GN3_CONF.
- SPARQL_ENDPOINT (ex: "http://localhost:9082/sparql")
-- RQTL_WRAPPER (ex: "~/genenetwork3/scripts/rqtl_wrapper.R")
- XAPIAN_DB_PATH (ex: "/export/data/genenetwork/xapian")
- TMPDIR
-TMPDIR also needs to be set correctly for the R script(s) because they pass results on as files on the local system (previously there was an issue with it being set to /tmp instead of ~/genenetwork3/tmp)
+TMPDIR also needs to be set correctly for the R script(s) because they pass results on as files on the local system (previously there was an issue with it being set to /tmp instead of ~/genenetwork3/tmp). Note that the Guix build system should take care of the paths.
## Command-Line Utility Scripts
diff --git a/gn3/api/general.py b/gn3/api/general.py
index 891f992..b984361 100644
--- a/gn3/api/general.py
+++ b/gn3/api/general.py
@@ -64,7 +64,7 @@ def run_r_qtl(geno_filestr, pheno_filestr):
"""Run r_qtl command using the written rqtl_wrapper program
"""
- rqtl_wrapper = 'scripts/rqtl_wrapper.R'
+ rqtl_wrapper = 'scripts/rqtl_wrapper.R' # This is a stub
cmd = (f"Rscript {rqtl_wrapper} "
f"{geno_filestr} {pheno_filestr}")
return jsonify(run_cmd(cmd)), 201
diff --git a/tests/unit/test_commands.py b/tests/unit/test_commands.py
index 4dd8735..de0918a 100644
--- a/tests/unit/test_commands.py
+++ b/tests/unit/test_commands.py
@@ -61,7 +61,7 @@ class TestCommands(unittest.TestCase):
def test_compose_rqtl_cmd(self):
"""Test that the R/qtl cmd is composed correctly"""
self.assertEqual(
- compose_rqtl_cmd(rqtl_wrapper_cmd="rqtl-wrapper",
+ compose_rqtl_cmd(rqtl_wrapper_cmd="scripts/rqtl-wrapper",
rqtl_wrapper_kwargs={
"g": "the_genofile",
"p": "the_phenofile",
@@ -74,7 +74,7 @@ class TestCommands(unittest.TestCase):
rqtl_wrapper_bool_kwargs=[
"addcovar"
]),
- ("Rscript rqtl-wrapper "
+ ("Rscript scripts/rqtl-wrapper "
"--g the_genofile --p the_phenofile "
"--model np --method ehk "
"--nperm 2000 --scale Mb "