normalize_prop_pq: Normalize OTU table using samples depth

View source: R/dada_phyloseq.R

normalize_prop_pqR Documentation

Normalize OTU table using samples depth

Description

lifecycle-experimental

This function implement the method proposed by McKnight et al. 2018 (\Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.5061/dryad.tn8qs35")})

Usage

normalize_prop_pq(physeq, base_log = 2, constante = 10000, digits = 4)

Arguments

physeq

(required): a phyloseq-class object obtained using the phyloseq package.

base_log

(integer, default 2) the base for log-transformation. If set to NULL or NA, no log-transformation is compute after normalization.

constante

a constante to multiply the otu_table values

digits

(default = 2) integer indicating the number of decimal places to be used (see ?round for more information)

Value

A new phyloseq-class object with otu_table count normalize and log transformed (if base_log is an integer)

Author(s)

Adrien Taudière

Examples

taxa_sums(data_fungi_mini)
data_f_norm <- normalize_prop_pq(data_fungi_mini)
taxa_sums(data_f_norm)
ggplot(data.frame(
  "norm" = scale(taxa_sums(data_f_norm)),
  "raw" = scale(taxa_sums(data_fungi_mini)),
  "name_otu" = taxa_names(data_f_norm)
)) +
  geom_point(aes(x = raw, y = norm))

data_f_norm <- normalize_prop_pq(data_fungi_mini, base_log = NULL)

adrientaudiere/MiscMetabar documentation built on Oct. 13, 2024, 9:42 p.m.