Compute taxonomic tree from taxonomic table.
taxtree(table, collapse = TRUE, lineage_length = 1, root = "")
dataframe.
logical. Should node with one child be vanished? Default to TRUE.
double. Lineage length from the root to the leaves. Default to 1.
character. Name of the root if there is no natural root.
A phylo object.
lineage1 <- "k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae"
lineage2 <- "k__Bacteria|p__Firmicutes|c__Clostridia"
lineage3 <- "k__Bacteria|p__Firmicutes|c__Bacilli"
table <- taxtable(c(lineage1, lineage2, lineage3))
taxtree(table)
#>
#> Phylogenetic tree with 3 tips and 2 internal nodes.
#>
#> Tip labels:
#> Verrucomicrobiae, Clostridia, Bacilli
#> Node labels:
#> Bacteria, Firmicutes
#>
#> Rooted; includes branch lengths.