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,
universe = NULL,
gsub.pattern.prot.id = NULL,
pvalueCutoff = 0.05,
qvalueCutoff = 0.05,
pAdjustMethod = "BH",
dotplot.n = 10
)An object of class DEprot.analyses.
Number indicating the position of the contrast to use for the plotting.
Data.frame containing two columns 'gs_name' (IDs of the gene sets) and 'gene_symbol' (indicating the gene IDs). No default.
String indicating the type of analyses to perform. One among: GSEA, ORA. No default.
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), "statistic" (statistic column of the results). Default: "foldchange".
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.
Character vector indicating the background gene list of the ORA. Default: NULL, meaning that all the unique proteins present in the counts used for the differential analyses are taken. This is almost always the correct background for a proteomics experiment, since only the quantified proteins could have been called as differential. Ignored when enrichment.type = "GSEA".
String indicating a pattern to be passed to gsub and to remove from the prot.id. The same pattern is removed from the IDs of the universe. Default: NULL (non changes in the IDs).
Numeric value indicating the adjusted pvalue cutoff on enrichment tests to report. Default: 0.05.
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.
String indicating the method to use for the p-value adjustment. One mong "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none". Default: "BH".
Numeric value indicating the maximum number of categories to plot in the dotplot. Default: 10.
An object of class DEprot.enrichResult.
# 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)
#> Warning: qvalue::qvalue() failed, returning NA for qvalue. Error: missing values and NaN's not allowed if 'na.rm' is FALSE
#> Scale for fill is already present.
#> Adding another scale for fill, which will replace the existing scale.
#> Warning: showCategory (5) is larger than available items (1). Using 1
#> 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)
#> Warning: showCategory (5) is larger than available items (3). Using 3
#> Scale for fill is already present.
#> Adding another scale for fill, which will replace the existing scale.