Signac (version 0.2.4)

RegionStats: Compute base composition information for genomic ranges

Description

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

Usage

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

Run this code
# NOT RUN {
library(BSgenome.Hsapiens.UCSC.hg19)
RegionStats(object = rownames(atac_small), genome = BSgenome.Hsapiens.UCSC.hg19, sep = c(":", "-"))
# }
# NOT RUN {
library(BSgenome.Hsapiens.UCSC.hg19)
RegionStats(object = atac_small[['peaks']], genome = BSgenome.Hsapiens.UCSC.hg19, sep = c(":", "-"))
# }
# NOT RUN {
library(BSgenome.Hsapiens.UCSC.hg19)
RegionStats(
  object = atac_small,
  assay = 'bins',
  genome = BSgenome.Hsapiens.UCSC.hg19
)
# }

Run the code above in your browser using DataLab