View source: R/gsea_pathway_annotation.R
gsea_pathway_annotation | R Documentation |
This function adds pathway annotations to GSEA results, including pathway names, descriptions, and classifications.
gsea_pathway_annotation(gsea_results, pathway_type = "KEGG")
gsea_results |
A data frame containing GSEA results from the pathway_gsea function |
pathway_type |
A character string specifying the pathway type: "KEGG", "MetaCyc", or "GO" |
A data frame with annotated GSEA results
## Not run:
# 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"
)
# Annotate results
annotated_results <- gsea_pathway_annotation(
gsea_results = gsea_results,
pathway_type = "KEGG"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.