What is the difference between mpileup samtools and bcftools?
1
4
Entering edit mode
4.8 years ago
beausoleilmo ▴ 600

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?

bcftools samtools mpileup variant calling SNP • 13k views
ADD COMMENT
1
Entering edit mode

as far as I understood the bcftools mpileup is the more recent replacement for samtools mpileup ? (but do correct me if I'm wrong)

ADD REPLY
0
Entering edit mode

That's what I think too, but I was trying to look into the bcftools manual and it still refers to samtools mpileup

VARIANT CALLING See bcftools call for variant calling from the output of the samtools mpileup command. In versions of samtools <= 0.1.19 calling was done with bcftools view. Users are now required to choose between the old samtools calling model (-c/--consensus-caller) and the new multiallelic calling model (-m/--multiallelic-caller). The multiallelic calling model is recommended for most tasks.

And it's not that clear for the comparison:

Generate VCF or BCF containing genotype likelihoods for one or multiple alignment (BAM or CRAM) files. This is based on the original samtools mpileup command (with the -v or -g options) producing genotype likelihoods in VCF or BCF format, but not the textual pileup output. The mpileup command was transferred to bcftools in order to avoid errors resulting from use of incompatible versions of samtools and bcftools when using in the mpileup+bcftools call pipeline.

Is that true for ONLY the -v and -g options? or it's the same?

ADD REPLY
11
Entering edit mode
4.8 years ago
jkbonfield ★ 1.3k

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.

ADD COMMENT

Login before adding your answer.

Traffic: 1571 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6