From 9322da0f79dfa4c3f9f899f5a861ce302ce21e9c Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 10 Jan 2024 04:44:53 +0300 Subject: Make identifier column name explicit Since the R/qtl2 bundle generator could name the identifier column anything, this commit converts the incoming identifier column name into something explicit that we know and can use. --- tests/r_qtl/test_r_qtl2_map_files.py | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'tests/r_qtl/test_r_qtl2_map_files.py') diff --git a/tests/r_qtl/test_r_qtl2_map_files.py b/tests/r_qtl/test_r_qtl2_map_files.py index 5c8ca6a..3427ffb 100644 --- a/tests/r_qtl/test_r_qtl2_map_files.py +++ b/tests/r_qtl/test_r_qtl2_map_files.py @@ -11,32 +11,32 @@ from r_qtl import r_qtl2 as rqtl2 "relpath,mapfiletype,expected", (("tests/r_qtl/test_files/test_gmap.zip", "gmap", - ({"marker": "PVV4", "chr": "1", "pos": "0.000000"}, - {"marker": "AXR-1", "chr": "1", "pos": "6.250674"}, - {"marker": "HH.335C-Col/PhyA", "chr": "1", "pos": "9.303868"}, - {"marker": "EC.480C", "chr": "1", "pos": "12.577629"}, - {"marker": "EC.66C", "chr": "1", "pos": "18.392830"})), + ({"id": "PVV4", "chr": "1", "pos": "0.000000"}, + {"id": "AXR-1", "chr": "1", "pos": "6.250674"}, + {"id": "HH.335C-Col/PhyA", "chr": "1", "pos": "9.303868"}, + {"id": "EC.480C", "chr": "1", "pos": "12.577629"}, + {"id": "EC.66C", "chr": "1", "pos": "18.392830"})), ("tests/r_qtl/test_files/test_gmap_transposed.zip", "gmap", - ({"marker": "PVV4", "chr": "1", "pos": "0.000000"}, - {"marker": "AXR-1", "chr": "1", "pos": "6.250674"}, - {"marker": "HH.335C-Col/PhyA", "chr": "1", "pos": "9.303868"}, - {"marker": "EC.480C", "chr": "1", "pos": "12.577629"}, - {"marker": "EC.66C", "chr": "1", "pos": "18.392830"})), + ({"id": "PVV4", "chr": "1", "pos": "0.000000"}, + {"id": "AXR-1", "chr": "1", "pos": "6.250674"}, + {"id": "HH.335C-Col/PhyA", "chr": "1", "pos": "9.303868"}, + {"id": "EC.480C", "chr": "1", "pos": "12.577629"}, + {"id": "EC.66C", "chr": "1", "pos": "18.392830"})), ("tests/r_qtl/test_files/test_pmap.zip", "pmap", - ({"marker": "D1Mit18", "chr": "1", "pos": "52.418656"}, - {"marker": "D1Mit80", "chr": "1", "pos": "86.377953"}, - {"marker": "D1Mit17", "chr": "1", "pos": "189.571337"}, - {"marker": "D2Mit379", "chr": "2", "pos": "37.451062"}, - {"marker": "D2Mit75", "chr": "2", "pos": "80.584782"})), + ({"id": "D1Mit18", "chr": "1", "pos": "52.418656"}, + {"id": "D1Mit80", "chr": "1", "pos": "86.377953"}, + {"id": "D1Mit17", "chr": "1", "pos": "189.571337"}, + {"id": "D2Mit379", "chr": "2", "pos": "37.451062"}, + {"id": "D2Mit75", "chr": "2", "pos": "80.584782"})), ("tests/r_qtl/test_files/test_pmap_transposed.zip", "pmap", - ({"marker": "D1Mit18", "chr": "1", "pos": "52.418656"}, - {"marker": "D1Mit80", "chr": "1", "pos": "86.377953"}, - {"marker": "D1Mit17", "chr": "1", "pos": "189.571337"}, - {"marker": "D2Mit379", "chr": "2", "pos": "37.451062"}, - {"marker": "D2Mit75", "chr": "2", "pos": "80.584782"})))) + ({"id": "D1Mit18", "chr": "1", "pos": "52.418656"}, + {"id": "D1Mit80", "chr": "1", "pos": "86.377953"}, + {"id": "D1Mit17", "chr": "1", "pos": "189.571337"}, + {"id": "D2Mit379", "chr": "2", "pos": "37.451062"}, + {"id": "D2Mit75", "chr": "2", "pos": "80.584782"})))) def test_parse_map_files(relpath, mapfiletype, expected): """ GIVEN: A path to a zip file, `relpath` and the type of the map file, -- cgit v1.2.3