fx_calcDEcombn: Internal fx to calculate DE between combinations of clusters

View source: R/deTest.R

fx_calcDEcombnR Documentation

Internal fx to calculate DE between combinations of clusters

Description

Internal function. See CalcDEcombn.

Usage

fx_calcDEcombn(nge, cl, deMes)

Arguments

nge

The log-normalized gene expression matrix.

cl

The factor with cluster assignments per cell (column of nge).

deMes

The output from fx_calcEScombn.

Details

Calculates Wilcoxon rank-sum tests for all genes in each of the potential combinations of clusters to compare.

Value

Differential testing results from Wilcoxon rank sum tests comparing a gene in each cluster to that gene in every other cluster in a series of tests. The results are stored as a nested list of dataframes. Each list element contains a named list of clusters (cluster A). Each of those lists contains a named list of all the other clusters (cluster B). Each of those list elements contains a dataframe of four variables, where each sample is a gene. dDR is the difference in detection rate of that gene between the two clusters (DR[A] - DR[B]). logGER is the log gene expression ratio calculated by taking the difference in mean expression of the gene (see meanLogX for mean calculation) between the two clusters (MGE[A] - MGE[B]). Wstat and pVal are the test statistic and the p-value of the Wilcoxon rank sum test. FDR is the false discovery rate-corrected p-value of the test.


BaderLab/scClustViz documentation built on Sept. 10, 2023, 11:51 p.m.