Plot top words by frequency for reduced, clustered GO terms
Source:R/enrichment.R
plot_clustered_terms_top.Rd
This function generates a barplot labeled with the most frequent words in reduced GO term clusters. This can be useful for getting the gist of affected pathways or gene sets without relying on a singular GO term chosen by uniqueness, size, or significance.
Arguments
- reduced.terms
A `data.frame“ containing the reduced terms and their associated scores.
- stoppers
A character vector of stopwords to exclude from the terms. Defaults to general English stopwords ("of", "the", "a" and the like). See
stopwords(kind = "en")
for specifics.- color
Fill color of the bars. Default is "#E69F00".
- n.top.terms
An integer specifying the number most frequent terms to display per cluster. Default is 5.
- n.top.clusters
An optional integer specifying the number of top clusters to display. If NULL, all clusters are displayed.
- perc.shift
A numeric value specifying the percentage by which the color should be darkened/lightened from the low to high cluster. Default is 0.5.
- label.font.size
A numeric value specifying the font size for the labels. Default is 5.
- xlabel
A string specifying the label for the x-axis. Default is "score".
- ylabel
A string specifying the label for the y-axis.