geneSmoothFit: Gene Smooth: Fit expression of genes

Description Usage Arguments Value Examples

View source: R/gene-smooth.R

Description

This takes a group of genes and cells, averages gene expression in groups of cells (determined using a moving window through pseudotime), and then uses smoothing algorithms (e.g. LOESS or spline fitting) to describe the expression of each gene. The results are returned for use in plotSmoothFit to visualize the fits or several sets of results (e.g. from different trajectories) can be combined with cropSmoothFit and plotted with plotSmoothFitMultiCascade.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
geneSmoothFit(
  object,
  pseudotime,
  cells,
  genes,
  method = c("lowess", "spline"),
  moving.window = 3,
  cells.per.window = NULL,
  pseudotime.per.window = NULL,
  verbose = T,
  verbose.genes = F,
  ...
)

Arguments

object

An URD object

pseudotime

(Character) Name of pseudotime (i.e. a column name of @pseudotime)

cells

(Character vector) Cells to include

genes

(Character vector) Genes to include

method

(Character) Which smoothing method to use ("lowess" calls stats::lowess and "spline" calls stats::smooth.spline)

moving.window

(Numeric) Number of bins to use per window

cells.per.window

(Numeric or NULL) Size of bins (number of cells)

pseudotime.per.window

(Numeric or NULL) Size of bins (pseudotime)

verbose

(Logical) Display progress reports?

verbose.genes

(Logical) Display a message when starting each gene?

Value

(Named List):

Examples

1
2
3
4
5
6
7
# Fit a gene expression curve using "spline" method for
# genes "endo.genes" and cells in segments 47 and 46 in the tree.
tentacle.spline <- geneSmoothFit(urd.object, method = "spline", 
  pseudotime = "pseudotime", 
  cells = cellsInCluster(urd.object, "segment", c("47", "46")), 
  genes = endo.genes, moving.window = 1, cells.per.window = 5, spar = 0.9
)

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