@@ -309,15 +309,15 @@ def c_chunk_to_vcf(
309
309
no_update ,
310
310
preceding_future : concurrent .futures .Future | None = None ,
311
311
):
312
- chrom = contigs [get_vchunk_array (root . variant_contig , v_chunk , v_mask_chunk )]
312
+ chrom = contigs [get_vchunk_array (root [ " variant_contig" ] , v_chunk , v_mask_chunk )]
313
313
# TODO check we don't truncate silently by doing this
314
- pos = get_vchunk_array (root . variant_position , v_chunk , v_mask_chunk ).astype (
314
+ pos = get_vchunk_array (root [ " variant_position" ] , v_chunk , v_mask_chunk ).astype (
315
315
np .int32
316
316
)
317
- id = get_vchunk_array (root . variant_id , v_chunk , v_mask_chunk ).astype ("S" )
318
- alleles = get_vchunk_array (root . variant_allele , v_chunk , v_mask_chunk )
319
- qual = get_vchunk_array (root . variant_quality , v_chunk , v_mask_chunk )
320
- filter_ = get_vchunk_array (root . variant_filter , v_chunk , v_mask_chunk )
317
+ id = get_vchunk_array (root [ " variant_id" ] , v_chunk , v_mask_chunk ).astype ("S" )
318
+ alleles = get_vchunk_array (root [ " variant_allele" ] , v_chunk , v_mask_chunk )
319
+ qual = get_vchunk_array (root [ " variant_quality" ] , v_chunk , v_mask_chunk )
320
+ filter_ = get_vchunk_array (root [ " variant_filter" ] , v_chunk , v_mask_chunk )
321
321
format_fields = {}
322
322
info_fields = {}
323
323
num_samples = len (samples_selection ) if samples_selection is not None else None
@@ -346,7 +346,7 @@ def c_chunk_to_vcf(
346
346
else :
347
347
gt_phased = np .zeros_like (gt , dtype = bool )
348
348
349
- for name , zarray in root .items ():
349
+ for name , zarray in root .arrays ():
350
350
if (
351
351
name .startswith ("call_" )
352
352
and not name .startswith ("call_genotype" )
@@ -442,7 +442,8 @@ def _generate_header(ds, original_header, sample_ids, *, no_version: bool = Fals
442
442
# GT must be the first field if present, per the spec (section 1.6.2)
443
443
format_fields .append ("GT" )
444
444
445
- for var , arr in ds .items ():
445
+ for var in sorted (ds .keys ()):
446
+ arr = ds [var ]
446
447
if (
447
448
var .startswith ("variant_" )
448
449
and not var .endswith ("_fill" )
0 commit comments