CalculateAndPlotGoTermScores: Calculate and Plot GO Term Scores

View source: R/gruffi.R

CalculateAndPlotGoTermScoresR Documentation

Calculate and Plot GO Term Scores

Description

Automates the process of obtaining and calculating of Gene Ontology (GO) term-based gene set scores and it's visualization through UMAP plots.

Usage

CalculateAndPlotGoTermScores(
  obj = combined.obj,
  GO = "GO:0009651",
  data.base.access = c("biomaRt", "AnnotationDbi")[1],
  mirror = NULL,
  get.go.terms.if.missing = TRUE,
  open.browser = FALSE,
  plot.each.gene = FALSE,
  desc = "",
  save.UMAP = TRUE,
  verbose = TRUE,
  return.plot = FALSE,
  overwrite.misc.GO_genes = FALSE,
  ...
)

Arguments

obj

A Seurat single-cell object.

GO

The GO term to be analyzed, with a default value of "GO:0009651".

data.base.access

Specifies the method to access gene list databases, with "biomaRt" as the default option and "AnnotationDbi" as an alternative.

mirror

Specifies an Ensembl mirror to use if the default connection fails, with NULL as the default indicating no mirror is specified.

get.go.terms.if.missing

Retrieves GO terms if they are missing in the data. Defaults to TRUE.

open.browser

If TRUE, opens the corresponding GO term page in a web browser. Defaults to FALSE.

plot.each.gene

If TRUE, generates a UMAP plot for each gene's expression in addition to the GO term scores. Defaults to FALSE.

desc

A description for the GO term to be included on the plot, with an empty string as the default.

save.UMAP

If TRUE, the UMAP plot is saved to a file. Defaults to TRUE.

verbose

If TRUE, enables the printing of detailed messages throughout the function execution. Defaults to TRUE.

return.plot

If TRUE, the function returns the plot object instead of the updated Seurat object. Defaults to FALSE.

overwrite.misc.GO_genes

Overwrite preexisting gene set in misc$gruffi$GO[[make.names(GO)]].

...

Additional arguments passed to internal functions.

Value

Depending on the return.plot parameter, this function returns either a plot object or an updated Seurat object with new GO term scores added.

See Also

reexports iprint


jn-goe/gruffi documentation built on Nov. 7, 2024, 10:38 p.m.