plotSCEDensity: Density plot of any data stored in the SingleCellExperiment...

Description Usage Arguments Value Examples

View source: R/ggPlotting.R

Description

Visualizes values stored in any slot of a SingleCellExperiment object via a densityn plot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
plotSCEDensity(
  inSCE,
  slot,
  annotation,
  sample = NULL,
  useAssay = "counts",
  feature = NULL,
  groupBy = NULL,
  xlab = NULL,
  ylab = NULL,
  axisSize = 10,
  axisLabelSize = 10,
  defaultTheme = TRUE,
  title = NULL,
  titleSize = 18,
  cutoff = NULL,
  combinePlot = "none",
  plotLabels = NULL
)

Arguments

inSCE

Input SingleCellExperiment object with saved dimension reduction components or a variable with saved results. Required

slot

Desired slot of SingleCellExperiment used for plotting. Possible options: "assays", "colData", "metadata"

annotation

Desired vector within the slot used for plotting.

sample

Character vector. Indicates which sample each cell belongs to.

useAssay

Indicate which assay to use. Default "counts".

feature

name of feature stored in assay of SingleCellExperiment object. Will be used only if "assays" slot is chosen. Default NULL.

groupBy

Groupings for each numeric value. A user may input a vector equal length to the number of the samples in the SingleCellExperiment object, or can be retrieved from the colData slot. Default NULL.

xlab

Character vector. Label for x-axis. Default NULL.

ylab

Character vector. Label for y-axis. Default NULL.

axisSize

Size of x/y-axis ticks. Default 10.

axisLabelSize

Size of x/y-axis labels. Default 10.

defaultTheme

Removes grid in plot and sets axis title size to 10 when TRUE. Default TRUE.

title

Title of plot. Default NULL.

titleSize

Size of title of plot. Default 15.

cutoff

Numeric value. The plot will be annotated with a vertical line if set. Default NULL.

combinePlot

Must be either "all", "sample", or "none". "all" will combine all plots into a single .ggplot object, while "sample" will output a list of plots separated by sample. Default "none".

plotLabels

labels to each plot. If set to "default", will use the name of the samples as the labels. If set to "none", no label will be plotted.

Value

a ggplot object of the density plot.

Examples

1
2
3
4
plotSCEDensity(
  inSCE = mouseBrainSubsetSCE, slot = "assays",
  annotation = "counts", feature = "Apoe", groupBy = "sex"
)

singleCellTK documentation built on Nov. 8, 2020, 5:21 p.m.