How To Switch From Samtools Pileup To Mpileup
1
0
Entering edit mode
12.0 years ago
groundcover ▴ 10

Specifically I want to run this command:

samtools pileup -f parent1.fa.msg update_reads-aligned-parent1.bam.sorted.bam -c > update_reads-aligned-parent1.pileup

But everything I'm reading, I can't find the -c option for mpileup? Am I just out of luck?

pileup mpileup samtools • 4.4k views
ADD COMMENT
1
Entering edit mode
12.0 years ago
Rlong ▴ 340

From the mpileup page:

samtools mpileup -uf ref.fa aln1.bam aln2.bam | bcftools view -bvcg - > var.raw.bcf

The -c in the bcftools view command calls SNPs.

ADD COMMENT
0
Entering edit mode

Ok, I see that now. So I guess I'll get the same output format but better quality and faster? Well, I'll just test it and see.

ADD REPLY
0
Entering edit mode

This isn't working at all. I'm getting some kind of binary file as output instead of the pileup file. Also the new file is 16KB instead of 3MB as the old one was.

It really sucks they'd deprecate something and not give users a clear path on what the replacement is.

ADD REPLY
0
Entering edit mode

The "b" in the -bvcg causes bcftools to output bcf instead of vcf. You can omit the "b" or use bcftools view your_file_name_here to see the contents in plain text.

ADD REPLY

Login before adding your answer.

Traffic: 2700 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