subset_taxa_tax_control: Subset taxa using a taxa control or distribution based method

View source: R/controls.R

subset_taxa_tax_controlR Documentation

Subset taxa using a taxa control or distribution based method

Description

lifecycle-experimental

There is 3 main methods : discard taxa (i) using a control taxa (e.g. truffle root tips), (ii) using a mixture models to detect bimodality in pseudo-abundance distribution or (iii) using a minimum difference threshold pseudo-abundance. Each cutoff is defined at the sample level.

Usage

subset_taxa_tax_control(
  physeq,
  taxa_distri,
  method = "mean",
  min_diff_for_cutoff = NULL
)

Arguments

physeq

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

taxa_distri

(required) a vector of length equal to the number of samples with the number of sequences per sample for the taxa control

method

(default: "mean") a method to calculate the cut-off value. There are 6 available methods:

  1. cutoff_seq: discard taxa with less than the number of sequence than taxa control,

  2. cutoff_mixt: using mixture models,

  3. cutoff_diff: using a minimum difference threshold (need the argument min_diff_for_cutoff)

  4. min: the minimum of the three firsts methods

  5. max: the maximum of the three firsts methods

  6. mean: the mean of the three firsts methods

min_diff_for_cutoff

(int) argument for method cutoff_diff. Required if method is cutoff_diff, min, max or mean

Value

A new phyloseq-class object.

Author(s)

Adrien Taudière

Examples


subset_taxa_tax_control(data_fungi,
  as.numeric(data_fungi@otu_table[, 300]),
  min_diff_for_cutoff = 2
)


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