plot_sparsity: plot_sparsity

Description Usage Arguments Examples

View source: R/plot_sparsity.R

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

1
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

1
plot_sparsity(dada2_res$seq_tab, 5)

yeguanhuav/visual16S documentation built on Feb. 19, 2022, 10:32 a.m.