sccomp_proportional_fold_change: Calculate Proportional Fold Change for sccomp Data

View source: R/methods.R

sccomp_proportional_fold_changeR Documentation

Calculate Proportional Fold Change for sccomp Data

Description

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

Usage

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").

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.

Value

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

Examples

## Not run: 
# Example usage
result <- sccomp_proportional_fold_change(sccomp_data, formula_composition, "healthy", "cancer")

## End(Not run)

stemangiola/sccomp documentation built on Dec. 20, 2024, 8:38 a.m.