| taxonomyFromRefpkg {clstutils} | R Documentation |
Construct a data.frame providing the lineage of each sequence represented in the reference package.
taxonomyFromRefpkg(path, seqnames, lowest_rank = NA)
path |
path to a refpkg directory |
seqnames |
optional character vector of sequence names. If
provided, determines the order of rows in |
lowest_rank |
name of the most specific (ie, rightmost) rank to
include. Default is the name of the rightmost column in
|
A list with the following elements:
taxNames |
a named character vector of taxonomic names (names are tax_ids) |
taxTab |
a |
Noah Hoffman
The decsription and specification for a reference package can be found in the project repository in github: https://github.com/fhcrc/taxtastic
Scripts and tools for creating reference packages are provided in the
python package taxonomy, also available from the taxtastic
project site.
archive <- 'vaginal_16s.refpkg.tar.gz'
destdir <- tempdir()
system(gettextf('tar -xzf %s --directory="%s"',
system.file('extdata',archive,package='clstutils'),
destdir))
refpkg <- file.path(destdir, sub('.tar.gz','',archive))
reftax <- taxonomyFromRefpkg(refpkg)
str(reftax)