📜  快速重命名 fasta 标头 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:13.382000             🧑  作者: Mango

代码示例1
# 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