This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Re-naming some sequences header within the fasta file

Dear all,

I got a large fasta file with two types of header, the header name for some sequences is contig and for some of them is cx_gx_ix. I want to rename all headers named contig to another name say c_g_i. Please help me how I should do it?

assembly sequence

Thanks friend

sed 's/>.*/>c_g_i/g' filename.fasta

Try this

sed -i 's/^>contig/>c_g_i/g' file.fasta

0 answers

No answers yet.

Log in to answer this question.