View source: R/registration_stats_anova.R
registration_stats_anova | R Documentation |
This function computes the gene ANOVA F-statistics (at least one group is
different from the rest). These F-statistics can be used for spatial
registration with layer_stat_cor()
and related functions. Although, they
are more typically used for identifying ANOVA-marker genes.
registration_stats_anova(
sce_pseudo,
block_cor,
covars = NULL,
var_registration = "registration_variable",
var_sample_id = "registration_sample_id",
gene_ensembl = NULL,
gene_name = NULL,
suffix = ""
)
sce_pseudo |
The output of |
block_cor |
A |
covars |
A |
var_registration |
A |
var_sample_id |
A |
gene_ensembl |
A |
gene_name |
A |
suffix |
A |
A data.frame()
with the ANOVA statistical results. This is
similar to fetch_data("modeling_results")$anova
.
Other spatial registration and statistical modeling functions:
registration_block_cor()
,
registration_model()
,
registration_pseudobulk()
,
registration_stats_enrichment()
,
registration_stats_pairwise()
,
registration_wrapper()
example("registration_block_cor", package = "spatialLIBD")
results_anova <- registration_stats_anova(sce_pseudo,
block_cor, "age",
gene_ensembl = "ensembl", gene_name = "gene_name", suffix = "example"
)
head(results_anova)
## Specifying `block_cor = NaN` then ignores the correlation structure
results_anova_nan <- registration_stats_anova(sce_pseudo,
block_cor = NaN, "age",
gene_ensembl = "ensembl", gene_name = "gene_name", suffix = "example"
)
head(results_anova_nan)
## Note that you can merge multiple of these data.frames if you run this
## function for different sets. For example, maybe you drop one group
## before pseudo-bulking if you know that there are many differences between
## that group and others. For example, we have dropped the white matter (WM)
## prior to computing ANOVA F-statistics.
## no covariates
results_anova_nocovar <- registration_stats_anova(sce_pseudo,
block_cor,
covars = NULL,
gene_ensembl = "ensembl", gene_name = "gene_name", suffix = "nocovar"
)
head(results_anova_nocovar)
## Merge both results into a single data.frame, thanks to having different
## 'suffix' values.
results_anova_merged <- merge(results_anova, results_anova_nocovar)
head(results_anova_merged)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.