I have a use-case where I'd like to merge BCF files with the REF/ALT fields unset, which returns a segmentation fault. The following contains two simple BCF files (and their .csi indexes) to illustrate: test.tar.gz
Running bcftools view on either file looks fine, but
> bcftools merge first.bcf second.bcf
[1] 23882 segmentation fault (core dumped) bcftools merge first.bcf second.bcf
Setting the REF/ALT fields in each BCF fixes the problem. Also, converting to VCF first seems to work, i.e. the following runs fine:
> bcftools view first.bcf | bgzip > first.vcf.gz && tabix first.vcf.gz
> bcftools view second.bcf | bgzip > second.vcf.gz && tabix second.vcf.gz
> bcftools merge first.vcf.gz second.vcf.gz
However, for the application I have in mind, converting via VCF is not an option, unfortunately.
At first, I was unsure whether the BCF specs permit unset REF/ALT, but since writing the BCF (using htslib bindings) and other bcftools commands appear to work, I'm thinking this is not the problem?
I have a use-case where I'd like to merge BCF files with the REF/ALT fields unset, which returns a segmentation fault. The following contains two simple BCF files (and their
.csiindexes) to illustrate: test.tar.gzRunning
bcftools viewon either file looks fine, butSetting the REF/ALT fields in each BCF fixes the problem. Also, converting to VCF first seems to work, i.e. the following runs fine:
However, for the application I have in mind, converting via VCF is not an option, unfortunately.
At first, I was unsure whether the BCF specs permit unset REF/ALT, but since writing the BCF (using htslib bindings) and other bcftools commands appear to work, I'm thinking this is not the problem?