Skip to contents

Plot fragment counts within a set of regions.

Usage

RegionPlot(
  object,
  idents = NULL,
  group.order = NULL,
  normalize = TRUE,
  upstream = NULL,
  downstream = NULL,
  window = (upstream + downstream)/500,
  nrow = NULL
)

Arguments

object

The output of RegionMatrix(): a list containing two elements:

  • matrix: a named list of region by position matrices, one for each group of cells, with the name of each element corresponding to the group identity.

  • parameters: a list of function parameters "upstream", "downstream" and "cells". Optionally, a list of such lists can be supplied for multi-assay plotting. In this case, the name of each element should correspond to the assay name.

idents

Cell identities to include. Note that cells cannot be regrouped, this will require re-running RegionMatrix() to generate a new set of matrices

group.order

Order of groups to be shown in the plot. This should be a character vector. If NULL, the group order will not be changed.

normalize

Normalize by number of cells in each group

upstream

Number of bases to include upstream of region. If NULL, use all bases that were included in the RegionMatrix function call. Note that this value cannot be larger than the value for upstream given in the original RegionMatrix function call. If NULL, use parameters that were given in the RegionMatrix function call

downstream

Number of bases to include downstream of region. See documentation for upstream

window

Smoothing window to apply

nrow

Number of rows to use when creating plot. If NULL, chosen automatically by ggplot2

Value

Returns a ggplot2 object

See also

RegionMatrix