lefserPlotClad
plots a cladogram from the results of
lefserClades
.
lefserPlotClad(df, colors = "c", showTipLabels = FALSE, showNodeLabels = "p")
An object of class "lefesr_df_clades".
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.
Logical. If TRUE, show tip labels. Default is FALSE.
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").
A ggtree object.
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")
#> 18 features don't have species information.
#> 96 features don't have strain information.
#> Dropped 96 features without full taxonomy information.
#> lefser will be run at the kingdom, phylum, class, order, family, genus, species, strain level.
#>
#> >>>> Running lefser at the kingdom level. <<<<
#> The outcome variable is specified as 'study_condition' and the reference category is 'CRC'.
#> See `?factor` or `?relevel` to change the reference category.
#>
#> >>>> Running lefser at the phylum level. <<<<
#> The outcome variable is specified as 'study_condition' and the reference category is 'CRC'.
#> See `?factor` or `?relevel` to change the reference category.
#>
#> >>>> Running lefser at the class level. <<<<
#> The outcome variable is specified as 'study_condition' and the reference category is 'CRC'.
#> See `?factor` or `?relevel` to change the reference category.
#>
#> >>>> Running lefser at the order level. <<<<
#> The outcome variable is specified as 'study_condition' and the reference category is 'CRC'.
#> See `?factor` or `?relevel` to change the reference category.
#>
#> >>>> Running lefser at the family level. <<<<
#> The outcome variable is specified as 'study_condition' and the reference category is 'CRC'.
#> See `?factor` or `?relevel` to change the reference category.
#>
#> >>>> Running lefser at the genus level. <<<<
#> The outcome variable is specified as 'study_condition' and the reference category is 'CRC'.
#> See `?factor` or `?relevel` to change the reference category.
#>
#> >>>> Running lefser at the species level. <<<<
#> The outcome variable is specified as 'study_condition' and the reference category is 'CRC'.
#> See `?factor` or `?relevel` to change the reference category.
#>
#> >>>> Running lefser at the strain level. <<<<
#> The outcome variable is specified as 'study_condition' and the reference category is 'CRC'.
#> See `?factor` or `?relevel` to change the reference category.
ggt <- lefserPlotClad(df = resCl)
#> Using palette: colorblind