aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-01-15 18:36:06 +0300
committerFrederick Muriuki Muriithi2024-01-15 18:36:06 +0300
commit9b51f59bc4b598c1136525300af5f696bcf66fc0 (patch)
tree37f7ef6f281c036e33e8887cdf4fbbf357489a8d /tests
parent42b43f8d46fe0c25703de914a687127726ece35e (diff)
downloadgn-uploader-9b51f59bc4b598c1136525300af5f696bcf66fc0.tar.gz
Process `na.strings` even for default cases
There was a bug where the `na.strings` were not processed correctly if the user called the `r_qtl.r_qtl2.file_data(...)` function without explicitly providing the `process_*` arguments. This commit fixes that.
Diffstat (limited to 'tests')
-rw-r--r--tests/r_qtl/test_files/test_pheno.zipbin485 -> 503 bytes
-rw-r--r--tests/r_qtl/test_files/test_pheno_transposed.zipbin536 -> 557 bytes
-rw-r--r--tests/r_qtl/test_r_qtl2_pheno.py8
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/r_qtl/test_files/test_pheno.zip b/tests/r_qtl/test_files/test_pheno.zip
index 5c709e7..ba9bbb0 100644
--- a/tests/r_qtl/test_files/test_pheno.zip
+++ b/tests/r_qtl/test_files/test_pheno.zip
Binary files differ
diff --git a/tests/r_qtl/test_files/test_pheno_transposed.zip b/tests/r_qtl/test_files/test_pheno_transposed.zip
index 9bff030..e6a87aa 100644
--- a/tests/r_qtl/test_files/test_pheno_transposed.zip
+++ b/tests/r_qtl/test_files/test_pheno_transposed.zip
Binary files differ
diff --git a/tests/r_qtl/test_r_qtl2_pheno.py b/tests/r_qtl/test_r_qtl2_pheno.py
index a7de675..c7c0c86 100644
--- a/tests/r_qtl/test_r_qtl2_pheno.py
+++ b/tests/r_qtl/test_r_qtl2_pheno.py
@@ -13,14 +13,14 @@ from r_qtl import r_qtl2 as rqtl2
({"id": "1", "liver": "61.92", "spleen": "153.16"},
{"id": "2", "liver": "88.33", "spleen": "178.58"},
{"id": "3", "liver": "58", "spleen": "131.91"},
- {"id": "4", "liver": "78.06", "spleen": "126.13"},
- {"id": "5", "liver": "65.31", "spleen": "181.05"})),
+ {"id": "4", "liver": "78.06", "spleen": None},
+ {"id": "5", "liver": None, "spleen": "181.05"})),
("tests/r_qtl/test_files/test_pheno_transposed.zip",
({"id": "1", "liver": "61.92", "spleen": "153.16"},
{"id": "2", "liver": "88.33", "spleen": "178.58"},
{"id": "3", "liver": "58", "spleen": "131.91"},
- {"id": "4", "liver": "78.06", "spleen": "126.13"},
- {"id": "5", "liver": "65.31", "spleen": "181.05"}))))
+ {"id": "4", "liver": "78.06", "spleen": None},
+ {"id": "5", "liver": None, "spleen": "181.05"}))))
def test_parse_pheno_files(filepath, expected):
"""Test parsing of 'pheno' files from the R/qtl2 bundle.