sccomp_remove_unwanted_variation | R Documentation |
This function uses the model to remove unwanted variation from a dataset using the estimated of the model. For example if you fit your data with this formula ~ factor_1 + factor_2
and use this formula to remove unwanted variation ~ factor_1
, the factor_2
will be factored out.
sccomp_remove_unwanted_variation(
.data,
formula_composition = ~1,
formula_variability = NULL
)
.data |
A tibble. The result of sccomp_estimate. |
formula_composition |
A formula. The formula describing the model for differential abundance, for example ~treatment. This formula can be a sub-formula of your estimated model; in this case all other factor will be factored out. |
formula_variability |
A formula. The formula describing the model for differential variability, for example ~treatment. In most cases, if differentially variability is of interest, the formula should only include the factor of interest as a large anount of data is needed to define variability depending to each factors. This formula can be a sub-formula of your estimated model; in this case all other factor will be factored out. |
A nested tibble tbl
with cell_group-wise statistics
data("counts_obj")
estimates = sccomp_estimate(
counts_obj ,
~ type, ~1, sample, cell_group, count,
cores = 1
)
sccomp_remove_unwanted_variation(estimates)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.