MeDuSA: MeDuSA: mixed model-based deconvolution of cell-state...

View source: R/MeDuSA.R

MeDuSAR Documentation

MeDuSA: mixed model-based deconvolution of cell-state abundance.

Description

MeDuSA is a cellular deconvolution method that leverages scRNA-seq data as a reference to estimate cell-state abundance in bulk RNA-seq data.

Usage

MeDuSA(
  bulk,
  sce,
  select.ct = NULL,
  resolution = 50,
  fixCov = NULL,
  adj = TRUE,
  markerGene = NULL,
  nbins = 10,
  knots = 10,
  method = "wilcox",
  family = "gaussian",
  geneNumber = 200,
  CAR = FALSE,
  phi = c(0.2, 0.4, 0.6, 0.9),
  ncpu = 1,
  start = c(1e-05, 0.01),
  maxiter = 10000,
  smooth = TRUE,
  smoothMethod = "loess",
  span = 0.35,
  neighbor = 5,
  fractional = FALSE
)

Arguments

bulk

A matrix of bulk RNA-seq data. Each row corresponds to a specific gene and each column corresponds to a particular sample.

sce

A seurat object of the reference scRNA-seq data (see seurat). Meta-data of the seurat object (sce@meta.data) need include two columns named as cell_type and cell_trajectory.

select.ct

A character variable of the target cell type.

resolution

A numeric variable to determine the number of cell bins along the cell trajectory (i.e., the resolution of the deconvolution analysis). The default value is 50.

fixCov

A matrix (vector) of fixed covariates in the model (i.e., covariates for estimating cell-state abundance). The default value is NULL.

adj

A Boolean variable to determine whether to include covariates when predicting the cell-state abundance.

markerGene

A character vector of marker genes over the cell-state trajectory. The default value is NULL. With default, MeDuSA selects genes using the gam-wald or wilcox test.

nbins

A numeric variable to determine the number of bins along the cell trajectory, which is used to ensure the selected genes were uniformly scattered along the given trajectory. The default value is 10.

knots

A numeric variable to specify the number of knots. The default value is 10.

method

A character variable to specify the method used in selecting marker genes (wilcox or gam).Default by wilcox.

family

A character variable to specify the distribution of gam See family.mgcv for a full list of what is available.

geneNumber

A numeric variable to determine the number of signature genes. The default value is 200.

CAR

A Boolean variable to determine whether to model abundance correlations among cells.

phi

A numeric vector for searching the optimal cell correlations. The default value is c(0.2,0.4,0.6,0.9)

ncpu

The number of cpu cores to be used.

start

A numeric vector for the initial value of the REML. Default by c(1e-5,1e-2).

maxiter

The iteration number of REML. Default by 1e+4.

smooth

A Boolean variable to determine whether to smooth the predicted cell-state abundance or not. The default value is TRUE.

smoothMethod

A character variable to determine the smoothing method. The default method is loess.

span

A numeric variable to control the degree of smoothing loess.

neighbor

A numeric variable to determine the number of neighboring cells used in smoothing (do not used when the smooth method is loess).

fractional

A Boolean variable to determine whether to normalize the estimated cell-state abundance to the fractional abundance (0-1).Default by FALSE.

Value

MeDuSA returns:

  • MeDuSA_Object: The MeDuSA object.

  • MeDuSA_Object@Estimation$cell_state_abundance: A matrix of cell-state abundance. Each row corresponds to a cell-state bin and each column corresponds to a bulk sample.

  • MeDuSA_Object@Estimation$markerGene: A character vector of the used marker genes.

  • MeDuSA_Object@Estimation$TimeBin: A numeric vector of the median pseudo-time for each cell-state bin.

Author(s)

Liyang Song <songliyang@westlake.edu.cn>

Examples

see: https://github.com/LeonSong1995/MeDuSA

LeonSong1995/MLM documentation built on March 13, 2024, 1:21 p.m.