working with NCBI taxonomy
gbresolve(x, rank="phylum", within="", ncores=1, ...) gbcontain(x, rank="species", within="", ncores=1,...)
a phylogenetic tree of class 'phylo' (
a Linnaean rank to restrict taxonomic resolution
a character string representing a group within which to resolve query
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
gbresolve resolves the taxonomic hierarchy for queried taxa up to the given
rank (or between the given
ranks if two are given),
gbcontain resolves all taxa found within a given queried group and occurring at a specified
rank must be found
within the object
Linnaean (see Examples). The argument
within can restrict the group within which to conduct the search
The local copy of the taxonomy resource (accessible in with
data(ncbi) from ncbit) can be updated with a call to
ncores argument to
NULL will use all available cores.
## 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.