plot_go: Plot selected GO terms

View source: R/go.R

plot_goR Documentation

Plot selected GO terms

Description

This function plots a set of GO terms of interest. be run after get_enriched_go and estimate_go_overrep. To avoid plotting too many terms, you may wish to use remove_redundant_go first too. A warning is shown if you try and plot more than 100 GO terms.

Usage

plot_go(
  obj,
  term_col = "term_short",
  ontology_col = "ontology",
  annotate_n = TRUE
)

Arguments

obj

data.frame containing goseq results as generated by get_enriched_go then estimate_go_overrep. See below for an example.

term_col

character column name for GO term description.

ontology_col

character column name for GO term ontology.

annotate_n

logical Include the number of features per term (i.e. numDEInCat column) in the plot? (Default is TRUE)

Value

Returns a ggplot object.

Examples

# Make a data.frame of the correct format
df <- data.frame(
  "term_short" = c("A GO term", "Another GO term", "One more GO term"),
  "ontology" = c("BP", "MF", "CC"),
  "over_represented_adj_pval" = c(0.0001, 1, 0.01),
  "adj_overrep" = c(15, 3, 1),
  "numDEInCat" = c(304, 22, 78)
)

# Plot the GO terms
plot_go(df)


CambridgeCentreForProteomics/camprotR documentation built on Jan. 27, 2023, 8:36 p.m.