I'm trying to filter out from a bam file all the reads aligned to human and with a mapping quality above 30. To do so I wrote: sambamba view -f bam -F "not (ref_name =~ /chr*/ and mapping_quality >= 30)" file.bam.
The not key word seems to apply to both ref_name AND mapping quality separately and not to the combination of both because when I try not (ref_name =~ /chr*/ and mapping_quality >= 0 I end up with no reads. Is there a way to have the not applied to the 2 conditions in the same time as I want to remove the reads mapped to chr* with a mapping quality greater than a threshold?
Hi,
I'm trying to filter out from a bam file all the reads aligned to human and with a mapping quality above 30. To do so I wrote:
sambamba view -f bam -F "not (ref_name =~ /chr*/ and mapping_quality >= 30)" file.bam
. Thenot
key word seems to apply to both ref_name AND mapping quality separately and not to the combination of both because when I trynot (ref_name =~ /chr*/ and mapping_quality >= 0
I end up with no reads. Is there a way to have thenot
applied to the 2 conditions in the same time as I want to remove the reads mapped tochr*
with a mapping quality greater than a threshold?Thanks, Paul