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)
(required) Data list as loaded with amp_load
.
(required) Group the samples by a variable in the metadata.
Show standard deviation from mean or not. (default: TRUE
)
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
)
A ggplot2 object.
Currently only OTU level is supported.
# 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()`).