plot_sparsity: plot_sparsity

View source: R/plot_sparsity.R

plot_sparsityR Documentation

plot_sparsity

Description

plot_sparsity can show the sparsity of an OTU table. It will calculate the prevalence of each OTU in all samples. X-axis is an OTU's prevalence. Y-axis is OTU count.

Usage

plot_sparsity(otu_table, binwidth = NA)

Arguments

otu_table

An OTU table in phyloseq object format. Rownames are sample ID, colnames are taxa.

binwidth

The width of the bins. Can be specified as a numeric value, or a function that calculates width from x. The default is to use bins bins that cover the range of the data. You should always override this value, exploring multiple widths to find the best to illustrate the stories in your data.

Examples

plot_sparsity(dada2_res$seq_tab, 5)

yeguanhuav/visualization416S documentation built on March 22, 2022, 9:03 p.m.