This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Fasta file modification

I'd like to add a short peptide to the C terminus of each protein (around 1000 in total) in the fasta file from Uniprot database. Could you give me some clues how to do that? Thank you so much!

sequence

2 answers

Try seqkit mutate.

$  echo -ne ">a\nATCG\n>b\ngcat\n"
>a
ATCG
>b
gcat

$ echo -ne ">a\nATCG\n>b\ngcat\n" | seqkit mutate -i -1:NNNN    
[INFO] edit seq: a
[INFO] edit seq: b
>a
ATCGNNNN
>b
gcatNNNN

linearize the fasta and add the suffix with sed 's/$/blablabal/'

Log in to answer this question.