lefserPlotClad: LEfSer plot cladogram

View source: R/lefserPlotClad.R

lefserPlotCladR Documentation

LEfSer plot cladogram

Description

lefserPlotClad plots a cladogram from the results of lefserClades.

Usage

lefserPlotClad(df, colors = "c", showTipLabels = FALSE, showNodeLabels = "p")

Arguments

df

An object of class "lefesr_df_clades".

colors

Colors corresponding to class 0 and 1. Options: "c" (colorblind), "l" (lefse), "g" (greyscale). Defaults to "c". This argument also accepts a character(2) with two color names.

showTipLabels

Logical. If TRUE, show tip labels. Default is FALSE.

showNodeLabels

Label's to be shown in the tree. Options: "p" = phylum, "c" = class, "o" = order, "f" = family, "g" = genus, "s" = species, "t" = strain. It can accept several options, e.g., c("p", "c").

Value

A ggtree object.

Examples

data("zeller14")
z14 <- zeller14[, zeller14$study_condition != "adenoma"]
tn <- get_terminal_nodes(rownames(z14))
z14tn <- z14[tn, ]
z14tn_ra <- relativeAb(z14tn)
z14_input <- rowNames2RowData(z14tn_ra)

resCl <- lefserClades(relab = z14_input, classCol = "study_condition")
ggt <- lefserPlotClad(df = resCl)

waldronlab/lefser documentation built on Nov. 1, 2024, 9:02 p.m.