I am having an issue when trying to perform bcftools merge. I get these errors with the first file in the list,
[E::hts_hopen] Failed to open file filename1.bcf.csi
[E::hts_open_format] Failed to open file filename1.bcf.csi
Failed to open filename1.bcf.csi Exec format error
I take .bcf files and index them with bcftools index ... using htsfile I find my files are indeed "CSI version 1 compressed index data", of "BCF version 2.2 compressed variant calling data", originally from files of "VCF file version 4.2 variant calling text" I am using "BCFtools Version: 1.9 (using htslib 1.9)"
This is my script:
bcftools merge --missing-to-ref --file-list /vol_c/scripts/file_list.txt --merge all --threads 14 --output all58_samples.vcf
1 answer
I think the program is trying to open a .vcf.gz.csi file rather than the actual data which is the .vcf.gz file, the csi file is not data, just a table of contents that points to data in the actual .vcf.gz file. Make sure that the vcf.gz and vcf.gz.csi data is in the same directory, and that the script is taking as input: data, not indices of the data.
Log in to answer this question.