TSSEnrichment: Compute TSS enrichment score per cell

View source: R/region-enrichment.R

TSSEnrichmentR Documentation

Compute TSS enrichment score per cell

Description

Compute the transcription start site (TSS) enrichment score for each cell, as defined by ENCODE: https://www.encodeproject.org/data-standards/terms/.

Usage

TSSEnrichment(
  object,
  tss.positions = NULL,
  n = NULL,
  fast = TRUE,
  assay = NULL,
  cells = NULL,
  process_n = 2000,
  verbose = TRUE,
  region_extension = 1000
)

Arguments

object

A Seurat object

tss.positions

A GRanges object containing the TSS positions. If NULL, use the genomic annotations stored in the assay.

n

Number of TSS positions to use. This will select the first _n_ TSSs from the set. If NULL, use all TSSs (slower).

fast

Just compute the TSS enrichment score, without storing the base-resolution matrix of integration counts at each site. This reduces the memory required to store the object but does not allow plotting the accessibility profile at the TSS.

assay

Name of assay to use

cells

A vector of cells to include. If NULL (default), use all cells in the object

process_n

Number of regions to process at a time if using fast option.

verbose

Display messages

region_extension

Distance extended upstream and downstream from TSS in which to calculate enrichment and background.

Details

The computed score will be added to the object metadata as "TSS.enrichment".

Value

Returns a Seurat object

Examples

## Not run: 
fpath <- system.file("extdata", "fragments.tsv.gz", package="Signac")
Fragments(atac_small) <- CreateFragmentObject(
  path = fpath,
  cells = colnames(atac_small),
  tolerance = 0.5
)
TSSEnrichment(object = atac_small)

## End(Not run)

Signac documentation built on Sept. 11, 2024, 9:30 p.m.