| Title: | Enrichment Analysis for Cell Death Pathways |
|---|---|
| Description: | Provides a curated collection of gene sets for major cell death modalities, together with tools for over-representation analysis, gene set enrichment analysis, single-sample gene set enrichment analysis, differential pathway analysis, and visualization. |
| Authors: | Yushan Chen [aut, cre] |
| Maintainer: | Yushan Chen <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.99.1 |
| Built: | 2026-10-13 11:14:37 UTC |
| Source: | https://github.com/BiocStaging/CDEnrich |
Curated cell death pathway gene sets collected from published
literature, GeneCards and pathway databases. This is the underlying
table loaded by load_cell_death_genes.
data(cd_Genesets)data(cd_Genesets)
A data frame with two columns:
Pathway (gene set) name, e.g.
Ferroptosis_FerrDb V2(36305834).
Gene symbol belonging to the pathway.
Curated from public cell death literature and databases;
see data-raw/ for the construction scripts.
Small simulated datasets used in CDEnrich examples and vignettes.
The ORA and ssGSEA datasets are built from the recommended Ferroptosis
gene set (FerrDb V2, PMID: 36305834), and the GSEA datasets from the
representative Apoptosis gene set (PMID: 37968457). Background genes
are synthetic placeholders (BackgroundGene_1 ... BackgroundGene_3000).
All datasets are generated by data-raw/demo_data.R with a fixed
random seed and are fully reproducible.
This help page is an overview of the demonstration datasets shipped with CDEnrich; see the individual dataset pages for details.
Data objects used by CDEnrich to provide curated cell death pathway gene sets and representative pathway recommendations.
cd_Genesets: curated cell death gene sets.
representative_genes: representative gene sets
for the 13 cell death types with curated recommendations.
representative_pathways: metadata for the
representative pathway recommendations.
This help page is an overview of the curated datasets shipped with CDEnrich; see the linked pages for each dataset.
Perform multi-group over-representation analysis (ORA) to compare cell death pathway enrichment across multiple gene lists. Support two modes:
Global mode: all groups vs all cell death pathways
Targeted mode: all groups vs one specific pathway
celldeath_compare_enrich( deg_list_list, term_select = NULL, use_recommended = TRUE, universe = NULL, pvalueCutoff = 1, qvalueCutoff = 1, minGSSize = 3, savefile = FALSE, filename = "celldeath_compareORA_result.csv" )celldeath_compare_enrich( deg_list_list, term_select = NULL, use_recommended = TRUE, universe = NULL, pvalueCutoff = 1, qvalueCutoff = 1, minGSSize = 3, savefile = FALSE, filename = "celldeath_compareORA_result.csv" )
deg_list_list |
A named list of gene vectors, where each element corresponds to a group of differentially expressed genes (gene symbols). |
term_select |
Character. Either an exact gene set name
(e.g. "Disulfidptosis_Up_36747082") used directly, or a cell death
type name (e.g. "Disulfidptosis"): for the 13 types with curated
recommendations, the recommended representative gene set is used
automatically (see |
use_recommended |
Logical. Only takes effect when |
universe |
Character vector of background genes. Default NULL uses all genes in the curated cell death collection. For formal analysis, pass all genes detected in your experiment (e.g. all expressed genes). |
pvalueCutoff |
P-value cutoff for significance (default: 0.05). |
qvalueCutoff |
Q-value cutoff for false positive control (default: 0.2). |
minGSSize |
Minimum gene set size to retain (default: 3). |
savefile |
Whether to save the results as a CSV file (default: FALSE) |
filename |
File name (default: "cell_death_ORA_result.csv") |
A compareClusterResult object for visualization.
Returns NULL if no significant pathways are identified.
group1 <- c("GPX4","ACSL4","SLC7A11","GSDMD") group2 <- c("BAX","CASP3","RIPK1","FDX1") deg_list <- list(Control = group1, Treatment = group2) # 1. Global mode: all groups vs all cell death pathways compare_res_all <- celldeath_compare_enrich(deg_list) # 2. Targeted mode by death type: use the recommended gene set (default) compare_res_rec <- celldeath_compare_enrich(deg_list, term_select = "Ferroptosis") # 3. Targeted mode by death type: run against ALL Ferroptosis gene sets compare_res_type <- celldeath_compare_enrich(deg_list, term_select = "Ferroptosis", use_recommended = FALSE) # 4. Targeted mode by exact gene set name compare_res_exact <- celldeath_compare_enrich(deg_list, term_select = "Disulfidptosis_Up_36747082")group1 <- c("GPX4","ACSL4","SLC7A11","GSDMD") group2 <- c("BAX","CASP3","RIPK1","FDX1") deg_list <- list(Control = group1, Treatment = group2) # 1. Global mode: all groups vs all cell death pathways compare_res_all <- celldeath_compare_enrich(deg_list) # 2. Targeted mode by death type: use the recommended gene set (default) compare_res_rec <- celldeath_compare_enrich(deg_list, term_select = "Ferroptosis") # 3. Targeted mode by death type: run against ALL Ferroptosis gene sets compare_res_type <- celldeath_compare_enrich(deg_list, term_select = "Ferroptosis", use_recommended = FALSE) # 4. Targeted mode by exact gene set name compare_res_exact <- celldeath_compare_enrich(deg_list, term_select = "Disulfidptosis_Up_36747082")
Perform Over-Representation Analysis (ORA) for a list of DEGs based on curated cell death gene sets. Support two modes:
Global mode: one group vs all cell death pathways
Targeted mode: one group vs one specific pathway
celldeath_enrich( deg, term_select = NULL, use_recommended = TRUE, universe = NULL, pvalueCutoff = 0.05, qvalueCutoff = 0.2, minGSSize = 3, savefile = FALSE, filename = "celldeath_ORA_result.csv" )celldeath_enrich( deg, term_select = NULL, use_recommended = TRUE, universe = NULL, pvalueCutoff = 0.05, qvalueCutoff = 0.2, minGSSize = 3, savefile = FALSE, filename = "celldeath_ORA_result.csv" )
deg |
A character vector of input genes (gene symbols) for enrichment analysis. |
term_select |
Character. Either an exact gene set name
(e.g. "Disulfidptosis_Up_36747082") used directly, or a cell death
type name (e.g. "Disulfidptosis"): for the 13 types with curated
recommendations, the recommended representative gene set is used
automatically (see |
use_recommended |
Logical. Only takes effect when |
universe |
Character vector of background genes. Default NULL uses all genes in the curated cell death collection. For formal analysis, pass all genes detected in your experiment (e.g. all expressed genes). |
pvalueCutoff |
P-value cutoff for significance (default: 0.05). |
qvalueCutoff |
Q-value cutoff for filtering false positives (default: 0.2). |
minGSSize |
Minimum gene set size to retain (default: 3). |
savefile |
Whether to save the results as a CSV file (default: FALSE) |
filename |
File name (default: "celldeath_ORA_result.csv") |
An enrichResult object for visualization and result export.
get_representative_pathway for recommendation details.
deg <- c("GPX4","ACSL4","SLC7A11","GSDMD","CASP3","BAX") # 1. Global ORA: vs all cell death pathways enrich_res <- celldeath_enrich(deg) # 2. Targeted ORA by death type: use the recommended gene set (default) enrich_res_rec <- celldeath_enrich(deg, term_select = "Ferroptosis") # 3. Targeted ORA by death type: run against ALL Ferroptosis gene sets enrich_res_all <- celldeath_enrich(deg, term_select = "Ferroptosis", use_recommended = FALSE) # 4. Targeted ORA by exact gene set name enrich_res_exact <- celldeath_enrich(deg, term_select = "Disulfidptosis_Up_36747082")deg <- c("GPX4","ACSL4","SLC7A11","GSDMD","CASP3","BAX") # 1. Global ORA: vs all cell death pathways enrich_res <- celldeath_enrich(deg) # 2. Targeted ORA by death type: use the recommended gene set (default) enrich_res_rec <- celldeath_enrich(deg, term_select = "Ferroptosis") # 3. Targeted ORA by death type: run against ALL Ferroptosis gene sets enrich_res_all <- celldeath_enrich(deg, term_select = "Ferroptosis", use_recommended = FALSE) # 4. Targeted ORA by exact gene set name enrich_res_exact <- celldeath_enrich(deg, term_select = "Disulfidptosis_Up_36747082")
This function performs GSEA using user-defined cell death gene sets. Support two modes:
Global mode: ranked gene list vs all cell death pathways
Targeted mode: ranked gene list vs one specific pathway
celldeath_gsea( geneList, term_select = NULL, use_recommended = TRUE, pvalueCutoff = 1, verbose = FALSE, savefile = FALSE, filename = "celldeath_gsea_result.csv" )celldeath_gsea( geneList, term_select = NULL, use_recommended = TRUE, pvalueCutoff = 1, verbose = FALSE, savefile = FALSE, filename = "celldeath_gsea_result.csv" )
geneList |
A named numeric vector, sorted descendingly. |
term_select |
Character. Either an exact gene set name
(e.g. "Disulfidptosis_Up_36747082") used directly, or a cell death
type name (e.g. "Disulfidptosis"): for the 13 types with curated
recommendations, the recommended representative gene set is used
automatically (see |
use_recommended |
Logical. Only takes effect when |
pvalueCutoff |
P-value cutoff. |
verbose |
Print messages. |
savefile |
Whether to save the results as a CSV file (default: FALSE) |
filename |
File name (default: "celldeath_gsea_result.csv") |
A gseaResult object.
get_representative_pathway for recommendation details.
# Prepare ranked gene vector (descending) gene_rank <- c(GPX4=2.5, ACSL4=2.2, SLC7A11=1.8, BAX=-1.2, CASP3=-1.9) # 1. Global GSEA: vs all cell death pathways gsea_all <- celldeath_gsea(gene_rank) # 2. Targeted GSEA by death type: use the recommended gene set (default) gsea_rec <- celldeath_gsea(gene_rank, term_select = "Ferroptosis") # 3. Targeted GSEA by death type: run against ALL Ferroptosis gene sets gsea_all_type <- celldeath_gsea(gene_rank, term_select = "Ferroptosis", use_recommended = FALSE) # 4. Targeted GSEA by exact gene set name gsea_exact <- celldeath_gsea(gene_rank, term_select = "Disulfidptosis_Up_36747082")# Prepare ranked gene vector (descending) gene_rank <- c(GPX4=2.5, ACSL4=2.2, SLC7A11=1.8, BAX=-1.2, CASP3=-1.9) # 1. Global GSEA: vs all cell death pathways gsea_all <- celldeath_gsea(gene_rank) # 2. Targeted GSEA by death type: use the recommended gene set (default) gsea_rec <- celldeath_gsea(gene_rank, term_select = "Ferroptosis") # 3. Targeted GSEA by death type: run against ALL Ferroptosis gene sets gsea_all_type <- celldeath_gsea(gene_rank, term_select = "Ferroptosis", use_recommended = FALSE) # 4. Targeted GSEA by exact gene set name gsea_exact <- celldeath_gsea(gene_rank, term_select = "Disulfidptosis_Up_36747082")
This function performs GSEA for multiple gene lists. Support two modes:
Global mode: all groups vs all cell death pathways
Targeted mode: all groups vs one specific pathway
celldeath_gsea_multiple( geneList_list, term_select = NULL, use_recommended = TRUE, pvalueCutoff = 1, verbose = FALSE, savefile = FALSE )celldeath_gsea_multiple( geneList_list, term_select = NULL, use_recommended = TRUE, pvalueCutoff = 1, verbose = FALSE, savefile = FALSE )
geneList_list |
A named list of numeric vectors, each vector is sorted descendingly. |
term_select |
Character. Either an exact gene set name
(e.g. "Disulfidptosis_Up_36747082") used directly, or a cell death
type name (e.g. "Disulfidptosis"): for the 13 types with curated
recommendations, the recommended representative gene set is used
automatically (see |
use_recommended |
Logical. Only takes effect when |
pvalueCutoff |
P-value cutoff. |
verbose |
Print messages. |
savefile |
Whether to save all results as CSV files (default: FALSE) |
A named list of gseaResult objects.
get_representative_pathway for recommendation details.
# Multi-group ranked list group1 <- c(GPX4=2.5, ACSL4=2.2, NUBPL=1.8, BAX=-1.2) group2 <- c(GSDMD=2.8, SLC3A2=2.0, GPX4=-1.5) gene_list <- list(Control = group1, Treatment = group2) # 1. Global mode: all pathways res_all <- celldeath_gsea_multiple(gene_list) # 2. Targeted mode by death type: use the recommended gene set (default) res_rec <- celldeath_gsea_multiple(gene_list, term_select = "Ferroptosis") # 3. Targeted mode by death type: run against ALL Ferroptosis gene sets res_all_type <- celldeath_gsea_multiple(gene_list, term_select = "Ferroptosis", use_recommended = FALSE) # 4. Targeted mode by exact gene set name res_exact <- celldeath_gsea_multiple(gene_list, term_select = "Disulfidptosis_Up_36747082")# Multi-group ranked list group1 <- c(GPX4=2.5, ACSL4=2.2, NUBPL=1.8, BAX=-1.2) group2 <- c(GSDMD=2.8, SLC3A2=2.0, GPX4=-1.5) gene_list <- list(Control = group1, Treatment = group2) # 1. Global mode: all pathways res_all <- celldeath_gsea_multiple(gene_list) # 2. Targeted mode by death type: use the recommended gene set (default) res_rec <- celldeath_gsea_multiple(gene_list, term_select = "Ferroptosis") # 3. Targeted mode by death type: run against ALL Ferroptosis gene sets res_all_type <- celldeath_gsea_multiple(gene_list, term_select = "Ferroptosis", use_recommended = FALSE) # 4. Targeted mode by exact gene set name res_exact <- celldeath_gsea_multiple(gene_list, term_select = "Disulfidptosis_Up_36747082")
Perform single-sample Gene Set Enrichment Analysis (ssGSEA) on an expression matrix based on curated cell death gene sets. Unlike ORA/GSEA, ssGSEA computes an enrichment score for each sample on each pathway, enabling sample-level comparison of cell death activity. Support two modes:
Global mode: expression matrix vs all cell death pathways
Targeted mode: expression matrix vs one specific pathway
celldeath_ssgsea( expr, group = NULL, term_select = NULL, use_recommended = TRUE, min_size = 3, normalize = TRUE, savefile = FALSE, filename = "celldeath_ssgsea_score.csv" )celldeath_ssgsea( expr, group = NULL, term_select = NULL, use_recommended = TRUE, min_size = 3, normalize = TRUE, savefile = FALSE, filename = "celldeath_ssgsea_score.csv" )
expr |
A numeric matrix or data.frame of expression values, with genes (gene symbols) as rows and samples as columns. |
group |
An optional character or factor vector of group labels,
with length equal to the number of samples (columns of |
term_select |
Character. Either an exact gene set name
(e.g. "Disulfidptosis_Up_36747082") used directly, or a cell death
type name (e.g. "Disulfidptosis"): for the 13 types with curated
recommendations, the recommended representative gene set is used
automatically (see |
use_recommended |
Logical. Only takes effect when |
min_size |
Minimum gene set size to retain (default: 3). |
normalize |
Logical. Whether to normalize ssGSEA scores by the difference between the maximum and minimum scores (default: TRUE). |
savefile |
Whether to save the results as a CSV file (default: FALSE) |
filename |
File name (default: "celldeath_ssgsea_score.csv") |
Multi-group comparison is supported via the group parameter.
All samples are scored together on the same expression background to
guarantee score comparability across groups.
A named list of class celldeath_ssgsea with two elements:
score: a numeric matrix of ssGSEA scores (pathways x samples);
group: a factor of sample group labels (NULL if not provided).
get_representative_pathway for recommendation details.
# expr: gene x sample expression matrix (rows = genes, columns = samples) gene_sets <- load_cell_death_genes() all_genes <- unique(unlist(gene_sets)) set.seed(123) expr <- matrix(rnorm(length(all_genes) * 10), nrow = length(all_genes), ncol = 10, dimnames = list(all_genes, paste0("Sample", 1:10))) group <- rep(c("Control", "Treatment"), each = 5) # 1. Global mode: all cell death pathways, no grouping ssgsea_res <- celldeath_ssgsea(expr) # 2. Multi-group mode: with group labels for downstream comparison ssgsea_res_group <- celldeath_ssgsea(expr, group = group) # 3. Targeted mode by death type: use the recommended gene set (default) ssgsea_ferro <- celldeath_ssgsea(expr, group = group, term_select = "Ferroptosis") # 4. Targeted mode by death type: score ALL Ferroptosis gene sets ssgsea_ferro_all <- celldeath_ssgsea(expr, group = group, term_select = "Ferroptosis", use_recommended = FALSE) # 5. Targeted mode by exact gene set name ssgsea_exact <- celldeath_ssgsea(expr, group = group, term_select = "Disulfidptosis_Up_36747082")# expr: gene x sample expression matrix (rows = genes, columns = samples) gene_sets <- load_cell_death_genes() all_genes <- unique(unlist(gene_sets)) set.seed(123) expr <- matrix(rnorm(length(all_genes) * 10), nrow = length(all_genes), ncol = 10, dimnames = list(all_genes, paste0("Sample", 1:10))) group <- rep(c("Control", "Treatment"), each = 5) # 1. Global mode: all cell death pathways, no grouping ssgsea_res <- celldeath_ssgsea(expr) # 2. Multi-group mode: with group labels for downstream comparison ssgsea_res_group <- celldeath_ssgsea(expr, group = group) # 3. Targeted mode by death type: use the recommended gene set (default) ssgsea_ferro <- celldeath_ssgsea(expr, group = group, term_select = "Ferroptosis") # 4. Targeted mode by death type: score ALL Ferroptosis gene sets ssgsea_ferro_all <- celldeath_ssgsea(expr, group = group, term_select = "Ferroptosis", use_recommended = FALSE) # 5. Targeted mode by exact gene set name ssgsea_exact <- celldeath_ssgsea(expr, group = group, term_select = "Disulfidptosis_Up_36747082")
Perform group-wise differential analysis on cell death pathway ssGSEA scores. Wilcoxon rank-sum test is used for two groups, and Kruskal-Wallis test for three or more groups.
celldeath_ssgsea_diff( ssgsea_result, pAdjustMethod = "BH", savefile = FALSE, filename = "celldeath_ssgsea_diff.csv" )celldeath_ssgsea_diff( ssgsea_result, pAdjustMethod = "BH", savefile = FALSE, filename = "celldeath_ssgsea_diff.csv" )
ssgsea_result |
A |
pAdjustMethod |
Multiple testing correction method passed to
|
savefile |
Whether to save the results as a CSV file (default: FALSE) |
filename |
File name (default: "celldeath_ssgsea_diff.csv") |
A data.frame with per-pathway statistics, sorted by p-value: pathway name, mean score per group, test statistic, p-value and adjusted p-value.
# expr: gene x sample expression matrix (rows = genes, columns = samples) gene_sets <- load_cell_death_genes() all_genes <- unique(unlist(gene_sets)) set.seed(123) expr <- matrix(rnorm(length(all_genes) * 10), nrow = length(all_genes), ncol = 10, dimnames = list(all_genes, paste0("Sample", 1:10))) group <- rep(c("Control", "Treatment"), each = 5) ssgsea_res <- celldeath_ssgsea(expr, group = group) diff_res <- celldeath_ssgsea_diff(ssgsea_res) head(diff_res)# expr: gene x sample expression matrix (rows = genes, columns = samples) gene_sets <- load_cell_death_genes() all_genes <- unique(unlist(gene_sets)) set.seed(123) expr <- matrix(rnorm(length(all_genes) * 10), nrow = length(all_genes), ncol = 10, dimnames = list(all_genes, paste0("Sample", 1:10))) group <- rep(c("Control", "Treatment"), each = 5) ssgsea_res <- celldeath_ssgsea(expr, group = group) diff_res <- celldeath_ssgsea_diff(ssgsea_res) head(diff_res)
A character vector combining the recommended Ferroptosis gene set with 3000 synthetic background genes. Used as the ORA background universe.
data(demo_all_genes)data(demo_all_genes)
A character vector of gene symbols.
Up to 100 real genes taken from the recommended Ferroptosis gene set, providing a strong and reproducible enrichment signal.
data(demo_deg)data(demo_deg)
A character vector of gene symbols.
A named list with two groups: Control (15 Ferroptosis genes) and Treatment (up to 100 Ferroptosis genes).
data(demo_deg_list)data(demo_deg_list)
A named list of two character vectors.
A numeric expression matrix with genes as rows and 12 samples as columns. Ferroptosis genes are shifted upwards in Treatment samples, creating higher Ferroptosis activity in that group.
data(demo_expr)data(demo_expr)
A numeric matrix (genes x samples).
A factor assigning the 12 samples of demo_expr to Control and
Treatment groups (6 samples each).
data(demo_group)data(demo_group)
A factor with two levels (Control, Treatment).
A decreasingly sorted named numeric vector. All genes from the representative Apoptosis gene set are assigned large positive ranking statistics, creating a clear enrichment signal.
data(demo_rank_apop)data(demo_rank_apop)
A decreasingly sorted named numeric vector.
A named list of two decreasingly sorted numeric vectors: Control has no
intentionally introduced signal, Treatment carries the same strong
Apoptosis signal as demo_rank_apop.
data(demo_rank_apop_list)data(demo_rank_apop_list)
A named list of two decreasingly sorted numeric vectors.
Identical to demo_deg; kept as a separate object so the targeted
ORA example reads as an independent workflow.
data(demo_targeted_deg)data(demo_targeted_deg)
A character vector of gene symbols.
Look up the curated recommendation for a cell death type that has multiple PMID-based gene sets. 13 of the cell death types in this package have a recommended representative gene set.
get_representative_pathway(death_type)get_representative_pathway(death_type)
death_type |
Character(1). A cell death type name, e.g. "Disulfidptosis". Matching is exact (case-sensitive). |
The lookup table can be overridden via
options(CDEnrich.representative_pathways = <data.frame>)
(mainly for testing); the override replaces the built-in table
completely for the duration it is set.
A one-row data.frame with the recommendation metadata (pathway name, PMID, source, etc.), or NULL if the death type has no recommendation.
get_representative_pathway("Disulfidptosis") get_representative_pathway("Mitosis") # returns NULLget_representative_pathway("Disulfidptosis") get_representative_pathway("Mitosis") # returns NULL
Load and prepare cell death pathway gene sets for ORA and GSEA analysis.
This function returns a gene list compatible with clusterProfiler functions.
The 13 recommended representative gene sets are automatically merged in
(see representative_pathways for their curation metadata).
load_cell_death_genes(.test_df = NULL, .test_rep = NULL)load_cell_death_genes(.test_df = NULL, .test_rep = NULL)
.test_df |
Internal parameter for unit testing. A data.frame with
|
.test_rep |
Internal parameter for unit testing. A named list of gene
vectors used in place of the built-in representative gene sets; when
provided together with |
A named list of gene vectors, each element representing a cell death pathway.
gene_sets <- load_cell_death_genes() length(gene_sets) names(gene_sets)gene_sets <- load_cell_death_genes() length(gene_sets) names(gene_sets)
Generate a dotplot for multi-group cell death pathway enrichment comparison. Support two analysis modes from celldeath_compare_enrich():
Global mode: all groups compare against all cell death pathways
Targeted mode: all groups compare against one single specified pathway
plot_death_compare_bubble( compare_res, show_category = 10, palette = c("#2E8B57", "#F39C12", "#E74C3C"), title = "Cell Death Pathway Enrichment (Multi-Group)", filename = NULL, return_data = FALSE )plot_death_compare_bubble( compare_res, show_category = 10, palette = c("#2E8B57", "#F39C12", "#E74C3C"), title = "Cell Death Pathway Enrichment (Multi-Group)", filename = NULL, return_data = FALSE )
compare_res |
A |
show_category |
Number of top pathways to display per group (sorted by p-value). |
palette |
Color palette for p.adjust (low to high). Default: c("#2E8B57", "#F39C12", "#E74C3C"). |
title |
Plot title. Default: "Cell Death Pathway Enrichment (Multi-Group)". |
filename |
If provided, save plot to file (e.g., "compare_bubble.png"). Default: NULL. |
return_data |
If TRUE, return the data frame used for plotting. Default: FALSE. |
A ggplot2 object (or data frame if return_data = TRUE).
data("demo_deg_list", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") compare_result <- celldeath_compare_enrich( deg_list_list = demo_deg_list, universe = demo_all_genes ) plot_death_compare_bubble( compare_result, show_category = 10 )data("demo_deg_list", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") compare_result <- celldeath_compare_enrich( deg_list_list = demo_deg_list, universe = demo_all_genes ) plot_death_compare_bubble( compare_result, show_category = 10 )
Generate a heatmap for multi-group cell death pathway enrichment comparison, showing -log10(p.adjust) for each pathway-group pair. Compatible with two analysis modes from celldeath_compare_enrich():
Global mode: all groups compare against all cell death pathways
Targeted mode: all groups compare against one single specified pathway
plot_death_compare_heatmap( compare_res, show_category = 10, palette = c("#2E8B57", "#F39C12", "#E74C3C"), title = "Cell Death Pathway Enrichment (Multi-Group Heatmap)", filename = NULL, return_data = FALSE )plot_death_compare_heatmap( compare_res, show_category = 10, palette = c("#2E8B57", "#F39C12", "#E74C3C"), title = "Cell Death Pathway Enrichment (Multi-Group Heatmap)", filename = NULL, return_data = FALSE )
compare_res |
A |
show_category |
Number of top pathways to display (selected by lowest p.adjust across groups). |
palette |
Color palette for fill (low to high). Default: c("#2E8B57", "#F39C12", "#E74C3C"). |
title |
Plot title. Default: "Cell Death Pathway Enrichment (Multi-Group Heatmap)". |
filename |
If provided, save plot to file (e.g., "compare_heatmap.png"). Default: NULL. |
return_data |
If TRUE, return the data frame used for plotting. Default: FALSE. |
A ggplot2 object (or data frame if return_data = TRUE).
data("demo_deg_list", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") compare_result <- celldeath_compare_enrich( deg_list_list = demo_deg_list, universe = demo_all_genes ) plot_death_compare_heatmap( compare_result, show_category = 10 )data("demo_deg_list", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") compare_result <- celldeath_compare_enrich( deg_list_list = demo_deg_list, universe = demo_all_genes ) plot_death_compare_heatmap( compare_result, show_category = 10 )
Generate a dotplot for single-group cell death pathway enrichment analysis. Automatically adapt for two modes:
Global mode: multiple pathways bubble plot
Targeted mode: single-pathway ORA plot layout adjustment
plot_death_enrich_bubble( enrich_res, show_category = 10, palette = c("#2E8B57", "#F39C12", "#E74C3C"), size_range = c(2, 8), title = "Cell Death Pathway Enrichment", filename = NULL, return_data = FALSE )plot_death_enrich_bubble( enrich_res, show_category = 10, palette = c("#2E8B57", "#F39C12", "#E74C3C"), size_range = c(2, 8), title = "Cell Death Pathway Enrichment", filename = NULL, return_data = FALSE )
enrich_res |
An |
show_category |
Number of top pathways to display (sorted by p-value). |
palette |
Color palette for p.adjust (low to high). Default: c("#2E8B57", "#F39C12", "#E74C3C"). |
size_range |
Range of point size (min, max). Default: c(2, 8). |
title |
Plot title. Default: "Cell Death Pathway Enrichment". |
filename |
If provided, save plot to file (e.g., "bubble.png"). Default: NULL. |
return_data |
If TRUE, return the data frame used for plotting. Default: FALSE. |
A ggplot2 object (or data frame if return_data = TRUE).
data("demo_deg", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ora_result <- celldeath_enrich( deg = demo_deg, universe = demo_all_genes ) plot_death_enrich_bubble( ora_result, show_category = 10 )data("demo_deg", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ora_result <- celldeath_enrich( deg = demo_deg, universe = demo_all_genes ) plot_death_enrich_bubble( ora_result, show_category = 10 )
Generate an enrichment network plot for single-group cell death pathway enrichment analysis. Automatically adapt two analysis modes from celldeath_enrich():
Global mode: multiple pathways, full gene overlap network with edges
Targeted mode: single specified pathway, simple single-node plot Nodes represent pathways, edges represent gene overlaps (similarity)(only for multi-pathway).
plot_death_enrich_network( enrich_res, show_category = 30, color = "p.adjust", filename = NULL, ... )plot_death_enrich_network( enrich_res, show_category = 30, color = "p.adjust", filename = NULL, ... )
enrich_res |
An |
show_category |
Number of top pathways to display (sorted by p-value). Default: 30. |
color |
Which variable to use for node color. Options: "p.adjust" (default), "pvalue", "qvalue", "Count", etc. |
filename |
If provided, save plot to file (e.g., "enrich_network.png"). Default: NULL. |
... |
Additional arguments passed to |
A ggplot2 object.
data("demo_deg", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ora_result <- celldeath_enrich( deg = demo_deg, universe = demo_all_genes ) plot_death_enrich_network( ora_result, show_category = 10 )data("demo_deg", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ora_result <- celldeath_enrich( deg = demo_deg, universe = demo_all_genes ) plot_death_enrich_network( ora_result, show_category = 10 )
Generate a compact summary plot for a targeted ORA result containing exactly one pathway. The bar shows the number of overlapping genes and the annotation reports GeneRatio, BgRatio, and adjusted P-value.
plot_death_enrich_targeted( enrich_res, color = "#F39C12", title = "Targeted Cell Death Pathway Enrichment", filename = NULL, return_data = FALSE )plot_death_enrich_targeted( enrich_res, color = "#F39C12", title = "Targeted Cell Death Pathway Enrichment", filename = NULL, return_data = FALSE )
enrich_res |
An |
color |
Bar color. Default: "#F39C12". |
title |
Plot title. Default: "Targeted Cell Death Pathway Enrichment". |
filename |
If provided, save plot to file. Default: NULL. |
return_data |
If TRUE, return the data frame used for plotting. Default: FALSE. |
A ggplot2 object (or data frame if return_data = TRUE).
data("demo_targeted_deg", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_pathways", package = "CDEnrich") ora_ferroptosis <- celldeath_enrich( deg = demo_targeted_deg, universe = demo_all_genes, term_select = "Ferroptosis" ) plot_death_enrich_targeted(ora_ferroptosis)data("demo_targeted_deg", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_pathways", package = "CDEnrich") ora_ferroptosis <- celldeath_enrich( deg = demo_targeted_deg, universe = demo_all_genes, term_select = "Ferroptosis" ) plot_death_enrich_targeted(ora_ferroptosis)
Generate standard three-panel GSEA enrichment plot for cell death pathway. Support both global multi-pathway mode and targeted single-pathway mode.
plot_death_gsea_curve(gsea_res, pathway, use_recommended = TRUE)plot_death_gsea_curve(gsea_res, pathway, use_recommended = TRUE)
gsea_res |
Result from |
pathway |
Character. Either an exact pathway ID present in the
result, or a cell death type name (e.g. "Ferroptosis"), which is
resolved to the recommended representative gene set when available
(see |
use_recommended |
Logical. Only takes effect when |
A ggplot2 object.
data("demo_rank_apop", package = "CDEnrich") data("representative_pathways", package = "CDEnrich") apoptosis_id <- get_representative_pathway("Apoptosis")$Pathway gsea_result <- celldeath_gsea( geneList = demo_rank_apop ) plot_death_gsea_curve( gsea_result, pathway = apoptosis_id )data("demo_rank_apop", package = "CDEnrich") data("representative_pathways", package = "CDEnrich") apoptosis_id <- get_representative_pathway("Apoptosis")$Pathway gsea_result <- celldeath_gsea( geneList = demo_rank_apop ) plot_death_gsea_curve( gsea_result, pathway = apoptosis_id )
Plot GSEA Curves for Multiple Group Cell Death Pathways
plot_death_gsea_curve_multiple( gsea_res_list, pathway, use_recommended = TRUE, filename_prefix = NULL, ... )plot_death_gsea_curve_multiple( gsea_res_list, pathway, use_recommended = TRUE, filename_prefix = NULL, ... )
gsea_res_list |
Named list of GSEA results from celldeath_gsea_multiple(). |
pathway |
Character. Either an exact pathway ID present in the
results, or a cell death type name (e.g. "Ferroptosis"), which is
resolved to the recommended representative gene set when available
(see |
use_recommended |
Logical. Only takes effect when |
filename_prefix |
If provided, save each plot as "prefix_groupname.png". Default: NULL. |
... |
Additional arguments passed to |
A named list of ggplot2 objects, each containing one GSEA curve.
data("demo_rank_apop_list", package = "CDEnrich") data("representative_pathways", package = "CDEnrich") apoptosis_id <- get_representative_pathway("Apoptosis")$Pathway gsea_groups <- celldeath_gsea_multiple( geneList_list = demo_rank_apop_list, pvalueCutoff = 1 ) curves <- plot_death_gsea_curve_multiple( gsea_groups, pathway = apoptosis_id ) curves$Control curves$Treatmentdata("demo_rank_apop_list", package = "CDEnrich") data("representative_pathways", package = "CDEnrich") apoptosis_id <- get_representative_pathway("Apoptosis")$Pathway gsea_groups <- celldeath_gsea_multiple( geneList_list = demo_rank_apop_list, pvalueCutoff = 1 ) curves <- plot_death_gsea_curve_multiple( gsea_groups, pathway = apoptosis_id ) curves$Control curves$Treatment
Generate a heatmap to compare pathway statistics (e.g., NES, -log10 p.adjust) across multiple GSEA groups. Compatible with two modes from celldeath_gsea():
Global mode: ranked list vs all cell death pathways
Targeted mode: ranked list vs one specific single pathway Missing pathway in certain group will be shown as grey tile.
plot_death_gsea_heatmap_multiple( gsea_res_list, show_category = 10, statistic = c("NES", "p.adjust"), palette = c("#2E8B57", "#F39C12", "#E74C3C"), title = "GSEA Multi-Group Enrichment Heatmap", filename = NULL, return_data = FALSE )plot_death_gsea_heatmap_multiple( gsea_res_list, show_category = 10, statistic = c("NES", "p.adjust"), palette = c("#2E8B57", "#F39C12", "#E74C3C"), title = "GSEA Multi-Group Enrichment Heatmap", filename = NULL, return_data = FALSE )
gsea_res_list |
A named list of GSEA result objects (from |
show_category |
Number of top pathways to display. Default: 10. |
statistic |
Which statistic to plot. Options: "NES" (default) or "p.adjust". |
palette |
Color palette for fill (low to high). Default: c("#2E8B57", "#F39C12", "#E74C3C"). |
title |
Plot title. Default: "GSEA Multi-Group Enrichment Heatmap". |
filename |
If provided, save plot to file. Default: NULL. |
return_data |
If TRUE, return the data frame used for plotting. Default: FALSE. |
A ggplot2 object (or data frame if return_data = TRUE).
data("demo_rank_apop_list", package = "CDEnrich") data("representative_genes", package = "CDEnrich") gsea_groups <- celldeath_gsea_multiple( geneList_list = demo_rank_apop_list, pvalueCutoff = 1 ) plot_death_gsea_heatmap_multiple( gsea_groups, statistic = "NES", show_category = 10 )data("demo_rank_apop_list", package = "CDEnrich") data("representative_genes", package = "CDEnrich") gsea_groups <- celldeath_gsea_multiple( geneList_list = demo_rank_apop_list, pvalueCutoff = 1 ) plot_death_gsea_heatmap_multiple( gsea_groups, statistic = "NES", show_category = 10 )
Generate a running score plot (ranked list metric) for a single GSEA result. Compatible with two modes from celldeath_gsea():
Global mode: ranked list vs all cell death pathways
Targeted mode: ranked list vs one specific single pathway This plot shows the enrichment score as a function of the ranked gene list.
plot_death_gsea_ranked( gsea_res, pathway, use_recommended = TRUE, color = "#2E8B57", base_size = 10, title = NULL, filename = NULL, ... )plot_death_gsea_ranked( gsea_res, pathway, use_recommended = TRUE, color = "#2E8B57", base_size = 10, title = NULL, filename = NULL, ... )
gsea_res |
Result from |
pathway |
Character. Either an exact pathway ID present in the
result, or a cell death type name (e.g. "Ferroptosis"), which is
resolved to the recommended representative gene set when available
(see |
use_recommended |
Logical. Only takes effect when |
color |
Color of the running score line. Default: "#2E8B57". |
base_size |
Base font size. Default: 10. |
title |
Plot title. If NULL, uses the pathway name. Default: NULL. |
filename |
If provided, save plot to file (e.g., "gsea_ranked.png"). Default: NULL. |
... |
Additional arguments passed to |
A ggplot2 object.
data("demo_rank_apop", package = "CDEnrich") data("representative_pathways", package = "CDEnrich") apoptosis_id <- get_representative_pathway("Apoptosis")$Pathway gsea_result <- celldeath_gsea( geneList = demo_rank_apop ) plot_death_gsea_ranked( gsea_result, pathway = apoptosis_id )data("demo_rank_apop", package = "CDEnrich") data("representative_pathways", package = "CDEnrich") apoptosis_id <- get_representative_pathway("Apoptosis")$Pathway gsea_result <- celldeath_gsea( geneList = demo_rank_apop ) plot_death_gsea_ranked( gsea_result, pathway = apoptosis_id )
Generate a horizontal barplot of mean ssGSEA scores per group, with SEM (standard error of mean) error bars. Suitable for comparing overall pathway activity across groups when many pathways are involved.
plot_death_ssgsea_bar( ssgsea_res, show_category = 20, palette = c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"), title = "Mean Cell Death Pathway ssGSEA Score", filename = NULL, return_data = FALSE )plot_death_ssgsea_bar( ssgsea_res, show_category = 20, palette = c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"), title = "Mean Cell Death Pathway ssGSEA Score", filename = NULL, return_data = FALSE )
ssgsea_res |
A |
show_category |
Number of top pathways to display, ordered by mean absolute score. The default is 20. |
palette |
Group colors. Default: c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"). |
title |
Plot title. Default: "Mean Cell Death Pathway ssGSEA Score". |
filename |
If provided, save plot to file (e.g., "barplot.png"). Default: NULL. |
return_data |
If TRUE, return the data frame used for plotting. Default: FALSE. |
A ggplot2 object (or data frame if return_data = TRUE).
data("demo_expr", package = "CDEnrich") data("demo_group", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ssgsea_result <- celldeath_ssgsea( expr = demo_expr, group = demo_group ) plot_death_ssgsea_bar( ssgsea_result, show_category = 10 )data("demo_expr", package = "CDEnrich") data("demo_group", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ssgsea_result <- celldeath_ssgsea( expr = demo_expr, group = demo_group ) plot_death_ssgsea_bar( ssgsea_result, show_category = 10 )
Generate boxplots comparing ssGSEA score distributions across groups.
Best companion for celldeath_ssgsea_diff() results.
Automatically adapt for two modes:
Global mode: pathways on x-axis (faceted or dodged by group)
Targeted mode: single-pathway group comparison layout
plot_death_ssgsea_boxplot( ssgsea_result, show_category = 10, palette = c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"), add_points = TRUE, title = "Cell Death Pathway ssGSEA Score Comparison", filename = NULL, return_data = FALSE )plot_death_ssgsea_boxplot( ssgsea_result, show_category = 10, palette = c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"), add_points = TRUE, title = "Cell Death Pathway ssGSEA Score Comparison", filename = NULL, return_data = FALSE )
ssgsea_result |
A |
show_category |
Number of top pathways to display (ordered by mean absolute score). Default: 10. |
palette |
Colors for groups. Default: c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"). |
add_points |
Logical. Whether to overlay jittered sample points. Default: TRUE. |
title |
Plot title. Default: "Cell Death Pathway ssGSEA Score Comparison". |
filename |
If provided, save plot to file (e.g., "boxplot.png"). Default: NULL. |
return_data |
If TRUE, return the data frame used for plotting. Default: FALSE. |
A ggplot2 object (or data frame if return_data = TRUE).
data("demo_expr", package = "CDEnrich") data("demo_group", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ssgsea_result <- celldeath_ssgsea( expr = demo_expr, group = demo_group ) plot_death_ssgsea_boxplot( ssgsea_result, show_category = 10 )data("demo_expr", package = "CDEnrich") data("demo_group", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ssgsea_result <- celldeath_ssgsea( expr = demo_expr, group = demo_group ) plot_death_ssgsea_boxplot( ssgsea_result, show_category = 10 )
Generate a heatmap of ssGSEA scores (pathways x samples) with optional group annotation. This is the most common visualization for ssGSEA results in publications. Automatically adapt for two modes:
Global mode: multiple pathways heatmap with row scaling
Targeted mode: single-pathway heatmap without row scaling
plot_death_ssgsea_heatmap( ssgsea_result, show_category = 30, scale_rows = TRUE, cluster_cols = TRUE, palette = c("#2E8B57", "white", "#E74C3C"), group_palette = c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"), title = "Cell Death Pathway ssGSEA Scores", filename = NULL, width = 10, height = 8 )plot_death_ssgsea_heatmap( ssgsea_result, show_category = 30, scale_rows = TRUE, cluster_cols = TRUE, palette = c("#2E8B57", "white", "#E74C3C"), group_palette = c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"), title = "Cell Death Pathway ssGSEA Scores", filename = NULL, width = 10, height = 8 )
ssgsea_result |
A |
show_category |
Number of top pathways to display, ordered by mean absolute score. The default is 30. |
scale_rows |
Logical. Whether to z-score scale each pathway across samples (recommended for multi-pathway mode). Default: TRUE. |
cluster_cols |
Logical. Whether to cluster samples. Default: TRUE. Ignored automatically if only one pathway is present. |
palette |
Color palette for score values (low to high). Default: c("#2E8B57", "white", "#E74C3C"). |
group_palette |
Named or unnamed colors for group annotation. Default: c("#2E8B57", "#F39C12", "#E74C3C", "#8E44AD"). |
title |
Plot title. Default: "Cell Death Pathway ssGSEA Scores". |
filename |
If provided, save plot to file (e.g., "heatmap.png"). Default: NULL. |
width |
Plot width in inches when saving. Default: 10. |
height |
Plot height in inches when saving. Default: 8. |
Invisibly returns the pheatmap object.
data("demo_expr", package = "CDEnrich") data("demo_group", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ssgsea_result <- celldeath_ssgsea( expr = demo_expr, group = demo_group ) plot_death_ssgsea_heatmap( ssgsea_result, show_category = 10 )data("demo_expr", package = "CDEnrich") data("demo_group", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ssgsea_result <- celldeath_ssgsea( expr = demo_expr, group = demo_group ) plot_death_ssgsea_heatmap( ssgsea_result, show_category = 10 )
Generate a volcano-style plot for single-group enrichment analysis (ORA or GSEA), showing effect size (GeneRatio for ORA, NES for GSEA) versus significance (-log10 p.adjust). Support both global multi-pathway mode and targeted single-pathway mode.
plot_death_volcano( enrich_res, label_top = 5, color_point = "lightblue", color_signif = "darkred", point_size = 2, alpha = 0.8, label_size = 3.5, x_lab = NULL, y_lab = expression(-log[10]("Adjusted P-value")), title = NULL, filename = NULL, ... )plot_death_volcano( enrich_res, label_top = 5, color_point = "lightblue", color_signif = "darkred", point_size = 2, alpha = 0.8, label_size = 3.5, x_lab = NULL, y_lab = expression(-log[10]("Adjusted P-value")), title = NULL, filename = NULL, ... )
enrich_res |
An |
label_top |
Number of top significant pathways to label (sorted by p.adjust). Default: 5. |
color_point |
Color of non-significant points. Default: "#D3D3D3". |
color_signif |
Color of significant points (p.adjust < 0.05). Default: "#D62728". |
point_size |
Size of points. Default: 2. |
alpha |
Transparency of points. Default: 0.8. |
label_size |
Size of pathway labels. Default: 3.5. |
x_lab |
X-axis label. If NULL, auto-detected ("Gene Ratio" for ORA, "NES" for GSEA). Default: NULL. |
y_lab |
Y-axis label. Default: "-log10(Adjusted P-value)". |
title |
Plot title. If NULL, auto-generated. Default: NULL. |
filename |
If provided, save plot to file (e.g., "volcano.png"). Default: NULL. |
... |
Additional arguments passed to |
A ggplot2 object.
data("demo_deg", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ora_result <- celldeath_enrich( deg = demo_deg, universe = demo_all_genes ) plot_death_volcano( ora_result, label_top = 5 )data("demo_deg", package = "CDEnrich") data("demo_all_genes", package = "CDEnrich") data("representative_genes", package = "CDEnrich") ora_result <- celldeath_enrich( deg = demo_deg, universe = demo_all_genes ) plot_death_volcano( ora_result, label_top = 5 )
Print Method for celldeath_ssgsea Objects
## S3 method for class 'celldeath_ssgsea' print(x, ...)## S3 method for class 'celldeath_ssgsea' print(x, ...)
x |
A |
... |
Additional arguments (ignored). |
Invisibly returns x.
The recommended representative gene set for each of the 13 cell death
types with curated recommendations. These are merged into the result
of load_cell_death_genes and are used as the default
gene set in targeted analysis modes.
data(representative_genes)data(representative_genes)
A named list of character vectors; names are pathway names
(e.g. Ferroptosis_FerrDb V2(36305834)) and each element is a
vector of gene symbols.
Curated from the seminal publication of each cell death type;
see representative_pathways for the curation metadata.
Curated recommendation table recording, for each cell death type with
multiple PMID-based gene sets, which gene set is the recommended
representative. Used by get_representative_pathway.
data(representative_pathways)data(representative_pathways)
A data frame with one row per recommended cell death type and the following columns:
Cell death type name, e.g. Ferroptosis.
PubMed ID of the source publication.
Journal impact factor of the source publication.
Citation count of the source publication.
Name of the recommended representative gene set,
e.g. Ferroptosis_FerrDb V2(36305834).
Where the gene set was obtained from in the
publication, e.g. Supplementary-table1.
Free-text description of how the gene set was curated.
Additional curation notes (may be empty).
Curated manually from the primary literature;
see data-raw/representative_pathways.csv.