I have a fasta file started by
I want a fasta which is a one line character string; just keep the nucleotides characters like
Basically I should remove anything that is not T, C, G, A or N. After replacing any such characters with "N"
I have tried this but gives an empty file
cat input_fasta.fa | sed -r 's/[RYKMSWBVHD]/N/g' > output_fasta.fa
Can you help me?
Thank you so much