Description Usage Arguments Details Value Author(s) Examples
Will take a tidi_micro set and aggregate the raw counts of taxa with a low prevalence and/or abundance into a new "Other" taxa. Can also find specific taxa you'd like to include in the "Other" taxa counts. Once the counts are aggregated taxa relative abundance, centered log ratio (CLR) transformations, and presence will be recalculated. This recalculation will only change the "Other" category
1 2 3 4 5 6 7 | otu_filter(
micro_set,
prev_cutoff = 0,
ra_cutoff = 0,
exclude_taxa = NULL,
filter_summary = T
)
|
micro_set |
A tidy_micro data set |
prev_cutoff |
Minimum percent of subjects with OTU counts above 0 |
ra_cutoff |
At leat one subject must have RA above this subject |
exclude_taxa |
A character vector of OTU names that you would like filter into your "Other" category |
filter_summary |
Logical; print out summaries of filtering steps |
1/Total will be added to each taxa count for CLR tranformations in order to avoid issues with log(0)
Returns a tidy_micro set
Charlie Carpenter and Dan Frank
1 2 3 4 5 6 7 8 9 10 11 12 | data(bpd_phy); data(bpd_cla); data(bpd_ord); data(bpd_fam); data(bpd_clin)
otu_tabs <- list(Phylum = bpd_phy, Class = bpd_cla,
Order = bpd_ord, Family = bpd_fam)
set <- tidy_micro(otu_tabs = otu_tabs, clinical = bpd_clin) %>%
filter(day == 7) ## Only including the first week
filter_set <- set %>%
otu_filter(prev_cutoff = 5, ## 5% of subjects must have this bug, or it is filtered
ra_cutoff = 1, ## At least 1 subject must have RA of 1, or it is filtered
exclude_taxa = c("Unclassified", "Bacteria") ## Unclassified taxa we don't want
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.