Skip to content

Commit

Permalink
Add test for GT in header, but not FORMAT
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite committed Jul 8, 2024
1 parent 399cdc6 commit 957fdd0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bio2zarr/vcf2zarr/verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def verify(vcf_path, zarr_path, show_progress=False):
chrom = root["contig_id"][:][root["variant_contig"][:]]
vid = root["variant_id"][:]
call_genotype = None
if "call_genotype" in root:
if "call_genotype" in root and root["call_genotype"].size > 0:
call_genotype = iter(root["call_genotype"])

vcf = cyvcf2.VCF(vcf_path)
Expand Down
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions tests/test_vcf_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ def test_duplicate_paths(self, tmp_path):
"sample.vcf.gz",
"sample_old_tabix.vcf.gz",
"sample_no_genotypes.vcf.gz",
"sample_no_genotypes_with_gt_header.vcf.gz",
"1kg_2020_chrM.vcf.gz",
"field_type_combos.vcf.gz",
"out_of_order_contigs.vcf.gz",
Expand Down

0 comments on commit 957fdd0

Please sign in to comment.