make_windows | R Documentation |
Make windows with the size of window_size
along genome. Must provide
genome
so that intervals are restricted by chromosome sizes.
make_windows(window_size, genome, chrom = NULL)
window_size |
An integer value. Size of the windows in base pairs. |
genome |
Provide the genome identifier, e.g. |
chrom |
A character vector. If provided, only generate windows for the specified chromosome(s). |
A GRanges
object containing the generated windows.
# Generate 500kbp intervals for chr20 and chr22, GRCh38 result <- make_windows(window_size = 500e3L, genome = "GRCh38", chrom = c("20", "22")) head(result) # Generate 5Mbp intervals for all chromosomes of GRCh37 (default reference genome) result <- make_windows(window_size = 5e6L, genome = "GRCh37") head(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.