View source: R/dada_phyloseq.R
subset_taxa_pq | R Documentation |
The main objective of this function is to complete the
phyloseq::subset_taxa()
function by propose a more easy way of
subset_taxa using a named boolean vector. Names must match taxa_names.
subset_taxa_pq(
physeq,
condition,
verbose = TRUE,
clean_pq = TRUE,
taxa_names_from_physeq = FALSE
)
physeq |
(required): a |
condition |
A named boolean vector to subset taxa. Length must fit
the number of taxa and names must match taxa_names. Can also be a
condition using a column of the tax_table slot (see examples). If
the order of condition is the same as taxa_names(physeq),
you can use the parameter |
verbose |
(logical) Informations are printed |
clean_pq |
(logical) If set to TRUE, empty samples are discarded after subsetting ASV |
taxa_names_from_physeq |
(logical) If set to TRUE, rename the
condition vector using taxa_names(physeq). Carefully check the result
of this function if you use this parameter. No effect if the condition
is of class |
a new phyloseq object
subset_taxa_pq(data_fungi, data_fungi@tax_table[, "Phylum"] == "Ascomycota")
cond_taxa <- grepl("Endophyte", data_fungi@tax_table[, "Guild"])
names(cond_taxa) <- taxa_names(data_fungi)
subset_taxa_pq(data_fungi, cond_taxa)
subset_taxa_pq(data_fungi, grepl("mycor", data_fungi@tax_table[, "Guild"]),
taxa_names_from_physeq = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.