Skip to content

[codex] Check MHCflurry percentile calibration#204

Merged
iskandr merged 2 commits into
masterfrom
fix-mhcflurry-percentile-calibration-check
May 5, 2026
Merged

[codex] Check MHCflurry percentile calibration#204
iskandr merged 2 commits into
masterfrom
fix-mhcflurry-percentile-calibration-check

Conversation

@iskandr

@iskandr iskandr commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep MHCflurry affinity percentile ranks enabled by default
  • preflight requested alleles for affinity percentile-rank calibration before prediction
  • accept calibration from any allele with the same MHCflurry pseudosequence
  • add include_affinity_percentile_ranks=False for callers that want raw affinity without affinity ranks
  • bump mhctools to 3.13.4

Fixes #203.

Validation

  • python -m pytest tests/test_mhcflurry_key_lookup.py tests/test_mhcflurry.py
  • ./lint.sh
  • ./test.sh
  • manual repro: MHCflurry(alleles=["HLA-C*15:05"]) now fails early with a clear calibration error
  • manual opt-out: MHCflurry(alleles=["HLA-C*15:05"], include_affinity_percentile_ranks=False).predict(["SLYNTVATL"]) returns raw affinity with no affinity percentile rank

@iskandr iskandr marked this pull request as ready for review May 5, 2026 02:12
@iskandr iskandr merged commit 1d91963 into master May 5, 2026
4 checks passed
@iskandr iskandr deleted the fix-mhcflurry-percentile-calibration-check branch May 5, 2026 02:12
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.

MHCflurry wrapper requests affinity percentile ranks and fails for affinity-supported uncalibrated alleles

1 participant