View source: R/pipeline_wrappers.R
get_empirical_pvals | R Documentation |
get_empirical_pvals
Calculate empirical p-values based on a DE output. Show p-value distribution histograms. Under the hood, the following functions are used: 'add_empirical_pval_fdr' and 'get_FDR_empirical_plots_all'
get_empirical_pvals(de_output_tidy)
de_output_tidy |
Differential expression analysis output for the sender cell types. 'de_output_tidy' slot of the output of 'perform_muscat_de_analysis'. |
'de_output_tidy', but now 2 columns added with the empirical pvalues (normal and adjusted for multiple testing); Histogram plot of the empirical p-values is also returned.
## Not run:
library(dplyr)
lr_network = readRDS(url("https://zenodo.org/record/3260758/files/lr_network.rds"))
lr_network = lr_network %>% dplyr::rename(ligand = from, receptor = to) %>% dplyr::distinct(ligand, receptor)
sample_id = "tumor"
group_id = "pEMT"
celltype_id = "celltype"
batches = NA
contrasts_oi = c("'High-Low','Low-High'")
senders_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique()
receivers_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique()
DE_info = get_DE_info(
sce = sce,
sample_id = sample_id,
celltype_id = celltype_id,
group_id = group_id,
batches = batches,
contrasts = contrasts_oi)
DE_info_emp = get_empirical_pvals(DE_info$celltype_de$de_output_tidy)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.