Feature request: filter by readgroup
Many groups are now doing eWGS, where an exome and whole-genome are created from different libraries, but sequenced together (with different indices). They're generally aligned together into one bam/cram, since we want all the possible depth for making variant calls.

The problem is, that in order to do WGS copy number calling, we generally have to make a separate bam of just the WGS data. If mosdepth supported extracting only certain readgroups, that would save a lot of time. (or if it supported streamed input somehow, so that we could filter on the fly).

Undoubtedly, this would slow things down during that use case, because you'd have to decode those fields, but should still result in a substantial overall speed-up for eWGS workflows that now have to create a new bam