Normalizes count data in a phyloseq object, first by adding a pseudocount (+1), then transforming to relative abundances, then by normalizes via the Box-Cox transformation in the car
package.
normalize_for_heritability(ps, covariates = c(), normalization_plots = FALSE, verbose = TRUE)
ps | A |
---|---|
covariates | A vector of covariates found in |
normalization_plots | Logical. If TRUE, creates a directory and saves plots of ASV distributions pre- and post-normalization. Defaults to FALSE. |
verbose | Logical. If FALSE, messages will be supressed. |
This function returns the input phyloseq
object with the otu_table()
counts normalized.
ps <- normalize_for_heritability(ps, covariates = c("Plate", "Age", "Sex"), normalization_plots = TRUE)#> Error in normalize_for_heritability(ps, covariates = c("Plate", "Age", "Sex"), normalization_plots = TRUE): object 'ps' not found