ps_euler: Make Euler diagram of shared taxa (ASVs, OTUs) across sample...

View source: R/ps_euler.R

ps_eulerR Documentation

Make Euler diagram of shared taxa (ASVs, OTUs) across sample groups

Description

Make Euler diagram of shared taxa (ASVs, OTUs) across sample groups from a phyloseq object. Overlap can be weighted by relative abundance

Usage

ps_euler(
  ps,
  group,
  fraction = 0,
  shape = "circle",
  weight = FALSE,
  relative = TRUE,
  plot = TRUE,
  ...
)

Arguments

ps

A phyloseq object

group

The grouping factor. Should match variable in sample_data(ps)

fraction

The fraction (0 to 1) of samples in a group in which the taxa should be present to be included in the count.

shape

Shape of the plot "circle" or "ellipse"?

weight

If TRUE, the overlaps are weighted by abundance

relative

Should abundances be made relative

plot

If TRUE return a plot, if FALSE return a list with shared and unique taxa

...

Additional arguments

Details

Any further arguments to this function are passed to the plot.euler function from the eulerr package. This can be used to change colors, fonts, and other graphical parameters. For example: ps_euler(phy, "Time", quantities = list(type=c("percent","counts"), font = 2), labels = list(cex = 2), col = "red", fill = c("red","blue","green"))

Value

An euler plot


Russel88/MicEco documentation built on Nov. 24, 2022, 2:33 a.m.