Compute the GC content, region lengths, and dinucleotide base frequencies for regions in the assay and add to the feature metadata.

RegionStats(object, ...)

# S3 method for default
RegionStats(object, genome, sep = c("-", "-"), verbose = TRUE, ...)

# S3 method for Assay
RegionStats(object, genome, sep = c("-", "-"), verbose = TRUE, ...)

# S3 method for Seurat
RegionStats(
  object,
  genome,
  assay = NULL,
  sep = c("-", "-"),
  verbose = TRUE,
  ...
)

Arguments

object

A Seurat object, Assay object, or set of genomic ranges

...

Arguments passed to other methods

genome

A BSgenome object

sep

A length-2 character vector containing the separators to be used when constructing genomic coordinates from the regions. The first element is used to separate the chromosome from the genomic coordinates, and the second element used to separate the start and end coordinates.

verbose

Display messages

assay

Name of assay to use

Value

Returns a dataframe

Examples

if (FALSE) { library(BSgenome.Hsapiens.UCSC.hg19) RegionStats( object = rownames(atac_small), genome = BSgenome.Hsapiens.UCSC.hg19, sep = c(":", "-") ) } if (FALSE) { library(BSgenome.Hsapiens.UCSC.hg19) RegionStats( object = atac_small[['peaks']], genome = BSgenome.Hsapiens.UCSC.hg19, sep = c(":", "-") ) } if (FALSE) { library(BSgenome.Hsapiens.UCSC.hg19) RegionStats( object = atac_small, assay = 'bins', genome = BSgenome.Hsapiens.UCSC.hg19 ) }