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
633 stars 241 forks source link

[Solved] bcftools merge Failed to open *vcf.gz: could not load index #2205

Closed DLCrawford closed 1 week ago

DLCrawford commented 1 month ago

Error: with bcftools merge, "could not load index" This is an old issue that had a mixture of solutions.
The simplest solution that worked for me was BGZIP > new directory bgzip file.vcf > merge/file.vcf In a merge directory with bgzip .vcf.gz files REMOVE bgzip index .gzi Remove *.vcf.gz.gzi, which was created by bpzip.

INDEX bcftools index -t *.vcf.gz

MERGE bcftools merge 1.vcf.gz 2.vcf.gz 3.vcf.gz -Oz -o 1_2_3_merged_vcf.gz

pd3 commented 1 week ago

Thank you