@@ -229,6 +229,43 @@ def test_vcf_to_zarr__compressor_and_filters(shared_datadir, is_path, tmp_path):
229
229
assert z ["variant_id_mask" ].filters is None
230
230
231
231
232
+ @pytest .mark .parametrize (
233
+ "is_path" ,
234
+ [True , False ],
235
+ )
236
+ @pytest .mark .filterwarnings ("ignore::sgkit.io.vcf.MaxAltAllelesExceededWarning" )
237
+ def test_vcf_to_zarr__parallel_compressor_and_filters (
238
+ shared_datadir , is_path , tmp_path
239
+ ):
240
+ path = path_for_test (shared_datadir , "CEUTrio.20.21.gatk3.4.g.vcf.bgz" , is_path )
241
+ output = tmp_path .joinpath ("vcf_concat.zarr" ).as_posix ()
242
+ regions = ["20" , "21" ]
243
+
244
+ default_compressor = Blosc ("zlib" , 1 , Blosc .NOSHUFFLE )
245
+ variant_id_compressor = Blosc ("zlib" , 2 , Blosc .NOSHUFFLE )
246
+ encoding = dict (
247
+ variant_id = dict (compressor = variant_id_compressor ),
248
+ variant_id_mask = dict (filters = None ),
249
+ )
250
+ vcf_to_zarr (
251
+ path ,
252
+ output ,
253
+ regions = regions ,
254
+ chunk_length = 5_000 ,
255
+ compressor = default_compressor ,
256
+ encoding = encoding ,
257
+ )
258
+
259
+ # look at actual Zarr store to check compressor and filters
260
+ z = zarr .open (output )
261
+ assert z ["call_genotype" ].compressor == default_compressor
262
+ assert z ["call_genotype" ].filters is None
263
+ assert z ["call_genotype_mask" ].filters == [PackBits ()]
264
+
265
+ assert z ["variant_id" ].compressor == variant_id_compressor
266
+ assert z ["variant_id_mask" ].filters is None
267
+
268
+
232
269
@pytest .mark .parametrize (
233
270
"is_path" ,
234
271
[True , False ],
0 commit comments