get_FDR_empirical: Add empirical p-values and adjusted p-values to a subset of...

View source: R/muscat_de.R

get_FDR_empiricalR Documentation

Add empirical p-values and adjusted p-values to a subset of the DE output table.

Description

get_FDR_empirical Add empirical p-values and adjusted p-values to a subset of the DE output table. This is the function that works under the hood of 'add_empirical_pval_fdr'. Credits to Jeroen Gillis (cf satuRn package)

Usage

get_FDR_empirical(de_output_tidy, cluster_id_oi, contrast_oi, plot = FALSE)

Arguments

de_output_tidy

Data frame of DE results, containing at least the following columns: cluster_id, contrast, p_val, logFC.

cluster_id_oi

Indicate which celltype DE results should be filtered for.

contrast_oi

Indicate which contrast DE results should be filtered for.

plot

TRUE or FALSE (default): should we plot the z-score distribution?

Value

de_output_tidy dataframe (for the celltype and contrast of interest) with two columns added: p_emp and p_adj_emp.


saeyslab/multinichenetr documentation built on Jan. 15, 2025, 7:55 p.m.