Replacing usage of sambamba depth with mosdepth
Brent;
mosdepth looks awesome and we're looking into replacing depth calculation code in bcbio with it. As a first pass, we'd like to replace our usage of `sambamba depth` for QC and coverage calculations (and then hope to tackle goleft depth and other usage). This is work that @vladsaveliev did in bcbio so cc'ing him in for the discussion as well.

We use `sambamba depth` in two ways: calculation of average depth in regions and depth at thresholds. Standard mosdepth usage can replace the first and `--distribution` can replace the second. There are just a couple of usage differences I wanted to ask about:

- We currently limit depth calculations based on SAM flags, removing reads with unmapped, mate unmapped, not primary, failedQC and duplicate flags set. Is it possible to add this for restricting the mosdepth calculations?

- `sambamba depth` adds the BED name column, the 4th field, into the output. This is handy for aggregating depth calculations by gene names. Would it be possible to include that in the mosdepth output? Or would we be better doing this with some combination of `bedtools intersect` and awk magic coming out?

Thanks again for mosdepth; brilliant work.