Skip to contents

lifecycle-experimental

A contam_tbl is the canonical object returned by every tidypq contaminant detector (identify_contam_*_pq()). It is a tibble subclass with one row per flagged taxon and at least two columns:

taxon

Taxon name, matching phyloseq::taxa_names().

method

Short token naming the detector that flagged the taxon (e.g. "corr", "blocklist", "primer").

Detectors add their own method-specific evidence columns (correlations, p-values, matched primers, …). A detector that flags nothing returns a zero-row contam_tbl, never NULL, so outputs always compose.

Outputs of several detectors can be row-bound with rbind(); evidence columns absent from one detector are filled with NA. The combined table is consumed by filter_contam_pq() (removal) and by plot.contam_tbl() (diagnostics).

Usage

new_contam_tbl(x = tibble::tibble(taxon = character(), method = character()))

is_contam_tbl(x)

Arguments

x

(data.frame, required) A data frame carrying at least taxon and method columns.

Value

new_contam_tbl() returns a contam_tbl. is_contam_tbl() returns a length-one logical.

Author

Adrien Taudière