-
Notifications
You must be signed in to change notification settings - Fork 7
/
README.Rmd
100 lines (73 loc) · 4.34 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
output: github_document
editor_options:
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
taxizedb
========
```{r echo=FALSE}
knitr::opts_chunk$set(
warning = FALSE,
message = FALSE,
collapse = TRUE,
comment = "#>"
)
```
[![status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![cran checks](https://badges.cranchecks.info/worst/taxizedb.svg)](https://badges.cranchecks.info/worst/taxizedb.svg)
[![R-check](https://github.com/ropensci/taxizedb/workflows/R-check/badge.svg)](https://github.com/ropensci/taxizedb/actions)
[![codecov](https://codecov.io/gh/ropensci/taxizedb/branch/master/graph/badge.svg)](https://app.codecov.io/gh/ropensci/taxizedb)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/taxizedb)](https://github.com/r-hub/cranlogs.app)
[![Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/taxizedb?color=blue)](https://cran.r-project.org/package=taxizedb)
[![cran version](https://www.r-pkg.org/badges/version/taxizedb)](https://cran.r-project.org/package=taxizedb)
[![DOI](https://zenodo.org/badge/53961466.svg)](https://zenodo.org/badge/latestdoi/53961466)
`taxizedb` - Tools for Working with Taxonomic Databases
Docs: <https://docs.ropensci.org/taxizedb/>
`taxizedb` is an R package for interacting with taxonomic databases. Its functionality can be divided in two parts: 1. You can download the databases to your platform 2. You can query the downloaded databases to retrieve taxonomic information.
This two step approach is different from tools which interact with web services for each query, and has a number of advantages:
* Once you download a database you can work with it offline
* Once you download a database querying it is super fast
* As long as you store your database files all the queries in your analysis will be fully reproducible
## Data sources
When you download a database with `taxizedb` it will automatically convert it to SQLite and then all query functions will interact with this SQLite database. However, not all taxonomic databases are publicly available, or can be converted to SQLite. The following databases are supported:
- [NCBI Taxonomy](https://www.ncbi.nlm.nih.gov/taxonomy)
- [ITIS](https://itis.gov/)
- [The Plant List (TPL)](http://www.theplantlist.org/) - Note that The Plant List has been superseded by World Flora Online.
- [World Flora Online (WFO)](http://www.worldfloraonline.org/)
- [Catalogue of Life (COL)](https://www.catalogueoflife.org/)
- [Global Biodiversity Information Facility (GBIF)](https://www.gbif.org/)
- [Wikidata](https://zenodo.org/records/1213477)
Get in touch [in the issues](https://github.com/ropensci/taxizedb/issues) with
any ideas on new data sources.
## Package API
This package for each data sources performs the following tasks:
* Downloaded taxonomic databases `db_download_*`
* Create `dplyr` SQL backend via `dbplyr::src_dbi` - `src_*`
* Query and get data back into a data.frame - `sql_collect`
* Manage cached database files - `tdb_cache`
* Retrieve immediate descendents of a taxon - `children`
* Retrieve the taxonomic hierarchies from local database - `classification`
* Retrieve all taxa descending from a vector of taxa - `downstream`
* Convert species names to taxon IDs - `name2taxid`
* Convert taxon IDs to species names - `taxid2name`
* Convert taxon IDs to ranks - `taxid2rank`
You can use the `src` connections with `dplyr`, etc. to do operations downstream. Or use the database connection to do raw SQL queries.
## Installation
CRAN version
```{r eval=FALSE}
install.packages("taxizedb")
```
dev version
```{r eval=FALSE}
remotes::install_github("ropensci/taxizedb")
```
## Citation
To cite taxizedb in publications use:
* Chamberlain S, Arendsee Z, Stirling T (2023). taxizedb: Tools for Working with 'Taxonomic' Databases. R package version 0.3.1. <https://doi.org/10.5281/zenodo.1158055>
## Meta
* Please [report any issues, bugs or feature requests](https://github.com/ropensci/taxizedb/issues).
* License: MIT
* Get citation information for `taxizedb` in R with `citation(package = 'taxizedb')`
* Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct). By contributing to this project, you agree to abide by its terms.
[![ropensci](https://ropensci.org/public_images/github_footer.png)](https://ropensci.org)