This function performs pathway differential expression analysis based on clustering results and pathway activity scores derived from ssMwwGST.
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).