samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
649 stars 240 forks source link

`bcftools sort` assertion failed #2043

Open meganbg opened 9 months ago

meganbg commented 9 months ago

I am trying to run bcftools sort on a VCF for a species with long chromosomes (>2Gb), but have run into this error:

$ bcftools sort -o sample.vcf.gz -m 500G --temp-dir /tmp/bcftools_tmp -Oz sample.vcf

Writing to /tmp/bcftools_tmpRBcppa
bcftools: vcfsort.c:177: buf_push: Assertion `rec->unpacked==BCF_UN_STR && !rec->d.flt && !rec->d.info && !rec->d.fmt && !rec->d.var' failed.
Aborted (core dumped)

Versions:

$ bcftools version

bcftools 1.18
Using htslib 1.18
Copyright (C) 2023 Genome Research Ltd.
License Expat: The MIT/Expat license
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I have successfully run bcftools sort on VCFs concerning species with smaller chromosomes, so I believe the size has to do with the issue.

TIA,

Megan

pd3 commented 7 months ago

This is a peculiar case. Any chance you could provide a test case to reproduce the error?