This function performs GSEA on a named list of ranked genes.
Usage
run_GSEA(
sigs,
ranked.genes,
outdir,
res.name = "GSEA",
res.list = list(),
padj.th = 0.05,
min.size = 15,
max.size = 1000,
BPPARAM = NULL,
...
)
Arguments
- sigs
A named list of gene signatures.
- ranked.genes
A named list of ranked genes. Using a list allows for results from many comparisons to be passed.
- outdir
The output directory for results.
- res.name
A name to be assigned to for the results added to
res.list
. Also used as a prefix for output files.- res.list
A list to store results. Useful for saving lots of results to a single file, e.g. from multiple comparisons. Defaults to an empty list.
- padj.th
The adjusted p-value threshold for limiting which gene sets to plot. Defaults to 0.05.
- min.size
The minimum size of the gene sets to be considered for GSEA. Defaults to 15.
- max.size
The maximum size of the gene sets to be considered for GSEA. Defaults to 1000.
- BPPARAM
The BiocParallelParam object specifying the parallel back-end to be used. Defaults to NULL.
- ...
Additional arguments to pass to the
fgsea::fgsea()
function.
Value
A list of GSEA results if res.list
is not `NULL“, otherwise, results are saved as files in the specified output directory.
Details
The function creates various output files including detailed GSEA results, enrichment plots, and tables of top enriched pathways.
Examples
if (FALSE) { # \dontrun{
run_GSEA(
sigs = msigdb, ranked.genes = my_genes, outdir = "./results", outprefix = "experiment1",
res.list = list()
)
} # }