I was looking into the samtools and bcftools variant callers. When I ran this
samtools mpileup -C 50 -E -t SP DP -u -I -f <ref.genome> -b <bam_list> > <output.bcf>
It told me that flags t, u and I were deprecated. So I thought that bcftools wast the new way to use the "mpileup" but I'm not sure if they are the same.
bcftools mpileup --threads 16 -C 50 -E -f <ref.genome> -b <bam_list> > <output.bcf>
In addition, I realized that the multithreaded flag in the bcftools if only to compress the file. The variant caller will still be single core.
But my question here is what are the differences between samtools mpileup and bcftools mpileup?
1 answer
Bcftools mpileup should be used instead of samtools mpileup for variant calling. That is, the VCF / BCF output mode of mpileup is better in bcftools.
Samtools mpileup however has two different formats with the default always being a simple columnar format showing chr, pos, reference, depth, base-calls and qualities. It's a simple parseable format used by some tools that has no attempt at variant calling.
Samtools has also supported for a long time VCF / BCF output (eg samtools mpileup -vu in.bam) which traditionally was the input to bcftools call. However this has been deprecated since samtools 1.9 (it's not even in the help message, although the option still works) and since then it now produces a warning message (although still works) if you attempt to use it to generate VCF:
[warning] samtools mpileup option `v` is functional, but deprecated. Please switch to using bcftools mpileup in future.
With the next release it'll probably be removed completely, leaving only the original basic text form.
Log in to answer this question.
as far as I understood the
bcftools mpileupis the more recent replacement forsamtools mpileup? (but do correct me if I'm wrong)That's what I think too, but I was trying to look into the bcftools manual and it still refers to samtools mpileup
And it's not that clear for the comparison:
Is that true for ONLY the -v and -g options? or it's the same?