Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

fast rename fasta header

# Rename all the header in a FASTA file with a sequential posix (e.g., Seq_1, Seq_2, ...)
awk '/^>/{print ">Seq_" ++i; next}{print}' input.fasta > output.fasta
# Or with in-place edit with moreutils sponge
awk '/^>/{print ">Seq_" ++i; next}{print}' input.fasta | sponge input.fasta
 
PREVIOUS NEXT
Tagged: #fast #rename #fasta #header
ADD COMMENT
Topic
Name
2+1 =