Perform Gene Set Enrichment Analyses (GSEA) or OverRepresentation Analyses (ORA) on a proteomics differential analyses.

geneset.enrichment(
  DEprot.analyses.object,
  contrast,
  TERM2GENE,
  enrichment.type,
  gsea.rank.method = "foldchange",
  diff.status.category = NULL,
  gsub.pattern.prot.id = NULL,
  pvalueCutoff = 0.05,
  qvalueCutoff = 0.05,
  pAdjustMethod = "BH",
  dotplot.n = 10
)

Arguments

DEprot.analyses.object

An object of class DEprot.analyses.

contrast

Number indicating the position of the contrast to use for the plotting.

TERM2GENE

Data.frame containing two columns 'gs_name' (IDs of the gene sets) and 'gene_symbol' (indicating the gene IDs). No default.

enrichment.type

String indicating the type of analyses to perform. One among: GSEA, ORA. No default.

gsea.rank.method

String indicating the type of gene ranking to use for GSEA analyses. Possible options: "foldchange" (log2FC value of the contrast), "correlation" (spearman's correlation coefficient of the imputed counts between the two groups in the contrast). Default: "foldchange".

diff.status.category

String indicating a diff.status among the ones present in the results table of the specific contrast. Used only one 'ORA' is performed. Default: NULL.

gsub.pattern.prot.id

String indicating a pattern to be passed to gsub and to remove from the prot.id. Default: NULL (non changes in the IDs).

pvalueCutoff

Numeric value indicating the adjusted pvalue cutoff on enrichment tests to report. Default: 0.05.

qvalueCutoff

Numeric value indicating the qvalue cutoff on enrichment tests to report as significant (only for ORA). Tests must pass i) pvalueCutoff on unadjusted pvalues, ii) pvalueCutoff on adjusted pvalues and iii) qvalueCutoff on qvalues to be reported. Default: 0.05.

pAdjustMethod

String indicating the method to use for the p-value adjustment. One mong "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none". Default: "BH".

dotplot.n

Numeric value indicating the maximum number of categories to plot in the dotplot. Default: 10.

Value

An object of class DEprot.enrichResult.

Author

Sebastian Gregoricchio

Examples

# Perform Over-Representation Analyses (ORA)
ora.results <- geneset.enrichment(DEprot.analyses.object = DEprot::test.toolbox$diff.exp.limma,
                                  contrast = 1,
                                  TERM2GENE = DEprot::test.toolbox$geneset,
                                  enrichment.type = "ORA",
                                  diff.status.category = "FBS",
                                  pvalueCutoff = 1,
                                  qvalueCutoff = 1)
#> Scale for fill is already present.
#> Adding another scale for fill, which will replace the existing scale.
#> Scale for fill is already present.
#> Adding another scale for fill, which will replace the existing scale.


# Perform GeneSet Enrichment Analyses (GSEA)
gsea.results <- geneset.enrichment(DEprot.analyses.object = DEprot::test.toolbox$diff.exp.limma,
                                   contrast = 1,
                                   TERM2GENE = DEprot::test.toolbox$geneset,
                                   enrichment.type = "GSEA",
                                   gsea.rank.method = "foldchange",
                                   pvalueCutoff = 1,
                                   qvalueCutoff = 1)
#> using 'fgsea' for GSEA analysis, please cite Korotkevich et al (2019).
#> preparing geneSet collections...
#> GSEA analysis...
#> leading edge analysis...
#> done...
#> Scale for fill is already present.
#> Adding another scale for fill, which will replace the existing scale.