aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-02-20 06:32:56 +0300
committerFrederick Muriuki Muriithi2024-02-20 06:32:56 +0300
commita4324cd24b5a14fbcf19a6e04d2b76fb2838038e (patch)
tree586f0d6088151091d5b60f456e6d7b8bf76f0521 /tests
parent2f4d2c691f2a40e506d7fc274a0fcd717a028f3d (diff)
downloadgn-uploader-a4324cd24b5a14fbcf19a6e04d2b76fb2838038e.tar.gz
Generalise fetching of samples/cases/individuals.
Diffstat (limited to 'tests')
-rw-r--r--tests/r_qtl/test_r_qtl2_pheno.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/r_qtl/test_r_qtl2_pheno.py b/tests/r_qtl/test_r_qtl2_pheno.py
index c7c0c86..d31ad54 100644
--- a/tests/r_qtl/test_r_qtl2_pheno.py
+++ b/tests/r_qtl/test_r_qtl2_pheno.py
@@ -57,3 +57,14 @@ def test_parse_phenocovar_files(filepath, expected):
with ZipFile(Path(filepath).absolute(), "r") as zfile:
cdata = rqtl2.control_data(zfile)
assert tuple(rqtl2.file_data(zfile, "phenocovar", cdata)) == expected
+
+
+@pytest.mark.unit_test
+@pytest.mark.parametrize(
+ "filepath,expected",
+ (("tests/r_qtl/test_files/test_pheno.zip",
+ ("1", "2", "3", "4", "5")),
+ ("tests/r_qtl/test_files/test_pheno_transposed.zip",
+ ("1", "2", "3", "4", "5"))))
+def test_load_geno_samples(filepath, expected):
+ assert sorted(rqtl2.load_pheno_samples(filepath)) == sorted(expected)