Skip to contents

Read chromosome sizes from UCSC and return as a tibble with one row per chromosome. The underlying data is pulled from here: https://hgdownload.soe.ucsc.edu/downloads.html

Usage

read_ucsc_chrom_sizes(
  dir,
  genome = c("hg38", "mm39", "mm10", "mm9", "hg19"),
  keep_chromosomes = "chr[0-9]+|chrX|chrY",
  timeout = 300
)

Examples

read_ucsc_chrom_sizes("./reference")
#> # A tibble: 24 × 3
#>    chr   start       end
#>    <chr> <dbl>     <int>
#>  1 chr1      0 248956422
#>  2 chr2      0 242193529
#>  3 chr3      0 198295559
#>  4 chr4      0 190214555
#>  5 chr5      0 181538259
#>  6 chr6      0 170805979
#>  7 chr7      0 159345973
#>  8 chrX      0 156040895
#>  9 chr8      0 145138636
#> 10 chr9      0 138394717
#> # ℹ 14 more rows