OmaDB 2.30.0
The OMA Browser organises its genomes in a taxonomy derived from the NCBI
taxonomy. The taxonomic levels of this tree are the levels at which
Hierarchical Orthologous Groups and ancestral genomes are defined. This
vignette shows how to retrieve the taxonomy with OmaDB and how to use it
with the ape package. See the vignette “Get started with
OmaDB” for an introduction to the package.
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("OmaDB")
library(OmaDB)
getTaxonomy() returns the taxonomy in newick format. It can be
restricted to a subtree with the argument root, or to the taxonomy
induced by a set of genomes or taxonomic levels with members:
taxonomy <- getTaxonomy(members = c("YEAST", "ASHGO", "SCHPO", "HUMAN",
"MOUSE", "DROME", "ARATH"))
taxonomy$root_taxon
#> OMA Browser object with 2 attributes:
#> $ name : character Eukaryota
#> $ taxon_id : integer 2759
taxonomy$newick
#> [1] "(\"Arabidopsis thaliana\",(((\"Ashbya gossypii (strain ATCC 10895 / CBS 109.51 / FGSC 9923 / NRRL Y-1056)\",\"Saccharomyces cerevisiae (strain ATCC 204508 / S288c)\")Saccharomycetaceae,\"Schizosaccharomyces pombe (strain 972 / ATCC 24843)\")Ascomycota,(\"Drosophila melanogaster\",(\"Homo sapiens\",\"Mus musculus\")Euarchontoglires)Bilateria)Opisthokonta)Eukaryota;"
With newick = FALSE, the taxonomy is returned as a nested structure that
includes the NCBI taxon ids of all levels:
tax <- getTaxonomy(members = c("YEAST", "ASHGO", "SCHPO"), newick = FALSE)
tax$name
#> [1] "Ascomycota"
tax$children[, c("name", "id")]
#> name id
#> 1 Saccharomycetaceae 4893
#> 2 Schizosaccharomyces pombe (strain 972 / ATCC 24843) 284812
getTree() converts the taxonomy into a phylo object of the
ape package, which can be visualised and analysed with ape
or other packages such as ggtree.
tree <- getTree(taxonomy)
tree
#>
#> Phylogenetic tree with 7 tips and 6 internal nodes.
#>
#> Tip labels:
#> Arabidopsis thaliana, Ashbya gossypii (strain ATCC 10895 / CBS 109.51 / FGSC 9923 / NRRL Y-1056), Saccharomyces cerevisiae (strain ATCC 204508 / S288c), Schizosaccharomyces pombe (strain 972 / ATCC 24843), Drosophila melanogaster, Homo sapiens, ...
#> Node labels:
#> Eukaryota, Opisthokonta, Ascomycota, Saccharomycetaceae, Bilateria, Euarchontoglires
#>
#> Rooted; no branch length.
plot(tree, show.node.label = TRUE, cex = 0.7, no.margin = TRUE,
x.lim = 12)
The internal node labels are the taxonomic levels that can be used in the
other functions of the package, e.g. to retrieve the ancestral genome at a
level with getHOGs():
tree$node.label
#> [1] "Eukaryota" "Opisthokonta" "Ascomycota"
#> [4] "Saccharomycetaceae" "Bilateria" "Euarchontoglires"
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] stats4 stats graphics grDevices utils datasets methods
#> [8] base
#>
#> other attached packages:
#> [1] topGO_2.66.0 SparseM_1.84-2 GO.db_3.24.0
#> [4] AnnotationDbi_1.76.0 IRanges_2.48.0 S4Vectors_0.52.0
#> [7] Biobase_2.74.0 graph_1.92.0 BiocGenerics_0.60.0
#> [10] generics_0.1.4 OmaDB_2.30.0 BiocStyle_2.42.0
#>
#> loaded via a namespace (and not attached):
#> [1] sass_0.5.0 RSQLite_3.53.3 lattice_0.23-1
#> [4] magrittr_2.0.5 digest_0.6.39 evaluate_1.0.5
#> [7] grid_4.6.1 bookdown_0.48 fastmap_1.2.0
#> [10] blob_1.3.0 jsonlite_2.0.0 ape_5.8-1
#> [13] DBI_1.3.0 tinytex_0.61 BiocManager_1.30.27
#> [16] httr_1.4.9 Biostrings_2.82.0 httr2_1.3.0
#> [19] jquerylib_0.1.4 cli_3.6.6 rlang_1.3.0
#> [22] crayon_1.5.3 XVector_0.54.0 bit64_4.8.6
#> [25] cachem_1.1.0 yaml_2.3.12 otel_0.3.0
#> [28] BiocBaseUtils_1.16.0 parallel_4.6.1 tools_4.6.1
#> [31] memoise_2.0.1 curl_8.2.0 vctrs_0.7.3
#> [34] R6_2.6.1 png_0.1-9 magick_2.9.1
#> [37] matrixStats_1.5.0 lifecycle_1.0.5 KEGGREST_1.54.0
#> [40] Seqinfo_1.4.0 bit_4.6.0 pkgconfig_2.0.3
#> [43] bslib_0.12.0 glue_1.8.1 Rcpp_1.1.2
#> [46] xfun_0.62 GenomicRanges_1.66.0 knitr_1.52
#> [49] igraph_2.3.4 nlme_3.1-172 htmltools_0.5.9
#> [52] rmarkdown_2.32 compiler_4.6.1