View source: R/process_trim_prevalence.R
trim_prevalence | R Documentation |
trim samples or features in profile
by Prevalence,
which means the samples or features will be discarded if they could not pass the cutoff.
trim_prevalence(
object,
level = c(NULL, "Kingdom", "Phylum", "Class",
"Order", "Family", "Genus",
"Species", "Strain", "unique"),
cutoff = 0.1,
group = NULL,
trim = c("none",
"both",
"feature", "feature_group",
"sample"),
at_least_one = FALSE)
object |
(Required). a |
level |
(Optional). character. taxonomic level to summarize,
default the top level rank of the |
cutoff |
(Optional). Numeric. the Prevalence threshold (default: 0.1). |
group |
(Optional). character. filtering features or samples by group (default: NULL). |
trim |
(Optional). Character. trimming to apply, the options include:
|
at_least_one |
(Optional). Logical. prevalence of at least one group meets cutoff (FALSE means all groups meet cutoff, default: FALSE). |
A trimed object
whose prevalence of features or samples more than cutoff.
Created by Hua Zou (11/30/2021 Shenzhen China)
# phyloseq object
data("Zeybel_2022_gut")
trim_prevalence(
Zeybel_2022_gut,
level = "Phylum",
cutoff = 0.1,
trim = "feature")
# SummarizedExperiment object
data("Zeybel_2022_protein")
trim_prevalence(
Zeybel_2022_protein,
level = NULL,
cutoff = 0.1,
trim = "feature")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.