cascade: Get expression peak cascade of genes along a lineage.

cascadeR Documentation

Get expression peak cascade of genes along a lineage.

Description

Finds and orders genes peaking in expression along a lineage. The function first assesses which genes increase significantly in expression, somewhere along a lineage, by testing pointwise first-derivatives against a threshold. For genes found to be significantly increasing, we look for its expression peak.

Usage

cascade(models, ...)

## S4 method for signature 'SingleCellExperiment'
cascade(
  models,
  lineage = 1,
  genes = rownames(models),
  epsilon = 1e-06,
  nPoints = 100,
  derivativeThreshold = 0.1,
  derPvalThreshold = 0.05/nPoints,
  plotHeatmap = TRUE,
  clusterHeatmap = FALSE
)

Arguments

models

The fitted GAMs. A SingleCellExperiment object as obtained from running fitGAM.

...

parameters including:

lineage

A positive integer, defining the lineage you would like to construct the cascade for. Defaults to 1.

genes

A character vector listing the genes from models for which you would like to construct the cascade. Defaults to all genes present in models.

epsilon

The distortion used for finite differencing. Defaults to 1e-6.

nPoints

The first derivatives are constructed pointwise on an equally-spaced grid. The nPoints argument defines the number of points for grid construction. Defaults to 100.

derivativeThreshold

The first derivative threshold tested against when calculating test statistics for assessing significant increase. Defaults to 0.1.

derPvalThreshold

The p-value threshold used for determining significance of the first derivative test statistic. Defaults to 0.05/nPoints.

plotHeatmap

Logical. Should a heatmap be plotted? Defaults to TRUE.

clusterHeatmap

Logical. Should the heatmap cluster the genes? Defaults to FALSE.

Details

First derivatives are estimated using finite differencing.

Value

Only the genes with a significant expression increase will be returned. For these genes, a list is returned

Examples

set.seed(8)
data(crv, package="tradeSeq")
data(countMatrix, package="tradeSeq")
sce <- fitGAM(counts = as.matrix(countMatrix),
                  sds = crv,
                  nknots = 5)
# construct cascalde for lineage 1
cas <- cascade(sce)

statOmics/tradeSeq documentation built on Jan. 19, 2024, 8:26 p.m.