Tool:mosdepth: fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing
1
6
Entering edit mode
6.2 years ago
brentp 24k

mosdepth is a command-line tool for fast depth calculation. Because of the underlying algorithm it is possible to build a lot of features around the calculation. For example, once depth is calculated for every base in a chromosome, mosdepth can calculate the mean coverage in each of 100K intervals in about 1 additional second total. There are a number of additional features such that, for the most part, users can get all depth information out of a BAM/CRAM in a single pass.

You can read about it here in the bioinformatics app note.

and get the code and binary on github here

The github page describes the options and usage in more detail.

depth-of-coverage exome WGS • 5.0k views
ADD COMMENT
1
Entering edit mode

First link is not working right (fast.bam).

ADD REPLY
0
Entering edit mode

fixed. thanks.

ADD REPLY
0
Entering edit mode
6.2 years ago
ATpoint 81k

The speed is really impressive. Do you plan to add features that allow normalization and direct output in bigwig format? Both can of course be done manually but especially for larger files, an in-built option would raise the impact of mosdepth notably, beyond its improved speed.

ADD COMMENT
0
Entering edit mode

I see the utility of this, but I don't have any plans to do it. It would require wrapping Devon's libBigWig and then adding an additional option to output that instead of BED. I don't think this would make it too much faster--maybe a few percent if the user chose to output per-base depth.

ADD REPLY
0
Entering edit mode

Ok I see. As an alternative, an option to send the bedgraph to STDOUT might be beneficial, so custom modifications with awk on $4 can be performed on the fly. Is that possible based on the current design?

ADD REPLY
0
Entering edit mode

that was the original design, but now it outputs to a file. that file is bgzipped and indexed on-the-fly so it gives similar utility to bigwig.

ADD REPLY

Login before adding your answer.

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