aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/r_qtl/test_r_qtl2_geno.py134
1 files changed, 54 insertions, 80 deletions
diff --git a/tests/r_qtl/test_r_qtl2_geno.py b/tests/r_qtl/test_r_qtl2_geno.py
index 5ebb5a9..908ef55 100644
--- a/tests/r_qtl/test_r_qtl2_geno.py
+++ b/tests/r_qtl/test_r_qtl2_geno.py
@@ -92,86 +92,60 @@ from r_qtl import r_qtl2 as rqtl2
"EC.66C": 2
})),
("tests/r_qtl/test_files/test_geno_transposed.zip",
- ({
- "id": "1",
- "PVV4": 1,
- "AXR-1": 1,
- "HH.335C-Col/PhyA": 1,
- "EC.480C": 1,
- "EC.66C": 1
- },
- {
- "id": "2",
- "PVV4": 1,
- "AXR-1": 1,
- "HH.335C-Col/PhyA": 1,
- "EC.480C": 1,
- "EC.66C": 1
- },
- {
- "id": "3",
- "PVV4": 2,
- "AXR-1": 2,
- "HH.335C-Col/PhyA": None,
- "EC.480C": 1,
- "EC.66C": 1
- },
- {
- "id": "4",
- "PVV4": 1,
- "AXR-1": 1,
- "HH.335C-Col/PhyA": 1,
- "EC.480C": 1,
- "EC.66C": 1
- },
- {
- "id": "5",
- "PVV4": 2,
- "AXR-1": 2,
- "HH.335C-Col/PhyA": 2,
- "EC.480C": 2,
- "EC.66C": 2
- },
- {
- "id": "6",
- "PVV4": 2,
- "AXR-1": 2,
- "HH.335C-Col/PhyA": 2,
- "EC.480C": 2,
- "EC.66C": 2
- },
- {
- "id": "7",
- "PVV4": 1,
- "AXR-1": 1,
- "HH.335C-Col/PhyA": 1,
- "EC.480C": 1,
- "EC.66C": 1
- },
- {
- "id": "8",
- "PVV4": 2,
- "AXR-1": 2,
- "HH.335C-Col/PhyA": 2,
- "EC.480C": 1,
- "EC.66C": 1
- },
- {
- "id": "9",
- "PVV4": None,
- "AXR-1": 2,
- "HH.335C-Col/PhyA": 2,
- "EC.480C": 2,
- "EC.66C": 2
- },
- {
- "id": "10",
- "PVV4": 2,
- "AXR-1": 2,
- "HH.335C-Col/PhyA": 2,
- "EC.480C": 2,
- "EC.66C": 2
- }))))
+ ({"id": "1", "PVV4": 1},
+ {"id": "2", "PVV4": 1},
+ {"id": "3", "PVV4": 2},
+ {"id": "4", "PVV4": 1},
+ {"id": "5", "PVV4": 2},
+ {"id": "6", "PVV4": 2},
+ {"id": "7", "PVV4": 1},
+ {"id": "8", "PVV4": 2},
+ {"id": "9", "PVV4": None},
+ {"id": "10", "PVV4": 2},
+
+ {"id": "1", "AXR-1": 1},
+ {"id": "2", "AXR-1": 1},
+ {"id": "3", "AXR-1": 2},
+ {"id": "4", "AXR-1": 1},
+ {"id": "5", "AXR-1": 2},
+ {"id": "6", "AXR-1": 2},
+ {"id": "7", "AXR-1": 1},
+ {"id": "8", "AXR-1": 2},
+ {"id": "9", "AXR-1": 2},
+ {"id": "10", "AXR-1": 2},
+
+ {"id": "1", "HH.335C-Col/PhyA": 1},
+ {"id": "2", "HH.335C-Col/PhyA": 1},
+ {"id": "3", "HH.335C-Col/PhyA": None},
+ {"id": "4", "HH.335C-Col/PhyA": 1},
+ {"id": "5", "HH.335C-Col/PhyA": 2},
+ {"id": "6", "HH.335C-Col/PhyA": 2},
+ {"id": "7", "HH.335C-Col/PhyA": 1},
+ {"id": "8", "HH.335C-Col/PhyA": 2},
+ {"id": "9", "HH.335C-Col/PhyA": 2},
+ {"id": "10", "HH.335C-Col/PhyA": 2},
+
+ {"id": "1", "EC.480C": 1},
+ {"id": "2", "EC.480C": 1},
+ {"id": "3", "EC.480C": 1},
+ {"id": "4", "EC.480C": 1},
+ {"id": "5", "EC.480C": 2},
+ {"id": "6", "EC.480C": 2},
+ {"id": "7", "EC.480C": 1},
+ {"id": "8", "EC.480C": 1},
+ {"id": "9", "EC.480C": 2},
+ {"id": "10", "EC.480C": 2},
+
+ {"id": "1","EC.66C": 1},
+ {"id": "2", "EC.66C": 1},
+ {"id": "3", "EC.66C": 1},
+ {"id": "4", "EC.66C": 1},
+ {"id": "5", "EC.66C": 2},
+ {"id": "6", "EC.66C": 2},
+ {"id": "7", "EC.66C": 1},
+ {"id": "8", "EC.66C": 1},
+ {"id": "9", "EC.66C": 2},
+ {"id": "10", "EC.66C": 2}))))
def test_parse_geno_files(relpath,expected):
"""
GIVEN: Path to a zip file with R/qtl2 data