get_genome: Get genome

View source: R/get_genome.R

get_genomeR Documentation

Get genome

Description

Get a genome (or a subset of chromosomes from a genome) as a GRanges object. This can be useful for querying whole-chromosomes at a time.

Usage

get_genome(
  keep.chr = paste0("chr", c(seq_len(22), "X", "Y")),
  genome = "hg19",
  sort = TRUE,
  style = "UCSC",
  split_chromosomes = FALSE
)

Arguments

keep.chr

is a character vector stating the names of the chromosomes to keep. Any chromosome not in the vector will be filtered out. If keep.chr is supplied, organism and chr.type are ignored.

genome

The genome object or genome identifier.

sort

Whether to sort the GRanges by chromosomes.

style

Chromosome style, set by seqlevelsStyle.

  • "UCSC" : Uses the chromosome style "chr1".

  • "NCBI" : Uses the chromosome style "1"

split_chromosomes

Whether to split the GRanges by chromosome (as a named list).

Value

GRanges

Examples

gr <- get_genome(keep.chr=1:2)

neurogenomics/PeakyFinders documentation built on March 24, 2024, 4:28 p.m.