createRootedTree: Create rooted tree from a taxonomy matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/parsePhylotree.R

Description

Create rooted tree from a taxonomy matrix

Usage

1
createRootedTree(df, rootTaxon = NULL)

Arguments

df

data frame contains taxonomy matrix used for generating tree (see distDf in example)

rootTaxon

taxon used for rooting the taxonomy tree

Value

A rooted taxonomy tree as an object of class "phylo".

Author(s)

Vinh Tran tran@bio.uni-frankfurt.de

See Also

taxa2dist for distance matrix generation from a taxonomy matrix, getTaxonomyMatrix for getting taxonomy matrix, ppTaxonomyMatrix for a demo taxonomy matrix data

Examples

1
2
3
4
5
6
7
data("ppTaxonomyMatrix", package = "PhyloProfile")
# prepare matrix for calculating distances
distDf <- subset(ppTaxonomyMatrix, select = -c(ncbiID, fullName))
row.names(distDf) <- distDf$abbrName
distDf <- distDf[, -1]
# create taxonomy tree rooted by ncbi10090
createRootedTree(distDf, "ncbi10090")

PhyloProfile documentation built on March 27, 2021, 6:01 p.m.