This function calculates the proportional fold change for single-cell composition data from sccomp analysis, comparing two conditions.

sccomp_proportional_fold_change(.data, formula_composition, from, to)

Arguments

.data

A sccomp_tbl object containing single-cell composition data.

formula_composition

The formula for the composition model.

from

The label for the control group (e.g., "healthy").

to

The label for the treatment group (e.g., "cancer").

Value

A tibble with cell groups and their respective proportional fold change.

Details

Note! This statistic is just descriptive and should not be used to define significance. Use sccomp_test() for that. This statistics is just meant to help interpretation. While fold increase in proportion is easier to understand than fold change in logit space, the first is not linear (the same change for rare cell types does not necessarily have the same weight that for abundant cell types), while the latter is linear, and used to infer probabilities.

Examples

if (FALSE) { # \dontrun{
# Example usage
result <- sccomp_proportional_fold_change(sccomp_data, formula_composition, "healthy", "cancer")
} # }