This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to change the prefix name of query ID in the blastx results file (tabular format)?

Hi everybody,

I have a blastx result in a text file (tabular format), the query ID name (column 1) is like below:

CA100
CB180
CC200
CE400
Contig230

I want to change their prefix into "seq" to have the names as

seq100
seq180
seq200
seq400
seq230

Could you please help me out to do this?

Thanks in advance

blast alignment

1 answer

This might work:

sed 's/^[A-Z]*[a-z]*/seq/' inFile > outFile

Might not be a very sensible thing to do if some query IDs become identical because of this, but whatever..

Thanks friend.

Log in to answer this question.