Skip to content

Compare abundances

Compare two estimates of cell abundances from a Hooke model.

compare_abundances(
  ccm,
  cond_x,
  cond_y,
  by = "cell_group",
  method = c("BH", "bonferroni", "hochberg", "hommel", "BY"),
  alpha = 0.05,
  power = 0.8,
  convert_scale = FALSE,
  adjust_q_values = FALSE,
  log_scale = c("log", "log10", "log2")
)

Arguments

ccm

A cell_count_model.

cond_x

tibble A cell type abundance estimate from estimate_abundances().

cond_y

tibble A cell type abundance estimate from estimate_abundances().

by

string The column name used to join the two estimates.

method

string A method for correcting P-value multiple comparisons. This can be "BH" (Benjamini & Hochberg), "bonferroni" (Bonferroni), "hochberg" (Hochberg), "hommel", (Hommel), or "BYH" (Benjamini & Yekutieli).

alpha

Desired significance level

power

Desired power level for calculating minimum detectable fold change

convert_scale

Whether to convert to log2 scale.

adjust_q_values

logical Whether to recompute delta_q_value using only rows whose power meets the power threshold.

log_scale

Log scale used for estimate_abundances.

Value

tibble A table contrasting cond_x and cond_y (interpret as Y/X).