A convenience wrapper that runs identify_contam_chimera_pq() and then
filter_contam_pq(), returning the chimera-free phyloseq object directly.
Chimera removal is a near-ubiquitous cleaning step, so it gets a dedicated
verb; the other contaminant methods are composed explicitly via their
identify_contam_*_pq() detector and filter_contam_pq().
Usage
filter_chimera_pq(
physeq,
method = c("dada2", "vsearch_ref"),
clean_phyloseq_object = TRUE,
verbose = TRUE,
...
)Arguments
- physeq
(phyloseq, required) A phyloseq object with a populated
@refseqslot containing DNA sequences.- method
(character, default
"dada2") Detection engine, passed toidentify_contam_chimera_pq():"dada2"(de novo) or"vsearch_ref"(reference-based UCHIME, requiresdatabase).- clean_phyloseq_object
(logical, default
TRUE) Whether to clean the result withMiscMetabar::clean_pq().- verbose
(logical, default
TRUE) Whether to report detection and removal.- ...
Additional arguments passed to
identify_contam_chimera_pq()(e.g.dada2_method,database,vsearchpath,vsearch_args).
See also
identify_contam_chimera_pq() to inspect chimeras before removal,
filter_contam_pq() for the general removal verb.
Examples
library(MiscMetabar)
data(data_fungi)
# \donttest{
data_nochim <- filter_chimera_pq(data_fungi, method = "dada2")
#> ℹ chimera (dada2): flagged 450 of 1420 taxa.
#> ! Removing 450 contaminant taxons flagged by methods "chimera".
# }