Skip to content

Commit eb902ec

Browse files
tomwhitejeromekelleher
authored andcommitted
Fix contig lengths
1 parent eec8faf commit eb902ec

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

vcztools/vcf_writer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,7 @@ def _generate_header(
392392
)
393393

394394
# [1.4.7 Contig field format]
395-
contig_lengths = (
396-
ds.attrs["contig_lengths"] if "contig_lengths" in ds.attrs else None
397-
)
395+
contig_lengths = ds["contig_length"] if "contig_length" in ds else None
398396
for i, contig in enumerate(contigs):
399397
if contig_lengths is None:
400398
print(f"##contig=<ID={contig}>", file=output)

0 commit comments

Comments
 (0)