gbresolve | R Documentation |
working with NCBI taxonomy
gbresolve(x, rank="phylum", within="", ncores=1, ...)
gbcontain(x, rank="species", within="", ncores=1,...)
x |
a phylogenetic tree of class 'phylo' ( |
rank |
a Linnaean rank to restrict taxonomic resolution |
within |
a character string representing a group within which to resolve query |
ncores |
number of cores to use. |
... |
additional arguments to be passed to the taxdump constructor ( |
The functions access the NCBI taxonomy resource (https://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/; see also ncbit
).
gbresolve
resolves the taxonomic hierarchy for queried taxa up to the given rank
(or between the given rank
s if two are given),
and gbcontain
resolves all taxa found within a given queried group and occurring at a specified rank
. The rank
must be found
within the object Linnaean
(see Examples). The argument within
can restrict the group within which to conduct the search
(see Examples).
The local copy of the taxonomy resource (accessible in with data(ncbi)
from ncbit) can be updated with a call to ncbit(update=TRUE)
.
Setting the ncores
argument to NULL
will use all available cores.
JM Eastman
## call up NCBI taxonomy
ncbi=ncbit::ncbit(update=FALSE)
## possible ranks
print(Linnaean)
## resolve taxa
gbresolve(c("Ambystoma_laterale", "Dicamptodon_copei"))
gbresolve("Andrias japonicus")
## resolve taxa found in tree
sal=get(data(caudata))
x=gbresolve(sal$phy, rank=c("genus", "order"))
plot(x$phy, show.node=TRUE, type="f", show.tip=FALSE, cex=0.3)
## find all genera within salamanders
gbcontain("caudata", rank="genus")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.