createRootedTree {PhyloProfile}R Documentation

Create rooted tree from a taxonomy matrix

Description

Create rooted tree from a taxonomy matrix

Usage

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

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")

[Package PhyloProfile version 1.8.1 Index]