Skip to content

Add expression parser for CLI transforms parity#101

Merged
iskandr merged 1 commit into
masterfrom
cli-parity
Apr 10, 2026
Merged

Add expression parser for CLI transforms parity#101
iskandr merged 1 commit into
masterfrom
cli-parity

Conversation

@iskandr
Copy link
Copy Markdown
Contributor

@iskandr iskandr commented Apr 10, 2026

Summary

  • Add parse_expr() — full recursive descent parser for ranking expressions from CLI strings
  • Supports all transforms: ascending_cdf, descending_cdf, logistic, clip, hinge, log, log2, log10, log1p, exp, sqrt
  • Supports arithmetic (0.5 * affinity.score + 0.5 * presentation.score), aggregations (mean, geomean, minimum, maximum, median), column() refs, wt() wrapper, method qualification (affinity["netmhcpan"])
  • Extend --rank-by to accept expression strings (backward compatible)
  • Use mhctools predictors_from_args() so --predictors flows through
  • Require mhctools>=3.4.0, bump version to 4.7.0

Depends on: openvax/mhctools#186

Test plan

  • 25 new parse_expr tests all pass
  • 364 total tests pass (1 pre-existing failure: netMHC not installed)
  • CI passes (after mhctools 3.4.0 is deployed)

🤖 Generated with Claude Code

…ctors

Add parse_expr() — full recursive descent parser for ranking expressions
from CLI strings. Supports all transforms (ascending_cdf, descending_cdf,
logistic, clip, hinge, log, log2, log10, log1p, exp, sqrt), arithmetic,
aggregations (mean, geomean, minimum, maximum, median), column() refs,
wt() wrapper, and method qualification via brackets.

Extend --rank-by to accept expression strings alongside simple kind names.
Use mhctools predictors_from_args() so --predictors flows through from
mhctools. Require mhctools>=3.4.0. Bump version to 4.7.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@iskandr iskandr merged commit 6180dce into master Apr 10, 2026
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant