Question: Difference between samtools DEPTH and MPILEUP
gravatar for ariel.balter
17 months ago by
ariel.balter130 wrote:

I'm going to leave this here in case it is helpful, or someone has more up-to-date information to add. But I just did some smarter googling and found some similar questions with answers:
Should Samtools Pileup Be Performed On Uniquely Mapped Reads Or All The Reads?
Genomic Coverage - Samtool's undocumented "depth" verses the poorly documented pileup.
Discrepancy In Samtools Mpileup/Depth And Bedtools Genomecoveragebed Counts

Original Question
I'm doing ChIP-Seq analysis and want the read depth at each and every genome position aligned in a set of bam files, includign 0s for positions covered in one bam file but not another. Totally raw-no score filtering. Both depth and mpileup accept a list of bam files.


Computes the depth at each position or region. a -a, -aa: Output absolutely all positions, including unused reference sequences


In the pileup format (without -u or -g), each line represents a genomic position, consisting of chromosome name, 1-based coordinate, reference base, the number of reads covering the site

It sounds like both sort of do what I'm looking for. But I'm a fairly green bioinformaticist, and I don't know if I'm missing something in the difference between "number of reads covering the site" (mpileup) and "depth" (depth). The mpileup docs go into a lot more details about the output format.

It seems like mpileup has more options and offers more detail than depth. For my purposes, is there a difference in 1) function or 2) performance?

ADD COMMENTlink modified 17 months ago by Devon Ryan76k • written 17 months ago by ariel.balter130
gravatar for Devon Ryan
17 months ago by
Devon Ryan76k
Freiburg, Germany
Devon Ryan76k wrote:

If you just want the depth, then use samtools depth with the appropriate settings for no filtering (note that this will double count overlapping paired-end reads if you really do set -q to 0). Internally, depth and mpileup are using most of the same functions, it's mostly just a matter of what they output.

ADD COMMENTlink written 17 months ago by Devon Ryan76k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1323 users visited in the last hour