I was wondering whether there is a possibility to read only alignments from a BAM file passing a certain mapq threshold. I searched for it but didn't find anything obvious. Currently I'm using the
filterBam function to save only the high quality alignments to another BAM file, but that is quite time and disk-space consuming.
If there is no easy way, might that be something that could be added to the
ScanBamParam? Something like a mapping quality filter?