aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-02-20 06:12:36 +0300
committerFrederick Muriuki Muriithi2024-02-20 06:12:36 +0300
commit2f4d2c691f2a40e506d7fc274a0fcd717a028f3d (patch)
tree723a524a2416d432efc3070ac1ba4b0f4301d7d3 /tests
parentb1483d974d30d162e12557f55e856ec7d79bad2e (diff)
downloadgn-uploader-2f4d2c691f2a40e506d7fc274a0fcd717a028f3d.tar.gz
Read samples from geno file.
Diffstat (limited to 'tests')
-rw-r--r--tests/r_qtl/test_r_qtl2_geno.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/r_qtl/test_r_qtl2_geno.py b/tests/r_qtl/test_r_qtl2_geno.py
index c33984e..d3c77e6 100644
--- a/tests/r_qtl/test_r_qtl2_geno.py
+++ b/tests/r_qtl/test_r_qtl2_geno.py
@@ -269,3 +269,16 @@ def test_parse_founder_geno_files(relpath, expected):
"founder_geno",
cdata,
*rqtl2.make_process_data_geno(cdata))) == expected
+
+
+@pytest.mark.unit_test
+@pytest.mark.parametrize(
+ "filepath,expected",
+ (("tests/r_qtl/test_files/test_geno.zip",
+ ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")),
+ ("tests/r_qtl/test_files/test_geno_transposed.zip",
+ ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")),
+ ("tests/r_qtl/test_files/test_geno_multiple.zip",
+ ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10"))))
+def test_load_geno_samples(filepath, expected):
+ assert sorted(rqtl2.load_geno_samples(filepath)) == sorted(expected)