biod / sambamba

Tools for working with SAM/BAM data
http://thebird.nl/blog/D_Dragon.html
GNU General Public License v2.0
558 stars 104 forks source link

Negative pattern matching syntax for filters #409

Closed rikrdo89 closed 4 years ago

rikrdo89 commented 4 years ago

Hi, you provided an example using pattern matching for the "read_name" field (see below). is there support for negative (inverse) pattern matching? e.g. using the example below, what would be the syntax if I want all the reads that do not match /^ERR/ in "read_name" ?

sambamba view -F "read_name =~ /^ERR/" HG01375.mapped.ILLUMINA.bwa.CLM.low_coverage.20120522_chr1.bam

rikrdo89 commented 4 years ago

I think I just figured this out... just surround the full condition by "not ( )"