differential_edgeR_pseudobulk_LRT.default: Pseudo-bulk differential analysis with edgeR (LRT)

View source: R/differential.R

differential_edgeR_pseudobulk_LRT.defaultR Documentation

Pseudo-bulk differential analysis with edgeR (LRT)

Description

Pseudo-bulk differential analysis with edgeR (LRT)

Usage

## Default S3 method:
differential_edgeR_pseudobulk_LRT(
  object,
  by = "IDcluster",
  biological_replicate_col = NULL,
  logFC.th = log2(2),
  qval.th = 0.01,
  min.pct = 0.2
)

Arguments

object

A SingleCellExperiment object containing scRNA dataset with a metadata column name matching the by parameter

by

A character specifying the name of the metadata column referencing the clusters.

biological_replicate_col

A character specifying the column of the object metadata definin the biological / technical replicates. If NULL, three random set of replicates will be created per cluster, provided there are enough cells.

logFC.th

A numeric specifying the log2 fold change of activation above/below which a feature is considered as significantly differential.

qval.th

A numeric specifying the adjusted p-value below which a feature is considered as significantly differential.

min.pct

Minimum percentage of cells to be active in the cells of the cluster to consider a feature as potentially significantly differential.

Details

Concatenate single-cells into replicates by cluster in order to create a 'pseudo-bulk' matrice of multiple replicates per cluster. If no replicates are present, will assign replicates at random to create 3 replicates per cluster. Conducts 'LRT' (likelihood ratio tests) edgeR tests to test. See edgeR::glmLRT()

Value

A data.frame containing the results of the differential analysis

See Also

See edgeR::glmLRT()

Examples

if(requireNamespace("Seurat", quietly=TRUE)){
data("Seu", package = "IDclust")
DA <- differential_edgeR_pseudobulk_LRT(Seu)
}

vallotlab/IDclust documentation built on July 5, 2024, 3:26 p.m.