plotCurve: Plot the Fitted Model (Gene Trajectory)

View source: R/plotCurve.R

plotCurveR Documentation

Plot the Fitted Model (Gene Trajectory)

Description

Plot the fitted curve (gene trajectory) by a given gam model.

Usage

plotCurve(
  gene.vec,
  ori.tbl,
  mat,
  assay.use = "counts",
  model.fit,
  alpha = 0.2,
  ncol = 2,
  seurat.assay = "RNA"
)

Arguments

gene.vec

A vector of genes. It should be a subset of the row names in sce.

ori.tbl

A tibble or dataframe which contains the original cells and pseudotime as two columns.

mat

The input expression data. It can be: (1) A SingleCellExperment object which contain the expression data; (2) An matrix; (3) A Seurat object which contain the expression data. Its row names should be genes and col names should be cells.

assay.use

The assay used in SingleCellExperiment or slot used in Seurat. Default is counts.

model.fit

A list of fitted gam models corresponding to genes in gene.vec.

alpha

A numeric value of the opacity of points. Default is 0.2.

ncol

A integer of facet column number. Default is 2.

seurat.assay

The assay used in Seurat. Default is 'RNA'.

Value

A ggplot object

Author(s)

Dongyuan Song, Shiyu Ma


SONGDONGYUAN1994/PseudotimeDE documentation built on Nov. 2, 2024, 7:55 p.m.