calour.plotting.plot_abund_prevalence

calour.plotting.plot_abund_prevalence(exp: calour.experiment.Experiment, field, log=True, min_abund=0.01, alpha=0.5, linewidth=0.7, ax=None)[source]

Plot abundance against prevalence.

Prevalence/abundance curve is a chart used to visualize the prevalence of OTUs. For each OTU, a curve was constructed measuring the percentage of a population that carries the OTU above a given abundance (normalized over the total abundance of the OTU). A steep curve indicates this OTU is shared prevalently among the population. If many OTUs show in steep curves, it indicates the population has a core set of microbes.

Y-axis: prevalence of the OTU that above the abundance threshold.

X-axis: abundance threshold.

As an example of this type of plot, please see Fig 1D in Clemente, J. C. et al. The microbiome of uncontacted Amerindians. Science Advances 1, e1500183 (2015).

Warning

This function is still less tested.

Note

This function is also available as a class method Experiment.plot_abund_prevalence()

Parameters:
  • exp (Experiment) – Input experiment object.
  • field (str) – sample metadata field to group samples
  • log (bool) – whether to plot abundance in log scale
  • min_abund (numeric) – the min abundance. features with mean abundance less than min_abund in the each sample group will be not considered
  • ax (matplotlib.axes.Axes, optional) – Axes object to draw the plot onto, otherwise uses the current Axes.
Returns:

The Axes object containing the plot.

Return type:

matplotlib.axes.Axes