GO_visualization: GO_visualization

View source: R/GO_visualization.R

GO_visualizationR Documentation

GO_visualization

Description

This function provides a dot plot chart of the GO enrichments after semantic similarity analysis and a recalculation of enrichments based on new gene categories derived from the semantic similarity analysis.

Usage

GO_visualization(
  cluster_enriched_df,
  markers_df = NULL,
  clust_list = NULL,
  numcats = 15,
  GOcats = NULL,
  chosen_cats = NULL,
  org_db = "org.Hs.eg.db",
  goterms = NULL,
  species_x = "Homo sapiens"
)

Arguments

cluster_enriched_df

second object provided by the enrich_test _function

markers_df

data frame resulting from FindAllMarkers function in the Seurat package, required if a clust_list is not provided

clust_list

a list of gene vectors associated with each cluster.

numcats

number of catergorical terms to plot on x-axis. Function is setup to select the the most frequent terms. Default is 15.

GOcats

product of the msigdb_gsets funciton using GOBP. Can also be user supplied annotation in the same format.

chosen_cats

User supplied catergorical terms to plot on x-axis. Default is null which lets the function choose the categories.

org_db

annotation package from Bioconductor of matching species to the species_x parameter.

goterms

a vector with GOIDS as object and the GO terms as names

species_x

species names, default is "Homo sapiens", refer to ?msigdbr::msigdbr for available species

Value

prints a plot and returns a list with three objects. The first object is a list of data frames generated by the semantic similarity analysis based on GO:BP enrichments, the second is a dataframe used for ggplot, and the third object is a ggplot2 object that was plotted suitable for fine tuning the appearance of the plot.

Examples

## Not run: 
GO_visualization(enrich_results$Enriched_df,markers_df=markers,goterms=goterms,numcats=10)

## End(Not run)

neural-stem-cell-institute/screp documentation built on Feb. 11, 2023, 10:45 a.m.