Replace fasta ID with value from TSV file (sed with special characters)
Command:
sed -i "s/^>.*$/>$fastaid/g" output.fasta
The desired output is to replace the entire fasta ID with everything stored in the variable $fastaid.
Problem is that $fastaid looks like 12456789.AB.25/12/21 and it throws errors due to the special characters of . and /
How can I amend the sed command to accommodate special characters?
If there is an awk alternative that would be good as well.
• 1,384 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Two cents: Please do not use
iwhen you are testing or not sure.