diff --git a/sgkit/io/vcf/vcf_converter.py b/sgkit/io/vcf/vcf_converter.py index b76964553..979625f54 100644 --- a/sgkit/io/vcf/vcf_converter.py +++ b/sgkit/io/vcf/vcf_converter.py @@ -138,10 +138,11 @@ def smallest_dtype(self): ret = "bool" else: assert self.vcf_type == "String" - if s.max_number == 0: - ret = "str" - else: - ret = "O" + ret = "str" + # if s.max_number == 0: + # ret = "str" + # else: + # ret = "O" # print("smallest dtype", self.name, self.vcf_type,":", ret) return ret diff --git a/sgkit/tests/io/vcf/test_vcf_reader.py b/sgkit/tests/io/vcf/test_vcf_reader.py index 9e120d1ea..8905addd8 100644 --- a/sgkit/tests/io/vcf/test_vcf_reader.py +++ b/sgkit/tests/io/vcf/test_vcf_reader.py @@ -1856,10 +1856,12 @@ def test_compare_vcf_to_zarr_convert(shared_datadir, tmp_path, vcf_name): # input for convert_vcf([vcf_path], zarr2_path) ds2 = load_dataset(zarr2_path) - vcf_to_zarr(vcf_path, zarr1_path, max_alt_alleles=ds2.variant_allele.shape[1] - 1) + vcf_to_zarr(vcf_path, zarr1_path, mixed_ploidy=True, max_alt_alleles=ds2.variant_allele.shape[1] - 1) ds1 = load_dataset(zarr1_path) # convert reads all variables by default. base_vars = list(ds1) ds2 = load_dataset(zarr2_path) + # print(ds1.call_genotype.values) + # print(ds2.call_genotype.values) xr.testing.assert_equal(ds1, ds2[base_vars])