geneCascadeProcess: Gene Cascade: Fit expression of genes

Description Usage Arguments Details Value

View source: R/gene-cascade.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 fits either a linear, single sigmoid, or double sigmoid ("impulse") model to describe the expression of each gene. The results are returned for use in geneCascadeImpulsePlots to visualize the fits or geneCascadeHeatmap to plot gene expression cascades in heatmap format.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
geneCascadeProcess(
  object,
  pseudotime,
  cells,
  genes,
  moving.window = 3,
  cells.per.window = NULL,
  pseudotime.per.window = NULL,
  scale.data = T,
  k = 50,
  pt.windows = NULL,
  interpolate = NULL,
  pulse.only = T,
  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

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)

scale.data

(Logical) If TRUE, fit impulse model to gene expression that has been scaled to its maximum expression in the chosen cells, otherwise fit to the original data.

k

(Numeric) Number of sets of initial conditions to try for fitting expression of each gene

pt.windows

(List or NULL) Cells that belong to each pseudotime window – if NULL will determine automatically, or provide a list of character vectors of cell ids.

interpolate

(Numeric or NULL) If low number of data points, can interpolate them linearly to this number of points for choosing potential starting conditions. Default (NULL) does not do any interpolation. Interpolation is NOT used during actual function fitting.

pulse.only

(Logical) If TRUE, filters out double sigmoid functions that are monotonous and prefers either single sigmoid or linear fit for them instead.

verbose

(Logical) Print major status updates?

verbose.genes

(Logical) Report fitting of each gene?

Details

Thanks to Yiqun Wang for considerable improvements to the impulse fitting functions.

Value

Named list: "pt.windows" ; "mean.expression" Mean expression of each gene in each pseudotime window; "scaled.expression" Scaled mean expression of each gene in each pseudotime window, if scale.data=T, otherwise same as mean.expression; "impulse.fits" List of fit parameters for each gene; "timing" (data.frame) of earliest onset time and latest offset time for each gene.

(Named List):


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