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

Hey all,

I am trying to make a .size file that lists the length of each chromosome from a genome file (e.g. fasta file)

Here is an example of the desired output:

chr1    248956422
chr10   133797422
chr11   135086622
chr12   133275309
chr13   114364328
chr14   107043718
chr15   101991189
chr16   90338345
chr17   83257441
chr18   80373285
chr19   58617616

...

I am currently writing a script that uses awk '{ print length }' but I am wondering if there is a tool available so that I don't have to reinvent the wheel?

Thanks in advance

chromosome genome

Thanks for that Pierre, I just found out that I could cut samtools fai f1 and f2 to get what I want.

0 answers

No answers yet.

Log in to answer this question.