This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bioawk for identifiers that don't match pattern

Hi, I tried using bioawk as follows

bioawk -c fastx '$name !/P/ { print ">"$name; print $seq }' < mat.fasta
bioawk -c fastx '$name ! /P/ { print ">"$name; print $seq }' < mat.fasta

but it says

bioawk: syntax error at source line 1
 context is
    $name >>>  !/ <<<
bioawk: bailing out at source line 1

Could someone tell me what silly error I'm doing? Thanks

bioawk

Thanks! Worked perfectly!

1 answer

(not tested) try

!($name ~ /P/ )

Log in to answer this question.