This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problems with bcf concat

Hello!

I have multiple VCFs files for the same sample. I used the commad

bcftools concat -a -Oz -o concat.vcf.gz 242487_vs_242482.bcftools.vcf.gz 242487_vs_242482.freebayes.vcf.gz

But i have the next error

Checking the headers and starting positions of 2 files
[W::hts_idx_load3] The index file is older than the data file: 242487_vs_242482.bcftools.vcf.gz.tbi
[W::hts_idx_load3] The index file is older than the data file: 242487_vs_242482.freebayes.vcf.gz.tbi
Different number of samples in 242487_vs_242482.freebayes.vcf.gz. Perhaps "bcftools merge" is what you are looking for?

I don't know how to resolve it. Thank you for your help

bcftools vcf

1 answer

bcftools concat is for merging files with the SAME SAMPLES but with different positions (eg: vcf chunk for chr1, vcf chunck for chr2, vcf chunck for chr3, ...)

bcftools merge is for merging files with the DIFFERENT SAMPLES for the same regions (eg: vcf for sample1, vcf for sample2, vcf for sample3 ...)

as the error message said, may be you want 'bcftools merge'

Log in to answer this question.