groupedGSEAtoStackedReport: Build a report from gene set enrichment results.

View source: R/groupedGSEAtoStackedReport.R

groupedGSEAtoStackedReportR Documentation

Build a report from gene set enrichment results.

Description

After clustering FGSEA results by gene set similarity, this function builds a report containing the individual gene expression profiles for genes contained in each gene set cluster.

Usage

groupedGSEAtoStackedReport(grouped.gsea, leadingEdge, de.fit, outputDir = NULL)

Arguments

grouped.gsea

Output from groupFGSEA()

leadingEdge

Leading edge analysis results used in groupFGSEA()

de.fit

Differential Expression results from Limma or NanoStringDiff

outputDir

Directory for output files. If NULL (default), will return the stacked report instead of writing to a file.

Value

A stacked report containing statistics and gene expression profiles for genes contained in each cluster

Examples

data("ExamplePathways")
data("ExampleResults") # Results from runLimmaAnalysis

fgseaResults <- limmaToFGSEA(ExampleResults, gene.sets = ExamplePathways,
                             min.set = 5, rank.by = "t")
leadingEdge <- fgseaToLEdge(fgseaResults, cutoff.type = "padj", cutoff = 0.1)

fgseaGrouped <- groupFGSEA(fgseaResults$Autoimmune.retinopathy, 
                            leadingEdge$Autoimmune.retinopathy,
                            join.threshold = 0.5,
                            dist.method = "binary")

results.AR <- groupedGSEAtoStackedReport(
              fgseaGrouped,
              leadingEdge = leadingEdge$Autoimmune.retinopathy,
              de.fit = ExampleResults)

calebclass/NanoTube documentation built on Nov. 21, 2023, 12:31 p.m.