Skip to contents

[Experimental]

A wrapper for the adespatial::beta.div() function in the case of physeq object.

Usage

plot_SCBD_pq(
  physeq,
  tax_level = "ASV",
  tax_col = "Order",
  min_SCBD = 0.01,
  ...
)

Arguments

physeq

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

tax_level

Taxonomic level to used in y axis

tax_col

Taxonomic level to colored points

min_SCBD

(default 0.01) the minimum SCBD value to plot the taxa

...

Others arguments passed on to adespatial::beta.div() function

Value

A ggplot2 object build with the package patchwork

Details

This function is mainly a wrapper of the work of others. Please make a reference to vegan::beta.div() if you use this function.

Author

Adrien Taudière

Examples

data(data_fungi)
if (requireNamespace("adespatial")) {
  plot_SCBD_pq(data_fungi) +
    geom_text(aes(label = paste(Genus, Species)), hjust = 1, vjust = 2) +
    xlim(c(0, NA))
}

# \donttest{
if (requireNamespace("adespatial")) {
  plot_SCBD_pq(data_fungi, tax_level = "Class", tax_col = "Phylum", min_SCBD = 0) +
    geom_jitter()
}

# }