Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BDB-Genomics/AlphaGenomeR/llms.txt

Use this file to discover all available pages before exploring further.

AlphaGenome’s multimodal predictions are not generic — the model can produce outputs that reflect the regulatory landscape of specific tissues and cell types. You select those contexts through the ontology_terms parameter, which accepts standard biological ontology identifiers from UBERON (for anatomical structures) and CL (for cell types). When you supply terms, the API filters returned tracks to match only those biological contexts; when you omit them, predictions may span all available tissues in the model.

Ontology term format

Terms follow the standard PREFIX:NNNNNNN format used across biological databases:
  • UBERON — Uber Anatomy Ontology, for tissues and organs
  • CL — Cell Ontology, for specific cell types
Pass one or more terms as a character vector to ontology_terms:
library(AlphaGenomeR)

api_key <- Sys.getenv("ALPHAGENOME_API_KEY")

# Single tissue: Lung
results <- alphagenome_query(
  access_token   = api_key,
  genomic_region = "chr17:42560601-43609177",
  ontology_terms = c("UBERON:0002048")
)

Common UBERON tissue terms

TermTissue
UBERON:0002048Lung
UBERON:0002107Liver
UBERON:0000955Brain
UBERON:0000948Heart

Common CL cell type terms

TermCell type
CL:0000236B cell
CL:0000084T cell

Query multiple tissues in one call

Pass multiple terms in the same character vector to retrieve predictions covering all of those contexts in a single API call:
# Lung and Liver in one query
results_multi <- alphagenome_query(
  access_token   = api_key,
  genomic_region = "chr17:42560601-43609177",
  ontology_terms = c("UBERON:0002048", "UBERON:0002107"),
  requested_outputs = c("RNA_SEQ", "ATAC")
)

Mix tissue and cell type terms

UBERON and CL terms can be combined in the same call:
results_mixed <- alphagenome_query(
  access_token   = api_key,
  genomic_region = "chr1:1000000-2048576",
  ontology_terms = c("UBERON:0000955", "CL:0000084"),  # Brain + T cell
  requested_outputs = c("RNA_SEQ", "CAGE")
)

What happens when ontology_terms is NULL

When you omit ontology_terms or set it to NULL, the package passes an empty list to the API:
# From alphagenome-api.R
ont_terms <- if (is.null(ontology_terms)) list() else as.list(ontology_terms)
When ontology_terms is NULL, predictions may include tracks from all tissues available in the model. The returned metadata will indicate which contexts each track corresponds to.

Finding ontology terms

Browse the Uber Anatomy Ontology at https://www.ebi.ac.uk/ols4/ontologies/uberon. Search by tissue name to find the corresponding UBERON:NNNNNNN identifier.
Browse the Cell Ontology at https://www.ebi.ac.uk/ols4/ontologies/cl. Search by cell type name to find the CL:NNNNNNN identifier.
The EBI Ontology Lookup Service at https://www.ebi.ac.uk/ols4 covers both UBERON and CL in one place and supports free-text search across all ontologies.
When exploring a new tissue, search OLS for the tissue name, confirm the term is from the UBERON namespace, and copy the UBERON:NNNNNNN identifier directly into your ontology_terms vector.

Full example with metadata inspection

After querying with tissue terms, inspect $metadata to confirm which tissue contexts are present in the returned tracks:
library(AlphaGenomeR)

api_key <- Sys.getenv("ALPHAGENOME_API_KEY")

# Query for Lung and Liver RNA-seq
results <- alphagenome_query(
  access_token      = api_key,
  genomic_region    = "chr17:42560601-43609177",
  ontology_terms    = c("UBERON:0002048", "UBERON:0002107"),
  requested_outputs = c("RNA_SEQ")
)

rna_data <- alphagenome_get_rna_seq(results)

# Check which tissues are in the returned tracks
head(rna_data$metadata)

Build docs developers (and LLMs) love