Return the genomic positions of the "CG" dinucleotide for the specified BSgenome and chromosomes, located directly with Biostrings.

getCGPositions(BSgenome, chr.select)

Arguments

BSgenome

Character(1). BSgenome package name.

chr.select

Character vector of chromosome names to include (e.g., paste0("chr", 1:22)). If NULL, the standard chromosomes of the BSgenome are used – not every seqlevel. Scaffolds, patches and alt haplotypes are excluded, because scanning all 298 hg19 seqlevels costs ~22 s and ~1.3 GB for positions no read maps to.

Value

A GRanges-class of motif positions.

Examples

# Requires a BSgenome package
# if (requireNamespace("BSgenome.Hsapiens.NCBI.GRCh38", quietly = TRUE)) {
#   getCGPositions("BSgenome.Hsapiens.NCBI.GRCh38", chr.select = "22")
# }