Hi, I am trying to delete the NCBI accession numbers from the sequence ids in a fasta file.
Sequences ids look like:
>Elytraria_mexicana_JQ691768.1
I am trying things like
sed 's/_*.*//' myfile.fasta
or
sed 's/_*.*//g' myfile.fasta
They don't work.
Have any of you done this before?
Thanks for any input,
I would try simply
sed 's/_[A-Z].[0-9]*.[0-9]//g'
myfile.fastaYou're using
.
as both a metacharacter and a literal.
. Are you sure it will work reliably and the.
that is supposed to match the literal.
won't end up matching something else?yes I agree Ram, Here
.
may match anything. to make it more reliable we can use\.
instead. ThanksThanks!! It works!!
just cut:
Thank you so much!!
This command works:
=D
Please stop adding answers. This content belongs as a reply to my comment. I'm moving it to a comment on the top level post now.