Question: Generating Pileup With Max Depth Greater Than 8000?
gravatar for Lauren Oldfield
5.2 years ago by
Lauren Oldfield10 wrote:
My question: How can I generate a pileup with an output of more than 8000 hits per base? I was generating pileups using the SAM tools --> Generate pileup and do not see an option to change the settings for output. In mpileup there is a variable that looks correct, -D (Output per-sample read depth) , but I cannot figure out how to adjust it. I checked the box, Output per-sample read depth, under the advanced settings but the log file generated still says the max depth was 8000. The pileup files I generated look great but I would like to know what the true read depth is at the 8000 hit plateaus. Any help appreciated. I'm a little out of my depth here. -- Lauren M. Oldfield Hatfull Laboratory Dept. of Biological Sciences University of Pittsburgh 376 Crawford Hall 4249 Fifth Ave Pittsburgh, PA 15260 412-624-6976
mpileup • 6.3k views
ADD COMMENTlink modified 5.2 years ago by Peter Cock1.4k • written 5.2 years ago by Lauren Oldfield10
gravatar for Peter Cock
5.2 years ago by
Peter Cock1.4k
European Union
Peter Cock1.4k wrote:
Hi Lauren, Unfortunately this is a samtools design choice, 8000 is the coverage limit hard coded in the source code itself (see files bam_pileup.c and bam_plcmd.c), so at the very minimum it would mean manually editing the samtools source and recompiling samtools. It would be best to ask about this on the samtools-help mailing list (CC'd), as it may be more complicated than just editing a few lines of the C code. For the samtools folk - could this magic limit of 8000 be done via a #define to make it clearer this is a special constant, and give people just one place to change the code? Ha ha, good pun. Peter
ADD COMMENTlink written 5.2 years ago by Peter Cock1.4k
Hi Lauren, You could try to apply the following patch which sets the limit from 8.000 to 1.000.000: Index: bam2depth.c =================================================================== +++ bam2depth.c (working copy) @@ -80,6 +80,7 @@ // the core multi-pileup loop mplp = bam_mplp_init(n, read_bam, (void**)data); // initialization + bam_mplp_set_maxcnt(mplp,1000000); // set maxdepth to 1M n_plp = calloc(n, sizeof(int)); // n_plp[i] is the number of covering reads from the i-th BAM plp = calloc(n, sizeof(void*)); // plp[i] points to the array of covering reads (internal in mplp) while (bam_mplp_auto(mplp, &tid, &pos, n_plp, plp) > 0) { // come to the next covered position Best -Dominique
ADD REPLYlink written 5.2 years ago by Dominique Belhachemi10
Please log in to add an answer.


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