plot_onTree: Visualization on the tree

View source: R/plot_onTree.R

plot_onTreeR Documentation

Visualization on the tree

Description

The results of TASSO and TreeFusedlasso vasualized on the tree.

Usage

plot_onTree(
  results,
  tree,
  model = "TASSO",
  IC = "BIC",
  tree.type = "fan",
  color = "darkred"
)

Arguments

results

results from TASSO or TreeFusedlasso.

tree

the phylogenetic tree.

model

indicate the model used.

IC

IC = BIC for Bayesian information criterion and IC = AIC for Akaike's information criterion.

tree.type

a character string specifying the type of phylogeny to be drawn; it must be one of "phylogram" (the default), "cladogram", "fan", "unrooted", "radial" or any unambiguous abbreviation of these.

color

the colours used for the tip labels or choosed pattern.

Value

A ggplot object.

Examples

library(phyloseq)
otu.tab <- t(otu_table(combo.phyloseq.obj))
eBay.comps <- eBay_comps(otu.tab, prior = "Dirichlet")
tree <- phy_tree(combo.phyloseq.obj)
metadata <- sample_data(combo.phyloseq.obj)
y <- metadata$bmi
fit_tasso <- TASSO(y, eBay.comps, tree)
plot_onTree(fit_tasso, tree)

fit_tflasso1 <- TreeFusedlasso(y, eBay.comps, tree)
plot_onTree(fit_tflasso1, tree, model='TreeFusedlasso')

liudoubletian/phyloMDA documentation built on April 28, 2022, 6:51 p.m.