A example of GSEA result from fgsea package
Examples
# \dontrun{
if (interactive()) {
set.seed(1234)
data(geneList, package="DOSE")
gsea_example <- DOSE::gseDO(geneList)
gene_ranks <- gsea_example@geneList
gene_sets <- gsea_example@geneSets
gsea_example_pos <- gsea_example[gsea_example$p.adjust < 0.05 & gsea_example$NES > 0, ]
gsea_example_neg <- gsea_example[gsea_example$p.adjust < 0.05 & gsea_example$NES < 0, ]
gsea_example <- rbind(
gsea_example_pos[sample(1:nrow(gsea_example_pos), 5), ],
gsea_example_pos[sample(1:nrow(gsea_example_pos), 5), ]
)
attr(gsea_example, "gene_ranks") <- gene_ranks
attr(gsea_example, "gene_sets") <- gene_sets[gsea_example$ID]
}
# }