Pairwise-DEGs: Find Differentially Expressed Genes between Clusters

scDEGR Documentation

Find Differentially Expressed Genes between Clusters

Description

This is the basic function in RISC, it can identify the differentially expressed genes (DEGs) by comparing samples between the selected clusters. The criteria used for the cluster markers are also appropriate to DEGs.

Usage

scDEG(
  object,
  cell.ctrl = NULL,
  cell.sam = NULL,
  frac = 0.1,
  log2FC = 0.5,
  Padj = 0.01,
  latent.factor = NULL,
  method = "NB",
  min.cells = 10,
  ncore = 1
)

Arguments

object

RISC object: a framework dataset.

cell.ctrl

Select the cells as the reference cells for detecting DEGs.

cell.sam

Select the cells as the sample cells for detecting DEGs.

frac

A fraction cutoff, the cluster marker genes expressed at least a cutoff fraction of the cluster cells.

log2FC

The cutoff of log2 Fold-change for differentially expressed marker genes.

Padj

The cutoff of the adjusted P-value. If Padj is NULL, use p-value < 0.05 as a threshold. Set Padj as 1, without any cutoff.

latent.factor

The latent factor from coldata, which represents number values or factors, and only one latent factor can be inputed.

method

Which method is used to identify cluster markers, two options: 'NB' for Negative Binomial model, 'QP' for QuasiPoisson model, and 'wil' for Wilcoxon Rank-Sum model.

min.cells

The minimum cells for each cluster to calculate marker genes.

ncore

The multiple cores for parallel calculating.

Details

Here RISC provides two algorithms to detect DEGs, the primary one is a model "Quasi-Poisson" which has advantage to identify DEGs from the cluster with a small number of cells. Meanwhile, RISC also has alternative algorithm: "Negative Binomial" model.

Because log2 cannot handle counts with value 0, we use log1p to calculate average values of counts and log2 to format fold-change.

References

Paternoster et al., Criminology (1997)

Berk et al., Journal of Quantitative Criminology (2008)

Liu et al., Nature Biotech. (2021)

Examples

# RISC object
obj0 = raw.mat[[4]]
obj0 = scPCA(obj0, npc = 10)
obj0 = scUMAP(obj0, npc = 3)
obj0 = scCluster(obj0, slot = "cell.umap", k = 3, method = 'density')
DimPlot(obj0, slot = "cell.umap", colFactor = 'Cluster', size = 2)
cell.ctrl = rownames(obj0@coldata)[obj0@coldata$Cluster == 1]
cell.sam = rownames(obj0@coldata)[obj0@coldata$Cluster == 3]
DEG0 = scDEG(obj0, cell.ctrl = cell.ctrl, cell.sam = cell.sam, 
             min.cells = 3, method = 'QP')

bioinfoDZ/RISC documentation built on March 30, 2024, 9:19 p.m.