add_empirical_pval_fdr | R Documentation |
add_empirical_pval_fdr
Add empirical p-values and adjusted p-values to the DE output of Muscat. Credits to Jeroen Gillis (cf satuRn package)
add_empirical_pval_fdr(de_output_tidy, plot = FALSE)
de_output_tidy |
Data frame of DE results, containing at least the following columns: cluster_id, contrast, p_val, logFC. |
plot |
TRUE or FALSE (default): should we plot the z-score distribution? |
de_output_tidy dataframe with two columns added: p_emp and p_adj_emp.
## 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" covariates = NA contrasts_oi = c("'High-Low','Low-High'") senders_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique() receivers_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique() celltype_de = perform_muscat_de_analysis( sce = sce, sample_id = sample_id, celltype_id = celltype_id, group_id = group_id, covariates = covariates, contrasts = contrasts_oi) de_output_tidy = muscat::resDS(celltype_de$sce, celltype_de$de_output, bind = "row", cpm = FALSE, frq = FALSE) %>% tibble::as_tibble() de_output_tidy = add_empirical_pval_fdr(de_output_tidy) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.