I save this bit of code in a file called removesmalls
, made it executable chmod +x
#!/bin/awk -f
!/^>/ {next}
{getline s}
length(s) >= i { print $0 “\n” s }
and then i used it with the following command
awk removesmalls i=200 contigs.fa > contigs-l200.fa
Result :Now its generating the out put file also but without any data
Please help me out.
Hi, you can change the record separator
RS
into>
and turn your script into a short one-liner:If you want the minimum size to be an external variable, use the
-v
option:Thank you so much