Skip to contents

[Experimental]

Usage

plot_guild_pq(physeq, levels_order = NULL, clean_pq = TRUE, ...)

Arguments

physeq

(required): a phyloseq-class object obtained using the phyloseq package.

levels_order

(Default NULL) A character vector to reorder the levels of guild. See examples.

clean_pq

(logical, default TRUE): Does the phyloseq object is cleaned using the clean_pq() function?

...

Other params for be passed on to clean_pq() function

Value

A ggplot2 object

Author

Adrien Taudière

Examples

# \donttest{
if (requireNamespace("httr")) {
  d_fung_mini <- add_funguild_info(data_fungi_mini,
    taxLevels = c(
      "Domain",
      "Phylum",
      "Class",
      "Order",
      "Family",
      "Genus",
      "Species"
    )
  )
  sort(table(d_fung_mini@tax_table[, "guild"]), decreasing = TRUE)

  p <- plot_guild_pq(d_fung_mini)
  if (requireNamespace("patchwork")) {
    (plot_guild_pq(subset_samples(d_fung_mini, Height == "Low"),
      levels_order = p$data$Guild[order(p$data$nb_seq)]
    ) + theme(legend.position = "none")) +
      (plot_guild_pq(subset_samples(d_fung_mini, Height == "High"),
        levels_order = p$data$Guild[order(p$data$nb_seq)]
      ) + ylab("") + theme(axis.text.y = element_blank()))
  }
}
#> Cleaning suppress 0 taxa and 0 samples.
#> Cleaning suppress 11 taxa and 0 samples.
#> Cleaning suppress 11 taxa and 0 samples.

# }