@@ -98,6 +98,7 @@ def from_field(
98
98
# TODO make an option to add in the empty extra dimension
99
99
if vcf_field .summary .max_number > 1 :
100
100
shape .append (vcf_field .summary .max_number )
101
+ chunks .append (vcf_field .summary .max_number )
101
102
# TODO we should really be checking this to see if the named dimensions
102
103
# are actually correct.
103
104
if vcf_field .vcf_number == "R" :
@@ -251,7 +252,12 @@ def spec_from_field(field, array_name=None):
251
252
)
252
253
253
254
def fixed_field_spec (
254
- name , dtype , vcf_field = None , shape = (m ,), dimensions = ("variants" ,)
255
+ name ,
256
+ dtype ,
257
+ vcf_field = None ,
258
+ shape = (m ,),
259
+ dimensions = ("variants" ,),
260
+ chunks = None ,
255
261
):
256
262
return ZarrArraySpec .new (
257
263
vcf_field = vcf_field ,
@@ -260,7 +266,7 @@ def fixed_field_spec(
260
266
shape = shape ,
261
267
description = "" ,
262
268
dimensions = dimensions ,
263
- chunks = [variants_chunk_size ],
269
+ chunks = chunks or [variants_chunk_size ],
264
270
)
265
271
266
272
alt_field = icf .fields ["ALT" ]
@@ -276,12 +282,14 @@ def fixed_field_spec(
276
282
dtype = "bool" ,
277
283
shape = (m , icf .metadata .num_filters ),
278
284
dimensions = ["variants" , "filters" ],
285
+ chunks = (variants_chunk_size , icf .metadata .num_filters ),
279
286
),
280
287
fixed_field_spec (
281
288
name = "variant_allele" ,
282
289
dtype = "O" ,
283
290
shape = (m , max_alleles ),
284
291
dimensions = ["variants" , "alleles" ],
292
+ chunks = (variants_chunk_size , max_alleles ),
285
293
),
286
294
fixed_field_spec (
287
295
name = "variant_id" ,
@@ -329,6 +337,7 @@ def fixed_field_spec(
329
337
)
330
338
)
331
339
shape += [ploidy ]
340
+ chunks += [ploidy ]
332
341
dimensions += ["ploidy" ]
333
342
array_specs .append (
334
343
ZarrArraySpec .new (
0 commit comments