From 065e7e0481aad31d43eaf6bf0114ac76014e0ce2 Mon Sep 17 00:00:00 2001 From: Magnus Wahlberg Date: Wed, 22 May 2024 10:59:31 +0200 Subject: [PATCH] add filter_variants_multiple test --- .../expected/expected_data.npz | Bin 0 -> 771 bytes .../input/qc/input_c1_b1.tsv.gz | Bin 0 -> 51 bytes .../input/qc/input_c1_b2.tsv.gz | Bin 0 -> 59 bytes .../input/samples_chr.csv | 11 +++++++++++ .../input/sparse_gt/chr1/input_c1_b1.tsv.gz | Bin 0 -> 286 bytes .../input/variants.parquet | Bin 0 -> 4039 bytes .../input/variants.tsv.gz | Bin 0 -> 198 bytes tests/preprocessing/test_preprocess.py | 10 ++++++++++ 8 files changed, 21 insertions(+) create mode 100644 tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/expected/expected_data.npz create mode 100644 tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/qc/input_c1_b1.tsv.gz create mode 100644 tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/qc/input_c1_b2.tsv.gz create mode 100644 tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/samples_chr.csv create mode 100644 tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/sparse_gt/chr1/input_c1_b1.tsv.gz create mode 100644 tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/variants.parquet create mode 100644 tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/variants.tsv.gz diff --git a/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/expected/expected_data.npz b/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/expected/expected_data.npz new file mode 100644 index 0000000000000000000000000000000000000000..ac609b3d615e47176ebbc4fd8014cb09641f53d9 GIT binary patch literal 771 zcmWIWW@Zs#U|`??Vnv1>3)Xrr1hTd;GB5}+h%l5T7G);pmBi;JmK0@H=;akuGBOB& zWr2zqKq^6C_8ak6(gG(>1RM)kJ8x3doR}qfOBdu#&Rn!^@q&5N;zNR_%n+X+KV=e^ zP`URRO+VHy@pKijB}_l1+S;tRp3So2+RF8WNzaXqjZIA8W}7C6xuKXubqVg8)b= z2w?SP+~mv^r1{d|$N3{aB8SZnp$K H0|Ns9?Sm3} literal 0 HcmV?d00001 diff --git a/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/qc/input_c1_b2.tsv.gz b/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/qc/input_c1_b2.tsv.gz new file mode 100644 index 0000000000000000000000000000000000000000..95c29b15f49db7a3ad4977961ce316f160ff238e GIT binary patch literal 59 zcmb2|=HPJN?3>2GoS9cpS`wdZ7@uUMS5jQY;C)WR=!uD`q4@?A!$&30OP+bPaY;xy PurjP_ak!<#z`y_iPG=LB literal 0 HcmV?d00001 diff --git a/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/samples_chr.csv b/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/samples_chr.csv new file mode 100644 index 00000000..ea0a0082 --- /dev/null +++ b/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/samples_chr.csv @@ -0,0 +1,11 @@ +100096 +100097 +100099 +100100 +100101 +100102 +100103 +100104 +100105 +100106 +100107 diff --git a/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/sparse_gt/chr1/input_c1_b1.tsv.gz b/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/sparse_gt/chr1/input_c1_b1.tsv.gz new file mode 100644 index 0000000000000000000000000000000000000000..de13378eb211d4b3100391181b6a51cecc0c5f06 GIT binary patch literal 286 zcmV+(0pb21iwFqXx~60R18Ht>b#z~2F<)XaE_8Et0Cm(c4#OY}1<;wE1{(}`tUB}p zxj~lBz5h@$Bz!lv)S-H^%(qe4KVM4JD3`RQccPq+zx3D-7ph&SKM&8^T#xE0*T5z4 zzI^CNFXvqF`3sx^=fti@{UML?nA^GM0XKP!Q{a%tc+?;BNS*%r_gXc3InnXHtk=LL za5%R$oo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16Usu+aS}V!QZoyyaga6QzNrbM$f8qZHwH4x< literal 0 HcmV?d00001 diff --git a/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/variants.tsv.gz b/tests/preprocessing/test_data/process_sparse_gt/filter_variants_multiple/input/variants.tsv.gz new file mode 100644 index 0000000000000000000000000000000000000000..6da9e9cd4a8e235b6ec1086605868903df410051 GIT binary patch literal 198 zcmV;%06G63iwFoAmWgBn|8`+=X<=@3b1rmqb^t`r!4AS83Y^dCd469D^^b^3KL*(A?uF4E5&Mi zu$QG2*;2_RSvkxug!W}}VbZg{%%>Df6&E>X(b@&4S0RR6309QVUxN`vj0QIF? A)Bpeg literal 0 HcmV?d00001 diff --git a/tests/preprocessing/test_preprocess.py b/tests/preprocessing/test_preprocess.py index db3a3084..a1b31619 100644 --- a/tests/preprocessing/test_preprocess.py +++ b/tests/preprocessing/test_preprocess.py @@ -51,6 +51,16 @@ def load_h5_archive(h5_path): ], "genotypes_chr1.h5", ), + ( + "filter_variants_multiple", + [ + "--chromosomes", + "1", + "--exclude-variants", + f"{(tests_data_dir / 'process_sparse_gt/filter_variants_minimal/input/qc').as_posix()}", + ], + "genotypes_chr1.h5", + ), ( "filter_samples_minimal", [