plotSmoothers: Plot the log-transformed counts and the fitted values for a...

Description Usage Arguments Value Examples

Description

Plot the smoothers estimated by tradeSeq.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
plotSmoothers(models, ...)

## S4 method for signature 'gam'
plotSmoothers(
  models,
  nPoints = 100,
  lwd = 2,
  size = 2/3,
  xlab = "Pseudotime",
  ylab = "Log(expression + 1)",
  border = TRUE,
  alpha = 1,
  sample = 1
)

## S4 method for signature 'SingleCellExperiment'
plotSmoothers(
  models,
  counts,
  gene,
  nPoints = 100,
  lwd = 2,
  size = 2/3,
  xlab = "Pseudotime",
  ylab = "Log(expression + 1)",
  border = TRUE,
  alpha = 1,
  sample = 1,
  pointCol = NULL,
  plotLineages = TRUE
)

Arguments

models

Either the SingleCellExperiment object obtained after running fitGAM, or the specific GAM model for the corresponding gene, if working with the list output of tradeSeq.

...

parameters including:

nPoints

The number of points used to extrapolate the fit. Defaults to 100.

lwd

Line width of the smoother. Passed to geom_line.

size

Character expansion of the data points. Passed to geom_point.

xlab

x-axis label. Passed to labs.

ylab

y-axis label. Passed to labs.

border

Logical: should a white border be drawn around the mean smoother.

alpha

Numeric between 0 and 1, determines the transparency of data points, see scale_color_viridis_d.

sample

Numeric between 0 and 1, use to subsample the cells when there are too many so that it can plot faster.

counts

The matrix of gene expression counts.

gene

Gene name or row in count matrix of gene to plot.

pointCol

Plotting colors for each cell. Can be either character vector of length 1, denoting a variable in the colData(models) to color cells by, or a vector of length equal to the number of cells.

plotLineages

Logical, should the mean smoothers for each lineage be plotted?

Value

A ggplot object

Examples

1
2
data(gamList, package = "tradeSeq")
plotSmoothers(gamList[[4]])

tradeSeq documentation built on Nov. 8, 2020, 7:51 p.m.