Entering edit mode
4.4 years ago
brismiller
▴
60
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
duplicate:Sequence length from Fasta ; How to count the length of fasta sequences? : ....
Thanks for that Pierre, I just found out that I could cut samtools fai f1 and f2 to get what I want.