| calculate_log2_fold_change | R Documentation |
Calculates log2 fold change between two groups with proper handling of zero values using a data-driven pseudocount approach.
calculate_log2_fold_change(
mean1,
mean2,
pseudocount = NULL,
reference_values = NULL
)
mean1 |
Numeric. Mean abundance of group 1 (reference/control) |
mean2 |
Numeric. Mean abundance of group 2 (comparison/treatment) |
pseudocount |
Optional numeric. If NULL, calculated from reference_values |
reference_values |
Optional numeric vector for calculating pseudocount |
The fold change direction is group2/group1, so: - Positive values indicate higher abundance in group2 - Negative values indicate higher abundance in group1
log2(mean2/mean1) with pseudocount protection
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.