Generates a rank abundance curve (rank abundance vs cumulative read abundance), optionally with standard deviation from mean intervals.

amp_rankabundance(data, group_by, showSD = TRUE, log10_x = TRUE)

amp_rank_abundance(data, group_by, showSD = TRUE, log10_x = TRUE)

Arguments

data

(required) Data list as loaded with amp_load.

group_by

(required) Group the samples by a variable in the metadata.

showSD

Show standard deviation from mean or not. (default: TRUE)

log10_x

Log10-transform the x-axis or not. Often most variation is observed among the most abundant OTU's, log10-transforming the x-axis will highlight this better. (default: TRUE)

Value

A ggplot2 object.

Details

Currently only OTU level is supported.

See also

Author

Kasper Skytte Andersen ksa@bio.aau.dk

Mads Albertsen MadsAlbertsen85@gmail.com

Examples

# Load example data
data("AalborgWWTPs")

# Rank abundance plot
amp_rankabundance(AalborgWWTPs, group_by = "Plant", showSD = TRUE, log10_x = TRUE)
#> Warning: Removed 1422 rows containing missing values or values outside the scale range
#> (`geom_line()`).