Linux获取fasta格式的序列长度
2022-01-25 本文已影响0人
煮梦斋_bioinfo
txt情况
awk '/^>/{if (l!="") print l; print; l=0; next}{l+=length($0)}END{print l}' XXX.txt
fasta情况
awk '/^>/{if (l!="") print l; print; l=0; next}{l+=length($0)}END{print l}' XXX.fasta
txt情况
awk '/^>/{if (l!="") print l; print; l=0; next}{l+=length($0)}END{print l}' XXX.txt
fasta情况
awk '/^>/{if (l!="") print l; print; l=0; next}{l+=length($0)}END{print l}' XXX.fasta