plot_go.RdThis 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.
plot_go(
obj,
term_col = "term_short",
ontology_col = "ontology",
annotate_n = TRUE
)data.frame containing goseq results as generated by
get_enriched_go then estimate_go_overrep.
See below for an example.
character column name for GO term description.
character column name for GO term ontology.
logical Include the number of features per term
(i.e. numDEInCat column) in the plot? (Default is TRUE)
Returns a ggplot object.
# 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)