Calculate log2(observed/expected) enrichment ratios for phylostrata in a selected gene set compared to the background distribution.
Value
A data frame with columns:
- Stratum
Phylostratum factor levels
- log_obs_exp
Log2 ratio of observed vs expected proportions
Details
This function calculates enrichment or depletion of phylostrata in a gene set by comparing the observed proportion of each stratum in the selected genes to the expected proportion based on the background distribution in all genes.
Positive values indicate enrichment (more genes than expected), while negative values indicate depletion (fewer genes than expected).