Add --epsilon flag to cell-eval run - #244
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new --epsilon command-line argument to forward a pseudocount to pdex for log fold-change calculations, updating the evaluator setup to pass this parameter. The review feedback recommends adding validation to ensure that the epsilon value is non-negative to prevent potential mathematical errors during computation.
Expose pdex's log fold-change pseudocount as a CLI option. Defaults to 0.0 (no behavior change from the current pinned default); pass e.g. 1e-9 to match pdex>=0.2.5 behavior. Forwarded via pdex_kwargs to both the --celltype-col split path and the single-evaluator path, and thus into the data-ceiling DE, mirroring how --cpm-filter is handled.
LeonHafner
force-pushed
the
leonhafner/expose-epsilon-cli
branch
from
July 14, 2026 18:32
ecd83ff to
6f0eb1c
Compare
A newer ty no longer reports invalid-argument-type on AnnData.write_h5ad, so these three suppressions are now flagged unused-ignore-comment and fail the typing CI. Remove them (no functional change).
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an
--epsilonflag tocell-eval runthat forwards a pseudocount to pdex for the log fold-change denominator.Why
Epsilon is currently pinned to
0.0internally with no CLI override. Exposing it lets users pass e.g.1e-9(matchingpdex>=0.2.5behavior) to avoid unstable / divide-by-zero log fold-changes when a gene's reference mean is 0.Details
--epsilonargument,type=float,default=0.0— no behavior change for existing invocations.pdex_kwargsto both the--celltype-colsplit path and the single-evaluator path, so it also reaches the data-ceiling DE (mirrors how--cpm-filteris handled).Also (CI fix)
Drops three now-unused
# ty: ignore[invalid-argument-type]suppressions (src/cell_eval/_baseline.py,src/cell_eval/_cli/_prep.py,tutorials/vcc/vcc.ipynb). A newertyno longer reportsinvalid-argument-typeonAnnData.write_h5ad, so these were failing thetypingjob asunused-ignore-comment. Pure comment removals, no functional change.Test plan
cell-eval run --helpshows--epsilonwith[default: 0.0]ruff format --check,ruff check,ty checkall pass locally