Skip to content

Commit 21c1454

Browse files
committed
Give hint for how to work around Number='.' error when reading VCF
1 parent ca38308 commit 21c1454

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sgkit/io/vcfzarr_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,5 +524,5 @@ def vcf_number_to_dimension_and_size(
524524
)
525525
return (dim_name, int(vcf_number))
526526
raise ValueError(
527-
f"{category} field '{key}' is defined as Number '{vcf_number}', which is not supported."
527+
f"{category} field '{key}' is defined as Number '{vcf_number}', which is not supported. Consider specifying `field_defs` to provide a concrete size for this field."
528528
)

sgkit/tests/io/vcf/test_vcf_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ def test_vcf_to_zarr__fields_errors(shared_datadir, tmp_path):
11851185

11861186
with pytest.raises(
11871187
ValueError,
1188-
match=r"INFO field 'AC' is defined as Number '.', which is not supported.",
1188+
match=r"INFO field 'AC' is defined as Number '.', which is not supported. Consider specifying `field_defs` to provide a concrete size for this field.",
11891189
):
11901190
vcf_to_zarr(path, output, fields=["INFO/AC"])
11911191

0 commit comments

Comments
 (0)