Description Usage Arguments Value Author(s) References Examples
This function derives the full lineage of a taxon ID number from a given taxonomy database.
1 | get_lineage(taxIDs, db, simplify = TRUE, numbers = FALSE, cores = 1)
|
taxIDs |
integer or vector of integers giving the taxonomic ID number(s). |
db |
a taxonomy database (a data.frame object).
See |
simplify |
logical indicating whether a single lineage derived from a length-one input should be simplified from a list to a named character vector. Defaults to TRUE. |
numbers |
logical indicating whether the output string(s) should be comprised of the taxonomic ID numbers rather than taxon names. Defaults to FALSE. |
cores |
integer giving the number of processors for multithreading (Defaults to 1).
This argument may alternatively be a 'cluster' object,
in which case it is the user's responsibility to close the socket
connection at the conclusion of the operation,
for example by running |
the full lineage as a named character vector, or list of named character vectors if the length of the input object is > 1 or simplify = FALSE. "names" attributes are taxonomic ranks.
Shaun Wilkinson
Federhen S (2012) The NCBI Taxonomy database. Nucleic Acids Research 40, D136-D143. doi:10.1093/nar/gkr1178.
https://www.ncbi.nlm.nih.gov/taxonomy/
1 2 3 4 | data(whales)
data(whale_taxonomy)
taxIDs <- as.integer(gsub(".+\\|", "", names(whales)[1:2]))
get_lineage(taxIDs, db = whale_taxonomy)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.