MyNixOS website logo
Description

Create Custom Taxonomies Based on the NCBI Taxonomy and GBIF Backbone Taxonomy.

The NCBI taxonomy is a popular resource for taxonomic studies but it only contains data on species with sequence data whereas the GBIF has a more extensive coverage of extinct species. Taxonbridge is useful for the creation and analysis of custom taxonomies based on the NCBI taxonomy and GBIF backbone taxonomy.

taxonbridge

R-CMD-check badge CRAN Status CRAN Downloads

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 taxonbridgedocumentation 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

Metadata

Version

1.2.2

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows