tree_func_plot: tree_func_plot

View source: R/tree_func_plot.R

tree_func_plotR Documentation

tree_func_plot

Description

Plots phylogenetic tree with a heatmap denoting the average occurrence frequency and average tpm of the functions of each taxa.

Usage

tree_func_plot(
  functional_profile,
  sample,
  tree,
  mini_tpm,
  threshold,
  offset,
  width,
  core_col,
  noncore_col,
  low_col,
  high_col,
  hlab,
  ttip,
  tlab,
  hangle,
  hoffset
)

Arguments

functional_profile

a community count data matrix with samples in rows and OTUs/taxa in column,

sample

a sample information data.frame. The rownames must match the sample names in the otu,

tree

a phylogenetic tree. The tip labels must match the otu names in the otu,

mini_tpm

a value indicating whether the function is present,

threshold

a value indicating the final percent increase in beta-diversity,

offset

the offset between each subfigure,

width

the width of each heatmap cell,

core_col

the color of core tips,

noncore_col

the color of non-core tips,

low_col

the lowest color of the heatmap,

high_col

the highest color of the heatmap,

hlab

the font size of the heatmap label,

ttip

the node size of the tree,

tlab

the font size of the tree tip label,

Details

Plots phylogenetic tree with a heatmap denoting the average occurrence frequency and average tpm of the functions of each taxa.

Value

A phylogenetic tree with a heatmap denoting the average occurrence frequency and average tpm of the functions of each taxa with color denoting and core or non-core functional otu.

Examples

 tree_func_plot(functional_profile, sample, tree, mini_tpm=1000, threshold=0.5, offset = 0.1, width = 0.5, core_col = 'deeppink4', noncore_col = 'darkseagreen3', low_col = 'white', high_col = 'lightcoral', hlab = 2, ttip = 2, tlab = 2, hangle = 270, hoffset = -1)

lindan1128/coreMicrobiome documentation built on May 5, 2022, 8:24 p.m.