filt_taxa_pq: Filter taxa of a phyloseq object based on the minimum number...

View source: R/dada_phyloseq.R

filt_taxa_pqR Documentation

Filter taxa of a phyloseq object based on the minimum number of sequences/samples

Description

lifecycle-experimental

Basically a wraper of subset_taxa_pq().

Usage

filt_taxa_pq(
  physeq,
  min_nb_seq = NULL,
  min_occurence = NULL,
  combination = "AND",
  clean_pq = TRUE
)

Arguments

physeq

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

min_nb_seq

(int default NULL) minimum number of sequences by taxa.

min_occurence

(int default NULL) minimum number of sample by taxa.

combination

Either "AND" (default) or "OR". If set to "AND" and both min_nb_seq and min_occurence are not NULL, the taxa must match the two condition to passe the filter. If set to "OR", taxa matching only one condition are kept.

clean_pq

(logical) If set to TRUE, empty samples and empty taxa (ASV, OTU) are discarded after filtering.

Value

a new phyloseq object

Author(s)

Adrien Taudière

Examples

filt_taxa_pq(data_fungi, min_nb_seq = 20)
filt_taxa_pq(data_fungi, min_occurence = 2)
filt_taxa_pq(data_fungi,
  min_occurence = 2,
  min_nb_seq = 10, clean_pq = FALSE
)
filt_taxa_pq(data_fungi,
  min_occurence = 2,
  min_nb_seq = 10,
  combination = "OR"
)

adrientaudiere/MiscMetabar documentation built on Dec. 19, 2024, 3:16 a.m.