Dear RamRS, thank you introducing "bioawk" to me!. It looks like very useful for my project
Adding special character in fasta headers
Dear all,
I want to add a special character "/1" to eacf of fasta header (at the end of fasta header) in a 8.5 GB fasta file. I used following command;
perl -p -e 's/^(>.*)$/$1-New_Header_info/g' input.fasta > output.fasta
This code is ok when we put any character in place of "New_Header_info", unfortunately when I typing "/1", i could not get the result.
Is there any solution for this ?
Thanks for all reply,
• 4,122 views
•
link
2 answers
Pretty sure bioawk can help you :)
bioawk -c fastx '{ print $name"\1\n"$seq; }' <inFile.fasta
If you face an error with \1, try \\1 - this is just in case awk recognizes \1 as a capture pattern - this may also be the reason you face the problem in your code.
• 0 views
•
link
• 0 views
•
link
You're welcome. It changed my life too :)
• 0 views
•
link
Log in to answer this question.