pf.heatmap: Heatmap for phylofactor data

View source: R/pf.heatmap.R

pf.heatmapR Documentation

Heatmap for phylofactor data

Description

Heatmap for phylofactor data

Usage

pf.heatmap(PF = NULL, tree = NULL, Data = NULL, factors = NULL,
  column.order = NULL, branch.length = "none", color = NA,
  font.size = 0, ...)

Arguments

PF

phylofactor class object from either PhyloFactor or gpf with algorithm='mStable'

tree

optional input, only used if PF is not input. If inputting tree, must also input Data

Data

Dataset with rows equal to the number of species. Ideally, rownames are all equal to PF$tree of tree tip-labels. Otherwise, rows must be in order of tree tip-labels.

factors

vector of integer factors for input with PF. Will use pf.tree to highlight clades obtained at each factor.

column.order

vector of integers of length equal to ncol(Data) or ncol(PF$Data). Will re-order the data (e.g. according to desired meta-data).

branch.length

input for ggtree

color

input color for gheatmap

font.size

font size for gheatmap

...

additional arguments passed to gheatmap

Examples

library(phylofactor)
require(ggpubr)
data(FTmicrobiome)
PF <- FTmicrobiome$PF
obs <- PF$transform.fcn(PF$Data)
pred <- predict(PF,factor=3)
observed <- pf.heatmap(PF,Data=obs,factors=1:3,width=3)
predicted <- pf.heatmap(PF,Data=pred,factors=1:3,width=3)
ggarrange(observed,predicted,nrow=2)

reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.