This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Length of scaffolds in a FASTA file

Hello everyone,

A simple question, but I have not found a clear answer anywhere else. It seems very simple to do.

I try to calculate the size of a genome scaffolds using simple bash commands. For example the first Scaffold:

head -2 genome.faa | tail -1 | wc -c

And whatever the row, characters are grouped by row of 81 (except headers).

Would anybody know how to calculate the length of the full scaffold?

Furthermore, I have figured out how to use a while loop to analyze all the scaffolds one after the other (using the headers list as input). But is there anything more simple than this?

Edit: spelling mistake in header.

fasta genome bash scaffold

1 answer

Sequence length from Fasta

Log in to answer this question.