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

Sambamba view -F missing '*' character #327

Closed cshneider-zz closed 3 years ago

cshneider-zz commented 6 years ago

Dear sambamba developers,

Am using sambamba 0.6.6. Am trying sambamba view -F "cigar != '*'" file.bam but cigar strings equal to '' still make it past this filter. I've tried various ways to pick up the '':

sambamba view -F "cigar != '*'" file.bam sambamba view -F "cigar == ''" file.bam sambamba view -F "cigar != '\*'" file.bam sambamba view -F "cigar =~ /^\/" file.bam

but these haven't worked.

sambamba view -F "cigar =~ //" file.bam gives the error: sambamba-view: '', '+', '?', '{', '}' not allowed in atom

sambamba view -F "cigar == '101M49S'" file.bam 17:977-987 | cut -f6 | sort | uniq returns 101M49S as expected.

I haven't included my user specific file.bam as I think this is a more general question.

Thanks for your assistance! Carl

pjotrp commented 3 years ago

No activity