Package 'annotaR'

Title: Tidy, Integrated Gene Annotation
Description: A framework for intuitive, multi-source gene and protein annotation, with a focus on integrating functional genomics with disease and drug data for translational insights. Methods used include g:Profiler (Raudvere et al. (2019) <doi:10.1093/nar/gkz369>), biomaRt (Durinck et al. (2009) <doi:10.1038/nprot.2009.97>), and the Open Targets Platform (Koscielny et al. (2017) <doi:10.1093/nar/gkw1055>).
Authors: MD. Arshad [aut, cre]
Maintainer: MD. Arshad <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2026-05-28 08:27:22 UTC
Source: https://github.com/sulkysubject37/annotar

Help Index


Add GO functional enrichment data

Description

Augments an annotaR object with functional enrichment data from g:Profiler. It performs a Gene Ontology (GO) analysis on the gene list and joins the results.

Usage

add_go_terms(annotaR_object, organism = "hsapiens", sources = c("GO:BP"), ...)

Arguments

annotaR_object

A tibble, typically the output of annotaR(). Must contain a 'gene' column.

organism

The organism name to use for the query (e.g., "hsapiens"). Passed to gprofiler2::gost.

sources

A vector of data sources to query. Defaults to GO Biological Process. See gprofiler2::gost for options.

...

Additional parameters passed on to gprofiler2::gost.

Value

A new tibble with the original 'gene' column joined with functional annotation columns (e.g., term_id, term_name, p_value, source).

Examples

annotaR(c("TP53", "EGFR")) %>%
    add_go_terms()

Create an annotaR object

Description

Initializes the annotation pipeline by creating a tibble from a character vector of gene symbols. This is the entry point for a typical annotaR workflow.

Usage

annotaR(genes)

Arguments

genes

A character vector of HGNC gene symbols (e.g., c("TP53", "BRCA1")).

Value

A tibble with a single column 'gene', ready to be used in downstream annotation functions.

Examples

my_genes <- c("TP53", "EGFR", "BRCA1")
annotaR(my_genes)

Plot GO Enrichment Results as a Dot Plot

Description

Creates a publication-ready dot plot from the results of an add_go_terms() call. The plot shows the top enriched terms, with dot size representing the number of genes and color representing the p-value.

Usage

plot_enrichment_dotplot(
  annotaR_object,
  n_terms = 20,
  title = "Top GO Enrichment Results"
)

Arguments

annotaR_object

An object processed by add_go_terms(). Must contain term_name, p_value, and gene columns.

n_terms

The maximum number of top terms to display, ordered by p-value. Defaults to 20.

title

The title of the plot.

Value

A ggplot object.

Examples

# Create a dummy annotaR object with enrichment data
annotated_data <- tibble::tibble(
  gene = c("TP53", "TP53", "EGFR"),
  term_name = c("Cell cycle", "Apoptosis", "Cell cycle"),
  p_value = c(0.001, 0.005, 0.001),
  source = "GO:BP",
  intersection = "TP53,EGFR"
)

plot_enrichment_dotplot(annotated_data)