brentp / mosdepth

fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fragment length filtering

LudvigOlsen opened this issue · comments

My colleagues and I often have to run multiple experiments on coverage within different fragment length ranges. To do this with mosdepth we currently have to subset the bam files first, for each experiment.

Considering how much easier it would be to have a fragment length filter in mosdepth instead, I would like to request this option (similar request to #122 ). It would likely be as simple as an extra if-statement in coverage() next to the mapq filter? I don't know nim though, otherwise I would have given it a try.

I would want two new flags: --min_length and --max_length (or similar), where you can supply one or both.

Thanks a lot for this great tool!