NCBI taxonomy

Share:

Description

working with NCBI taxonomy

Usage

1
2
	gbresolve(x, rank="phylum", within="", ncores=1, ...)
	gbcontain(x, rank="species", within="", ncores=1,...)

Arguments

x

a phylogenetic tree of class 'phylo' (gbresolve.phylo), or a string vector (gbresolve), or a single string (gbcontain)

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 (ncbit)

Details

The functions access the NCBI taxonomy resource (http://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 ranks 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.

Author(s)

JM Eastman

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.