aboutsummaryrefslogtreecommitdiff
path: root/wqflask/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/tests/unit')
-rw-r--r--wqflask/tests/unit/wqflask/marker_regression/genotype/bimbam/file_geno.txt0
-rw-r--r--wqflask/tests/unit/wqflask/marker_regression/genotype/bimbam/file_snps.txt0
-rw-r--r--wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py7
3 files changed, 5 insertions, 2 deletions
diff --git a/wqflask/tests/unit/wqflask/marker_regression/genotype/bimbam/file_geno.txt b/wqflask/tests/unit/wqflask/marker_regression/genotype/bimbam/file_geno.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/wqflask/tests/unit/wqflask/marker_regression/genotype/bimbam/file_geno.txt
diff --git a/wqflask/tests/unit/wqflask/marker_regression/genotype/bimbam/file_snps.txt b/wqflask/tests/unit/wqflask/marker_regression/genotype/bimbam/file_snps.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/wqflask/tests/unit/wqflask/marker_regression/genotype/bimbam/file_snps.txt
diff --git a/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py b/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py
index 43051828..24400b33 100644
--- a/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py
+++ b/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py
@@ -1,4 +1,5 @@
# test for wqflask/marker_regression/gemma_mapping.py
+import os
import unittest
import random
from unittest import mock
@@ -40,7 +41,8 @@ class TestGemmaMapping(unittest.TestCase):
@mock.patch("wqflask.marker_regression.gemma_mapping.webqtlConfig.GENERATED_IMAGE_DIR", "/home/user/img")
@mock.patch("wqflask.marker_regression.gemma_mapping.GEMMAOPTS", "-debug")
@mock.patch("wqflask.marker_regression.gemma_mapping.GEMMA_WRAPPER_COMMAND", "ghc")
- @mock.patch("wqflask.marker_regression.gemma_mapping.TEMPDIR", "/home/user/data/")
+ @mock.patch("wqflask.marker_regression.gemma_mapping.TEMPDIR",
+ os.path.join(os.path.dirname(__file__), "user/data"))
@mock.patch("wqflask.marker_regression.gemma_mapping.parse_loco_output")
@mock.patch("wqflask.marker_regression.gemma_mapping.flat_files")
@mock.patch("wqflask.marker_regression.gemma_mapping.gen_covariates_file")
@@ -64,7 +66,8 @@ class TestGemmaMapping(unittest.TestCase):
mock_os.path.isfile.return_value = True
mock_gen_covar.return_value = None
mock_choice.return_value = "R"
- mock_flat_files.return_value = "/home/genotype/bimbam"
+ mock_flat_files.return_value = os.path.join(
+ os.path.dirname(__file__), "genotype/bimbam")
mock_parse_loco.return_value = []
results = run_gemma(this_trait=trait, this_dataset=dataset, samples=[
], vals=[], covariates="", use_loco=True)