This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Chromosome sizes downloading (in bp).

Hi! From where can I download human and mouse chromosomes sizes (whole genome at once) in base pairs? I need this in file for example .tsv or similar which could I load into python. Can someone give me tips or link?

Appreciate the help!

chromosome sizes

1 answer

The UCSC Kent Utilities fetchChromSizes tool can be used here.

If you just need sizes of nuclear chromosomes (i.e., no pseudo-chromosomes):

$ fetchChromSizes hg38 | grep -v '_*_' > hg38.chromSizes

If you need a BED file for set operations:

$ fetchChromSizes hg38 | grep -v '_*_' | awk -v FS="\t" -v OFS="\t" '{ print $1, "0", $2 }' | sort-bed - > hg38.bed

Replace hg38 with your assembly of interest.

Log in to answer this question.