taxonbridge

Biological taxonomies establish conventions by which researchers can catalogue and systematically compare their work using nomenclature such as numeric identifiers and binomial names. The ideal taxonomy is unambiguous and exhaustive; however, no perfect taxonomy exists. The degree to which a taxonomy is useful to a researcher depends on context provided by, for example, the taxonomic neighborhood of a species or the geological timeframe of the study. Collating the most relevant taxonomic information from multiple taxonomies is hampered by arbitrary assignment of numeric identifiers by database administrators, ambiguity in scientific names, and duplication. The NCBI is the go-to resource for many scientists, but its taxonomy only includes data on species with sequence data. In contrast, the Global Biodiversity Information Facility (GBIF) backbone taxonomy references a more extensive list of extinct and extant species, and it is integrated with 100 other taxonomic databases. Unfortunately, the GBIF backbone taxonomy excludes the NCBI taxonomy. Since the NCBI and GBIF use different numeric identifiers, it is easy to imagine how using scientific names could lead to errors when mapping from one taxonomy to the other. As a case in point, additional lineage information could be used to validate mapping by recursively comparing parental taxon names. The goal of taxonbridge is hence to provide a set of tools for merging the GBIF backbone and NCBI taxonomies in order to derive a consistent, deduplicated and disambiguated custom taxonomy for any given study. See the data provenance flow diagram and scientific poster for more details.

Installation

CRAN version:

To install taxonbridge from CRAN type:

install.packages("taxonbridge")
library(taxonbridge)

Note that the version on CRAN might not reflect the most recent changes made to the development version of taxonbridge.

Development version:

You can install the development version of taxonbridge with devtools:

install.packages(c("devtools", "rmarkdown"))
devtools::install_github("MoultDB/taxonbridge", build_vignettes = TRUE)
library(taxonbridge)

taxonbridge can be also be updated/re-installed/overwritten with either of the preceding installation options.

Available methods and how to use them

See the taxonbridge documentation for detailed descriptions of the available methods and see the workflow for how to use the methods. Custom taxonomies in taxonbridge always have the following 29 columns. All columns have the character data type. Column names with links are GBIF column names that are also Darwin Core controlled vocabulary terms.

Column nameDescription
taxonIDGBIF identifier
canonicalNameGBIF/NCBI scientific name
taxonRankGBIF rank
parentNameUsageIDGBIF parent ID
acceptedNameUsageIDGBIF accepted ID
originalNameUsageIDGBIF original ID
taxonomicStatusGBIF taxonomic status
kingdomGBIF kingdom name
phylumGBIF phylum name
classGBIF class name
orderGBIF order name
familyGBIF family name
genericNameGBIF genus name
specificEpithetGBIF species name
infraspecificEpithetGBIF subspecies name
from_GBIFGBIF provenance indicator
ncbi_idNCBI identifier
ncbi_lineage_namesNCBI full lineage names
ncbi_lineage_idsNCBI full lineage IDs
ncbi_rankNCBI rank
ncbi_lineage_ranksNCBI full lineage ranks
ncbi_kingdomNCBI kingdom name
ncbi_phylumNCBI phylum name
ncbi_classNCBI class name
ncbi_orderNCBI order name
ncbi_familyNCBI family name
ncbi_genusNCBI genus name
ncbi_speciesNCBI species name
from_NCBINCBI provenance indicator

Examples

A 2000 row example subset of a previously merged taxonomy is bundled with taxonbridge and can be loaded as follow:

library(taxonbridge)
example_1 <- load_sample()

Want to try more than a sample? Download a larger dataset and load it as follow:

library(taxonbridge)
example_2 <- load_population("path/to/downloaded/dataset")

You can also prepare a dataset yourself which requires the use of external data and software. The most current NCBI and GBIF taxonomic data can be downloaded as follow:

download_gbif()
download_ncbi()

Once the downloads are complete, the paths to the downloaded files will be reported to your terminal. A single file is downloaded from the GBIF (Taxon.tsv) while four files are downloaded from the NCBI (nodes.dmp, names.dmp, delnodes.dmp and merged.dmp). Take note of the location of these files. The NCBI files require further parsing with Taxonkit. Read the download_ncbi() documentation for instructions on how to parse the NCBI files.

Downloading the GBIF and NCBI taxonomic data, parsing the NCBI files, and merging the taxonomies can easily be carried out in one command if Taxonkit is already installed on your system:

library(taxonbridge)
custom_taxonomy <- load_taxonomies(download_gbif(), download_ncbi(taxonkitpath = "/path/to/taxonkit"))

See the workflow and vignette for more ideas on what to do with loaded data in taxonbridge.

References

Global Biodiversity Information Facility (GBIF) backbone taxonomy

National Center for Biotechnology Information (NCBI) taxonomy

Citation

To cite taxonbridge in publications use:

Veldsman WP, Campli G, Dind S, Rech de Laval V, Drage HB, Waterhouse RM and Robinson-Rechavi M (2022) Taxonbridge: an R package to create custom taxonomies based on the NCBI and GBIF taxonomies, bioRxiv, 490269. DOI: https://doi.org/10.1101/2022.05.02.490269

Copy Link

Version

Down Chevron

Install

install.packages('taxonbridge')

Monthly Downloads

285

Version

1.2.2

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

July 4th, 2022