OmaDB 2.30.0
The Orthologous MAtrix (OMA) project is a method and database for the inference of orthologs among complete genomes (omabrowser.org). The OMA Browser provides several types of orthology predictions for thousands of genomes across the tree of life:
OmaDB gives access to the data of the OMA Browser from R, using its REST
API. It returns the data as data.frames and objects using standard
Bioconductor classes (e.g. GRanges, AAString), so that it can be
directly used in downstream analyses. A similar package exists for Python
(pyomadb). Other Bioconductor
packages provide orthology information for a limited set of model
organisms (e.g. the Orthology.eg.db annotation package) or gene trees
from other resources (e.g. biomaRt for Ensembl Compara), while OmaDB
covers all genomes in OMA and gives access to the hierarchical orthologous
groups and the ancestral genomes inferred by OMA.
As OmaDB queries the OMA Browser, it requires an internet connection.
This vignette gives an overview of the package. More details are given in the vignettes on HOGs, the taxonomy and sequence analyses.
OmaDB is available from Bioconductor and can be installed as follows:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("OmaDB")
library(OmaDB)
The functions of the package correspond to the main entities of the OMA Browser:
| Function | Retrieves |
|---|---|
getProtein() |
proteins, their orthologs, GO annotations, … |
searchProtein() |
proteins matching an identifier |
mapSequence() |
proteins matching a sequence |
getOMAGroup() |
OMA Groups |
getHOG(), getHOGs(), getOrthoXML() |
Hierarchical Orthologous Groups |
getGenome() |
genomes and their proteins |
getGenomePairs(), getSharedAncestry() |
orthologs between two genomes |
getTaxonomy() |
the taxonomy of the genomes |
getSynteny() |
(ancestral) gene order |
annotateSequence() |
predicted GO annotations for a sequence |
The results follow simple rules: an entity (e.g. a protein or a genome) is
returned as an object of class omadb_obj, a list of entities (e.g. the
orthologs of a protein) is returned as a data.frame.
getVersion()
#> OMA Browser object with 2 attributes:
#> $ oma_version : character All.May2026
#> $ api_version : character 1.11
Proteins can be retrieved with any unique identifier, e.g. a UniProtKB
accession, an OMA id or a RefSeq id. If an identifier is not unique,
searchProtein() lists all matching proteins.
hits <- searchProtein("P53_HUMAN")
hits[, c("xref", "source", "omaid")]
#> xref source omaid
#> 1 A0A1W2PP53_HUMAN UniProtKB/TrEMBL HUMAN57222
#> 2 B3KP53_HUMAN UniProtKB/TrEMBL HUMAN06909
#> 3 F8VP53_HUMAN UniProtKB/TrEMBL HUMAN15836
#> 4 H3BP53_HUMAN UniProtKB/TrEMBL HUMAN50682
#> 5 NOP53_HUMAN UniProtKB/SwissProt HUMAN44696
#> 6 P53_HUMAN UniProtKB/SwissProt HUMAN31534
#> 7 P53_HUMAN UniProtKB/SwissProt HUMAN31536
#> 8 Q5JP53_HUMAN UniProtKB/TrEMBL HUMAN83758
#> 9 UBP53_HUMAN UniProtKB/SwissProt HUMAN77195
#> 10 UBP53_HUMAN UniProtKB/SwissProt HUMAN77196
p53 <- getProtein("P53_HUMAN")
p53
#> OMA Browser object with 27 attributes:
#> $ entry_nr : integer 24438216
#> $ entry_url : <loaded on access>
#> $ omaid : character HUMAN31534
#> $ canonicalid : character P53_HUMAN
#> $ sequence_md5 : character c133dfce69f606f20865e9008199f852
#> $ sequence_length : integer 393
#> $ species : object (code, taxon_id, species, genome_url)
#> $ oma_group : integer 1458663
#> $ oma_hog_id : character HOG:F0782425.2c.7a
#> $ chromosome : character 17
#> $ locus : GRanges with 1 range(s)
#> $ is_main_isoform : logical TRUE
#> $ roothog_id : integer 782425
#> $ hog_levels : character Homo sapiens Homininae Hominidae ...
#> $ sequence : AAString of length 393
#> $ cdna : DNAString of length 1182
#> $ structure : object (source, sequence_3di)
#> $ description : character tumor protein p53 [Source:HGNC Symbol;Acc:HGNC:11998]; tr...
#> $ domains : <loaded on access>
#> $ xref : <loaded on access>
#> $ orthologs : <loaded on access>
#> $ homoeologs : logical NA
#> $ gene_ontology : <loaded on access>
#> $ oma_group_url : <loaded on access>
#> $ oma_hog_members : <loaded on access>
#> $ isoforms : <loaded on access>
#> $ alternative_isoforms_urls : character https://omabrowser.org/api/protein/24438201/ https://omab...
The protein sequence is an AAString and the genomic locus a GRanges
object:
p53$sequence
#> 393-letter AAString object:
#> MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQA...GKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD
p53$locus
#> GRanges object with 1 range and 0 metadata columns:
#> seqnames ranges strand
#> <Rle> <IRanges> <Rle>
#> HUMAN31534 17 7669609-7676594 -
#> -------
#> seqinfo: 1 sequence from an unspecified genome; no seqlengths
Some attributes, such as the orthologs or the GO annotations, are loaded
from the OMA Browser when they are accessed (they are shown as
<loaded on access> above):
orthologs <- p53$orthologs
dim(orthologs)
#> [1] 157 20
head(orthologs[, c("omaid", "species.species", "rel_type")])
#> omaid species.species rel_type
#> 1 ACTTE20737 Actinia tenebrosa 1:1
#> 2 EXADI20707 Exaiptasia diaphana 1:1
#> 3 NEMVE02305 Nematostella vectensis 1:1
#> 4 ACRCE18041 Acropora cervicornis 1:1
#> 5 LITSI09659 Litomosoides sigmodontis 1:1
#> 6 CENSC02831 Centruroides sculpturatus 1:1
table(orthologs$rel_type)
#>
#> 1:1 1:n
#> 130 27
The same data can be retrieved directly with the attribute argument,
also for several proteins at once. For several proteins, the column
query_id contains the queried identifier:
go <- getProtein(c("P53_HUMAN", "P53_MOUSE"), attribute = "gene_ontology")
head(go[, c("query_id", "GO_term", "name", "aspect")])
#> query_id GO_term name
#> 1 P53_HUMAN GO:0051097 negative regulation of helicase activity
#> 2 P53_HUMAN GO:1903451 negative regulation of G1 to G0 transition
#> 3 P53_HUMAN GO:1903451 negative regulation of G1 to G0 transition
#> 4 P53_HUMAN GO:0072717 cellular response to actinomycin D
#> 5 P53_HUMAN GO:1905856 negative regulation of pentose-phosphate shunt
#> 6 P53_HUMAN GO:0070245 positive regulation of thymocyte apoptotic process
#> aspect
#> 1 biological_process
#> 2 biological_process
#> 3 biological_process
#> 4 biological_process
#> 5 biological_process
#> 6 biological_process
The function getObjectAttributes() lists the attributes of an object and
as.data.frame() converts it into a data.frame with a single row:
head(getObjectAttributes(p53))
#> entry_nr entry_url omaid canonicalid sequence_md5
#> "integer" "url" "character" "character" "character"
#> sequence_length
#> "integer"
df <- as.data.frame(p53)
df[, c("omaid", "canonicalid", "species.code", "oma_group")]
#> omaid canonicalid species.code oma_group
#> 1 HUMAN31534 P53_HUMAN HUMAN 1458663
OMA Groups are cliques of proteins that are all orthologous to each other. As they contain at most one protein per species, they are often used as marker genes for phylogenetic analyses.
group <- getOMAGroup(p53$oma_group)
group$fingerprint
#> [1] "ACCQRNQ"
nrow(group$members)
#> [1] 88
head(group$members[, c("omaid", "canonicalid", "species.species")])
#> omaid canonicalid species.species
#> 1 DANPL15091 A0A212FJ15 Danaus plexippus
#> 2 CIOIN05889 F6SSG7 Ciona intestinalis
#> 3 CIOSA13478 H2ZGE3 Ciona savignyi
#> 4 CYPCA16027 A0A9J8AFV1 Cyprinus carpio carpio
#> 5 SINGR22121 A0A672QEC3 Sinocyclocheilus grahami
#> 6 LATCH10910 H3B1Z4 Latimeria chalumnae
getLocus() converts the loci of a set of proteins into a GRanges
object:
getLocus(head(group$members, 5))
#> GRanges object with 5 ranges and 0 metadata columns:
#> seqnames ranges strand
#> <Rle> <IRanges> <Rle>
#> DANPL15091 JH381443 88265-93665 -
#> CIOIN05889 3 512921-514180 +
#> CIOSA13478 reftig_1 1939666-1940856 +
#> CYPCA16027 CAJNDQ010000008.1 27949433-27959712 -
#> SINGR22121 LCYQ01S000152.1 689830-716358 +
#> -------
#> seqinfo: 5 sequences from an unspecified genome; no seqlengths
getGenome() lists all genomes in the OMA Browser or retrieves a single
genome.
genome <- getGenome("ASHGO")
genome$species
#> [1] "Ashbya gossypii (strain ATCC 10895 / CBS 109.51 / FGSC 9923 / NRRL Y-1056)"
genome$chromosomes
#> id entry_ranges
#> 1 I c(118562....
#> 2 II c(118566....
#> 3 III c(118570....
#> 4 IV c(118575....
#> 5 MT c(118583....
#> 6 V c(118584....
#> 7 VI c(118592....
#> 8 VII c(118602....
The orthologs between two genomes can be retrieved with getGenomePairs(),
optionally restricted to certain chromosomes and types of orthology.
getSharedAncestry() summarises the number of orthologs between two
genomes.
pairs <- getGenomePairs("YEAST", "ASHGO", chr2 = "I")
table(pairs$rel_type)
#>
#> 1:1 1:n m:1 m:n
#> 293 1 32 3
head(pairs[, c("entry_1.omaid", "entry_2.omaid", "rel_type")])
#> entry_1.omaid entry_2.omaid rel_type
#> 1 YEAST04748 ASHGO00001 1:1
#> 2 YEAST04823 ASHGO00002 1:1
#> 3 YEAST04870 ASHGO00003 1:1
#> 4 YEAST04714 ASHGO00004 1:1
#> 5 YEAST03390 ASHGO00005 1:1
#> 6 YEAST03626 ASHGO00006 1:1
getSharedAncestry("YEAST", "ASHGO")$details
#> species nr_genes nr_orthologs
#> 1 YEAST 6600 5264
#> 2 ASHGO 4757 4417
All responses of the OMA Browser are cached in memory, so repeated queries are fast and do not burden the server. The cache can also be stored on disk to reuse it across R sessions. It is cleared automatically when a new release of the OMA Browser is available.
setOmaCache(persistent = TRUE)
The OMA Browser REST API is documented at https://omabrowser.org/api/docs.
sessionInfo()
#> R version 4.6.1 (2026-06-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.5 LTS
#>
#> Matrix products: default
#> BLAS: /home/biocbuild/bbs-3.24-bioc/R/lib/libRblas.so
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0 LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_GB LC_COLLATE=C
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: America/New_York
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] OmaDB_2.30.0 BiocStyle_2.42.0
#>
#> loaded via a namespace (and not attached):
#> [1] sass_0.5.0 generics_0.1.4 RSQLite_3.53.3
#> [4] lattice_0.23-1 magrittr_2.0.5 digest_0.6.39
#> [7] evaluate_1.0.5 grid_4.6.1 bookdown_0.48
#> [10] GO.db_3.24.0 fastmap_1.2.0 blob_1.3.0
#> [13] jsonlite_2.0.0 ape_5.8-1 AnnotationDbi_1.76.0
#> [16] graph_1.92.0 DBI_1.3.0 BiocManager_1.30.27
#> [19] httr_1.4.9 Biostrings_2.82.0 httr2_1.3.0
#> [22] jquerylib_0.1.4 cli_3.6.6 rlang_1.3.0
#> [25] crayon_1.5.3 XVector_0.54.0 Biobase_2.74.0
#> [28] bit64_4.8.6 cachem_1.1.0 yaml_2.3.12
#> [31] otel_0.3.0 BiocBaseUtils_1.16.0 parallel_4.6.1
#> [34] tools_4.6.1 SparseM_1.84-2 memoise_2.0.1
#> [37] topGO_2.66.0 BiocGenerics_0.60.0 curl_8.2.0
#> [40] vctrs_0.7.3 R6_2.6.1 png_0.1-9
#> [43] matrixStats_1.5.0 stats4_4.6.1 lifecycle_1.0.5
#> [46] KEGGREST_1.54.0 Seqinfo_1.4.0 S4Vectors_0.52.0
#> [49] IRanges_2.48.0 bit_4.6.0 pkgconfig_2.0.3
#> [52] bslib_0.12.0 glue_1.8.1 Rcpp_1.1.2
#> [55] xfun_0.62 GenomicRanges_1.66.0 knitr_1.52
#> [58] nlme_3.1-172 htmltools_0.5.9 rmarkdown_2.32
#> [61] compiler_4.6.1