if (FALSE) {
# Load example data
data(ko_abundance)
data(metadata)
# Prepare abundance data
abundance_data <- as.data.frame(ko_abundance)
rownames(abundance_data) <- abundance_data[, "#NAME"]
abundance_data <- abundance_data[, -1]
# Run GSEA analysis
gsea_results <- pathway_gsea(
abundance = abundance_data,
metadata = metadata,
group = "Environment",
pathway_type = "KEGG",
method = "fgsea"
)
# Create enrichment plot
visualize_gsea(gsea_results, plot_type = "enrichment_plot", n_pathways = 10)
# Create dotplot
visualize_gsea(gsea_results, plot_type = "dotplot", n_pathways = 20)
# Create barplot
visualize_gsea(gsea_results, plot_type = "barplot", n_pathways = 15)
# Create network plot
visualize_gsea(gsea_results, plot_type = "network", n_pathways = 15)
# Create heatmap
visualize_gsea(
gsea_results,
plot_type = "heatmap",
n_pathways = 15,
abundance = abundance_data,
metadata = metadata,
group = "Environment"
)
}
Run the code above in your browser using DataLab