Compute the probability that a single cell belongs to a given cell type by combining per-node scores along a tree path, applying a complexity-based weight, and an optional negative marker penalty.
Arguments
- tree
A gating tree as produced by [build_fullcoverage_tree()].
- expr_mat
Numeric matrix-like expression object with markers in rows and cells in columns.
- cell_i
Integer index of the cell/column to score.
- combine
How to combine node-wise scores along the path. One of `"mean"` or `"product"`.
- neg_markers
Character vector of negative marker names used for penalty.
- marker_stats
A list of marker statistics (including cutoff and scale) produced by [fit_marker_stats()] used to calculate the penalty.
- neg_strength
Numeric scalar in [0,1] defining how strongly negative marker expression should penalize the final score. Default is 0.8.
- lambda
Numeric scalar representing the "Skepticism Factor." Higher values place a heavier penalty on cell types defined by fewer markers. Default is 0.2.
