From 49fc18277d79226b0dbef0e476cf7bc8de2d2656 Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Fri, 10 Jan 2025 12:07:30 +0000 Subject: [PATCH] Fixup --- bio2zarr/vcf2zarr/vcz.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bio2zarr/vcf2zarr/vcz.py b/bio2zarr/vcf2zarr/vcz.py index c882006..2ed62ce 100644 --- a/bio2zarr/vcf2zarr/vcz.py +++ b/bio2zarr/vcf2zarr/vcz.py @@ -848,17 +848,10 @@ def encode_local_alleles_partition(self, partition_index): store=self.wip_partition_array_path(partition_index, "call_genotype"), mode="r", ) - alleles_array = zarr.open_array( - store=self.wip_partition_array_path(partition_index, "variant_allele"), - mode="r", - ) for chunk_index in range(gt_array.cdata_shape[0]): - A = alleles_array.blocks[chunk_index] - G = gt_array.blocks[chunk_index] - for alleles, var in zip(A, G): + for genotypes in gt_array.blocks[chunk_index]: j = call_LAA.next_buffer_row() - # TODO we should probably compute LAAs by chunk for efficiency - call_LAA.buff[j] = compute_laa_field(var, alleles) + call_LAA.buff[j] = compute_laa_field(genotypes) call_LAA.flush() self.finalise_partition_array(partition_index, "call_LAA")