Runs a parametric or non-parametric two-sample test comparing cells (or replicate summaries) from a treatment group to the control group on a single channel.
Arguments
- experiment
A
cr_experiment.- channel
Channel to test.
- treatment
Name of the treatment group (matches
design$treatment).- control
Name of the control group.
- test
One of
"mann_whitney","t_test","welch","wilcoxon_signed","kruskal","anova". For two-group tests, the first four are valid."kruskal"and"anova"can be used only withcr_test_all()where additional groups are compared together.- level
"cell"(default) or"replicate".
Examples
exp <- cr_example_experiment(seed = 1, n_cells_per_well = 30)
res <- cr_test(exp,
channel = "marker_1",
treatment = "CompoundA_high",
control = "Untreated",
test = "mann_whitney",
level = "replicate")
print(res)
#> ── cr_result ───────────────────────────────────────────────────────────────────
#> • Channel: "marker_1"
#> • Treatment: "CompoundA_high"
#> • Control: "Untreated"
#> • Test: "mann_whitney"
#> ℹ Replicate-level p = 1.54e-06
#> ℹ Effect sizes: cohens_d, hedges_g, cliffs_delta, and rank_biserial