Skip to contents

Wrapper to run chromVAR::chromVAR() on an assay with a motif object present. Will return a new Seurat assay with the motif activities (the deviations in chromatin accessibility across the set of regions) as a new assay.

Usage

RunChromVAR(object, ...)

# S3 method for class 'GRangesAssay'
RunChromVAR(
  object,
  genome,
  layer = NULL,
  motif.matrix = NULL,
  verbose = TRUE,
  ...
)

# S3 method for class 'Seurat'
RunChromVAR(
  object,
  genome,
  motif.matrix = NULL,
  assay = NULL,
  layer = NULL,
  new.assay.name = "chromvar",
  ...
)

Arguments

object

A Seurat object

...

Additional arguments passed to chromVAR::getBackgroundPeaks()

genome

A BSgenome object or string stating the genome build recognized by getBSgenome.

layer

Name of layer to use. If NULL, use the default layer.

motif.matrix

A peak x motif matrix. If NULL, pull the peak x motif matrix from a Motif object stored in the assay.

verbose

Display messages

assay

Name of assay to use. If NULL, use the default assay.

new.assay.name

Name of new assay used to store the chromVAR results. Default is "chromvar".

Value

Returns a SeuratObject::Seurat() object with a new assay

Details

See the chromVAR documentation for more information: https://greenleaflab.github.io/chromVAR/index.html

See the chromVAR paper: https://www.nature.com/articles/nmeth.4401

Examples

if (FALSE) { # \dontrun{
library(BSgenome.Hsapiens.UCSC.hg19)
RunChromVAR(
  object = atac_small[["peaks"]],
  genome = BSgenome.Hsapiens.UCSC.hg19
)
} # }
if (FALSE) { # \dontrun{
library(BSgenome.Hsapiens.UCSC.hg19)
RunChromVAR(object = atac_small, genome = BSgenome.Hsapiens.UCSC.hg19)
} # }