Signac (version 0.2.4)

TSSPlot: Plot the enrichment around TSS

Description

Plot the normalized TSS enrichment score at each position relative to the TSS. Requires that TSSEnrichment has already been run on the assay.

Usage

TSSPlot(object, assay = NULL, group.by = NULL, idents = NULL)

Arguments

object

A Seurat object

assay

Name of the assay to use. Should have the TSS enrichment information for each cell already computed by running TSSEnrichment

group.by

Set of identities to group cells by

idents

Set of identities to include in the plot

Value

Returns a ggplot2 object

Examples

Run this code
# NOT RUN {
# create granges object with TSS positions
library(EnsDb.Hsapiens.v75)
gene.ranges <- genes(EnsDb.Hsapiens.v75)
gene.ranges <- gene.ranges[gene.ranges$gene_biotype == 'protein_coding', ]
tss.ranges <- GRanges(
  seqnames = seqnames(gene.ranges),
  ranges = IRanges(start = start(gene.ranges), width = 2),
  strand = strand(gene.ranges)
)
seqlevelsStyle(tss.ranges) <- 'UCSC'
tss.ranges <- keepStandardChromosomes(tss.ranges, pruning.mode = 'coarse')

# to save time use the first 2000 TSSs
atac_small <- TSSEnrichment(object = atac_small, tss.positions = tss.ranges[1:2000])
TSSPlot(atac_small)
# }

Run the code above in your browser using DataLab