about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/r_qtl/test_r_qtl2_geno.py27
1 files changed, 24 insertions, 3 deletions
diff --git a/tests/r_qtl/test_r_qtl2_geno.py b/tests/r_qtl/test_r_qtl2_geno.py
index 7b660a6..d323c4b 100644
--- a/tests/r_qtl/test_r_qtl2_geno.py
+++ b/tests/r_qtl/test_r_qtl2_geno.py
@@ -163,11 +163,32 @@ from r_qtl import r_qtl2 as rqtl2
              "EC.480C": 2,
              "EC.66C": 2
          }))))
-def test_parse_geno_files(relpath,expected):
-    """
+def test_parse_geno_files(relpath, expected):
+    """Test parsing of geno files from the R/qtl2 bundle.
+
     GIVEN: Path to a zip file with R/qtl2 data
     WHEN: we parse the geno file
     THEN: ensure that the data we get is as expected
     """
     with ZipFile(Path(relpath).absolute(), "r") as zfile:
-        assert tuple(rqtl2.genotype_data(zfile, rqtl2.control_data(zfile))) == expected
+        assert tuple(
+            rqtl2.genotype_data(zfile, rqtl2.control_data(zfile))) == expected
+
+@pytest.mark.unit_test
+@pytest.mark.parametrize(
+    "relpath,expected",
+    (
+        ("tests/r_qtl/test_files/test_founder_geno.zip",
+         ()),
+        ("tests/r_qtl/test_files/test_founder_geno_transposed.zip",
+         ())))
+def test_parse_founder_geno_files(relpath, expected):
+    """Test parsing of founder_geno files from the R/qtl2 bundle.
+
+    GIVEN: Path to a zip file with R/qtl2 data
+    WHEN: we parse the founder_geno file
+    THEN: ensure that the data we get is as expected
+    """
+    with ZipFile(Path(relpath).absolute(), "r") as zfile:
+        assert tuple(rqtl2.founder_genotype_data(
+            zfile, rqtl2.control_data(zfile))) == expected