R/differential.R
differential_edgeR_pseudobulk_LRT.Rd
Pseudo-bulk differential analysis with edgeR (LRT)
differential_edgeR_pseudobulk_LRT( object, by = "IDcluster", assay = "RNA", biological_replicate_col = NULL, logFC.th = log2(1.5), qval.th = 0.01, min.pct = 0.1 )
object | A Seurat 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. |
assay | Assay to use. |
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. |
A data.frame containing the results of the differential analysis
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()
See edgeR::glmLRT()
if(requireNamespace("Seurat", quietly=TRUE)){ data("Seu", package = "IDclust") DA <- differential_edgeR_pseudobulk_LRT(Seu) }