Entering edit mode
8 months ago
giulia.cosenza
▴
20
Hello,
I am trying to using bcftools to combine 2 VCF files (in the folder there are the two .tbi files) with following command:
bcftools merge -m snps -O v -o merged.vcf a.vcf.gz b.vcf.gz
but got these error :
[E::get_intv] Failed to parse TBX_VCF, was wrong -p [type] used?
The offending line was: "##contig=<ID=2,length=242193529>"
[E::get_intv] Failed to parse TBX_VCF, was wrong -p [type] used?
The offending line was: "##contig=<ID=3,length=198295559>"
[E::get_intv] Failed to parse TBX_VCF, was wrong -p [type] used?
The offending line was: "##contig=<ID=4,length=190214555>"
I don't know what this means and how to solve the problem. Can anybody help me? Thank you in advance.
Thank you! That was helpful, and I didn't encounter any issues with the command:
However, when merging two VCFs—one with 2000 SNPs and the other with 1200— I ended up with a merged VCF containing only 1100 SNPs. Ideally, I'd like to generate a VCF with 2000 SNPs or more, with all the variants in the two vcfs.
your command crashed or you have duplicates in your vcfs