
Transform Abundance by Taxa or Sample Groups
Source:R/transform_abundance.R
transform_abundance_by.RdUnified front-end for transforming abundance after summarising either taxa or samples.
Arguments
- object
A
microbiome_datasetobject.- by
Transformation target, either
"taxa"or"samples".- group_by
Taxonomy rank or sample metadata column used for grouping.
- what
Aggregation method used before transformation.
- method
Transformation method.
- pseudocount
A pseudocount added before transformations that require strictly positive values.
- na_remove
Should taxa with missing rank be removed before summarisation when
by = "taxa"?- ...
Other parameters passed to
transform_counts().
Examples
data("global_patterns", package = "microbiomedataset")
x0 <- prune_taxa(global_patterns, variable_id = global_patterns@variable_info$variable_id[1:200])
x <- transform_abundance_by(
object = x0,
by = "taxa",
group_by = "Genus",
what = "sum_intensity",
method = "relative"
)
attr(x@expression_data, "transform_method")
#> [1] "relative"