classifyPlacements: Taxonomic classification by phylogenetic placement.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/placeTools.R

Description

Given taxonomic information from a reference package and inter-node distances from a reference tree, perform classification of one or more placements provided by pplacer.

Usage

1
2
classifyPlacements(taxdata, treedists, placetab, ...,
    verbose = FALSE, debug = FALSE)

Arguments

taxdata

data.frame, output of taxonomyFromRefpkg

treedists

output of treeDists

placetab

a data.frame with columns at, edge, and branch

...

extra arguments passed to classifyIter

verbose

writes progress messages to terminal if TRUE

debug

be very verbose if TRUE

Value

The output is a data.frame describing the taxonomic assignment, along with a description of the confidence of the classification. See the man page for classify for details on the output.

Author(s)

Noah Hoffman

See Also

treeDists, taxonomyFromRefpkg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
placefile <- system.file('extdata', 'merged.json', package='clstutils')
distfile <- system.file('extdata', 'merged.distmat.bz2', package='clstutils')
refpkgz <- system.file('extdata', 'vaginal_16s.refpkg.tar.gz', package='clstutils')

tmpdir <- tempdir()

orig.dir <- getwd()
setwd(tmpdir)
system(paste("tar --no-same-owner -xzf", refpkgz))
setwd(orig.dir)


refpkg <- file.path(tmpdir, "vaginal_16s.refpkg")

treedists <- treeDists(distfile=distfile, placefile=placefile)
taxdata <- taxonomyFromRefpkg(refpkg, seqnames=rownames(treedists$dmat), lowest_rank="species")
placetab <- data.frame(at=49, edge=5.14909e-07, branch=5.14909e-07)
result <- classifyPlacements(taxdata, treedists, placetab)
result

clstutils documentation built on Nov. 8, 2020, 5:23 p.m.