publish_gosttable: Create and save a table with the functional enrichment...

View source: R/gprofiler2.R

publish_gosttableR Documentation

Create and save a table with the functional enrichment analysis results.

Description

This function creates a table mainly for the results from gost() function. However, if the input at least contains columns named 'term_id' and 'p_value' then any enrichment results data frame can be visualised in a table with this function.

Usage

publish_gosttable(
  gostres,
  highlight_terms = NULL,
  use_colors = TRUE,
  show_columns = c("source", "term_name", "term_size", "intersection_size"),
  filename = NULL,
  ggplot = TRUE
)

Arguments

gostres

named list from gost() function (with names 'result' and 'meta') or a data frame that has columns named "term_id" and "p_value(s)".

highlight_terms

vector of selected term IDs from the analysis or a (subset) data.frame that has a column called 'term_id'. All data is shown if set to NULL.

use_colors

if enabled, the p-values are highlighted in the viridis colorscale just as in g:Profiler, otherwise the table has no background colors.

show_columns

names of additional columns to show besides term_id and p_value. By default the output table shows additional columns named "source", "term_name", "term_size", "intersection_size"

filename

file name to create on disk and save the annotated plot. Filename extension should be from c("png", "pdf", "jpeg", "tiff", "bmp").

ggplot

if FALSE, then the function returns a gtable object.

Details

The output table is very similar to the one shown under the Manhattan plot.

Value

The output is a ggplot object.

Author(s)

Liis Kolberg <liis.kolberg@ut.ee>

Examples

 gostres <- gost(c("Klf4", "Pax5", "Sox2", "Nanog"), organism = "mmusculus")
 publish_gosttable(gostres, highlight_terms = c("GO:0001010", "REAC:R-MMU-8939245"))

gprofiler2 documentation built on July 9, 2023, 6:06 p.m.