Skip to contents

This function performs pathway differential expression analysis based on clustering results and pathway activity scores derived from ssMwwGST.

Usage

PathDEA(
  Cluster_data,
  ssMwwGST_results,
  dea_FDR_threshold = 0.001,
  dea_gap_threshold = 1.5
)

Arguments

Cluster_data

A data frame where the first column must be the sample IDs and the second column must be the cluster assignments.

ssMwwGST_results

A list of results from ssMwwGST, including NES (Normalized Enrichment Scores).

dea_FDR_threshold

Numeric. The FDR threshold to use for filtering significant pathways. Default is 0.001.

dea_gap_threshold

Numeric. The median gap threshold to use for filtering significant pathways. Default is 1.5.

Value

A list containing: - dea_path: A list of data frames, each containing the differential expression analysis results for each cluster. - dea_path2: A list of data frames containing the filtered differential expression analysis results for each cluster based on FDR and median gap thresholds. - NES: A data frame of Normalized Enrichment Scores for each gene set and each sample. - Cluster: A data frame of sample IDs and their corresponding cluster assignments.

Details

The function operates as follows: 1. Extracts Normalized Enrichment Scores (NES) from the ssMwwGST results. 2. Performs Wilcoxon rank-sum tests to compare pathway activity between clusters for each pathway. 3. Calculates median and mean differences in pathway activity between clusters. 4. Adjusts p-values using the Benjamini-Hochberg method to control the false discovery rate (FDR).

Author

Zaoqu Liu; Email: liuzaoqu@163.com

Examples

# Example usage:
Cluster_data <- data.frame(Sample = paste0("Sample", 1:10), Cluster = rep(1:2, each = 5))
ssMwwGST_results <- list(NES = matrix(rnorm(100),
  nrow = 10, ncol = 10,
  dimnames = list(paste0("Pathway", 1:10), paste0("Sample", 1:10))
))
result <- PathDEA(Cluster_data, ssMwwGST_results)