plotGeneCount: Plot gene expression in reduced dimension.

plotGeneCountR Documentation

Plot gene expression in reduced dimension.

Description

Plot the gene in reduced dimensional space.

Usage

plotGeneCount(curve, ...)

## S4 method for signature 'SlingshotDataSet'
plotGeneCount(
  curve,
  counts = NULL,
  gene = NULL,
  clusters = NULL,
  models = NULL,
  title = NULL
)

## S4 method for signature 'SingleCellExperiment'
plotGeneCount(
  curve,
  counts = NULL,
  gene = NULL,
  clusters = NULL,
  models = NULL,
  title = NULL
)

Arguments

curve

One of two

  • A SlingshotDataSet object. The output from trajectory inference using Slingshot.

  • A SingleCellExperiment object. The output from trajectory inference using Slingshot.

...

parameters including:

counts

The count matrix, genes in rows and cells in columns. Only needed if the input is of the type SlingshotDataSet and the gene argument is not NULL.

gene

The name of gene for which you want to plot the count or the row number of that gene in the count matrix. Alternatively, one can specify the clusters argument.

clusters

The assignation of each cell to a cluster. Used to color the plot. Either clusters or gene and counts must be supplied.

models

The fitted GAMs, typically the output from fitGAM. Used to display the knots.

title

Title for the plot.

Details

If both gene and clusters arguments are supplied, the plot will be colored according to gene count level. If none are provided, the function will fail.

Value

A ggplot object

Examples

set.seed(97)
library(slingshot)
data(crv, package="traviz")
data(counts, package="traviz")
plotGeneCount(crv, counts, gene = "Mpo")

koenvandenberge/traviz documentation built on Oct. 30, 2024, 8:27 p.m.