plotSmoothFit: Gene Smooth: Plot a single fit

Description Usage Arguments Value Examples

View source: R/gene-smooth.R

Description

This plots gene expression in groups of cells and a curve representing its mean expression (generated using a smoothing algorithm). It takes output from either geneSmoothFit or geneCascadeProcess. (Output from geneCascadeProcess may also be plotted with geneCascadeImpulsePlots.) If multiple genes are provided, they are plotted on the same plot in different colors if multiplot=F or as a grid of plots per gene if multiplot=T.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotSmoothFit(
  smoothed.fit,
  genes,
  scaled = T,
  multiplot = F,
  plot.data = T,
  alpha.data = 0.2,
  alpha.smooth = 1,
  lwd.smooth = 1,
  plot.title = NULL
)

Arguments

smoothed.fit

(List) Output from either geneSmoothFit or geneCascadeProcess

genes

(Character vector) Genes to include in the plot

scaled

(Logical) Plot actual expression values (FALSE) or expression scaled to its maximum value (TRUE)

multiplot

(Logical) If multiple genes are provided, they are plotted on the same plot in different colors if multiplot=F or as a grid of plots per gene if multiplot=T

plot.data

(Logical) Plot data points?

alpha.data

(Numeric: 0-1) Transparency of data points

alpha.smooth

(Numeric: 0-1) Transparency of curve

lwd.smooth

(Numeric) Line width of curve

plot.title

(Character) Title of plot (Default NULL is no title)

Value

A ggplot2 object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Calculate spline fit
expressed.spline <- geneSmoothFit(hydra.spumous, method = "spline", 
  pseudotime = "pseudotime", cells = colnames(hydra.spumous@logupx.data),
  genes = expressed.genes, moving.window = 1, cells.per.window = 5, 
  spar = 0.875
)
# Plot a few genes on the fit curves
genes.spline.plot <- c("t14194aep|WNT3_MOUSE", "t15597aep|WNT1_DANRE",
  "t20768aep|BRAC_CANLF", "t29725aep|BRAC_CHICK", "t22116aep|ETV1_MOUSE"
)
plotSmoothFit(expressed.spline, genes = genes.spline.plot, scaled = T)

farrellja/URD documentation built on June 17, 2020, 4:48 a.m.