Thanks for the fast response! It works perfectly :) and btw, what I will have to change in this command in order to print the sequences that has * in it.
• 0 views
•
link
Hi All,
I want to extract the sequences that don't have * (special character/stop codon) in it from a fasta file that I have . Is there any one liner or easy way to do that t'h the command line (mac os) or if anyone could redirect me to the similar post on this forum, that would be very helpful.
Thanks!!
linearize, grep, convert back to fasta:
awk '/^>/{printf("\n%s\t",$0);next;} {printf("%s",$0);} END {printf("\n");}' file.fa |\
awk -F '\t' '!($2 ~ /\*/)' |\
tr "\t" "\n"
Log in to answer this question.