Skip to content

Add predictor MHC context metadata#210

Merged
iskandr merged 1 commit into
masterfrom
document-kind-semantics
May 7, 2026
Merged

Add predictor MHC context metadata#210
iskandr merged 1 commit into
masterfrom
document-kind-semantics

Conversation

@iskandr

@iskandr iskandr commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add predictor-level kind_support() metadata with direct per-kind mhc_dependence and mhc_class fields.
  • Document MHC context semantics for single-allele, haplotype-level, and MHC-independent predictions.
  • Change the MHCflurry presentation wrapper to call the upstream presentation predictor once with the full requested allele set and emit one haplotype-level presentation prediction per peptide, using best_allele as attribution.
  • Add regression coverage for MHCflurry haplotype presentation behavior, predictor metadata, and processing predictors being MHC-independent.

Root Cause

MHCflurry’s presentation predictor is genotype/haplotype-aware, but the mhctools wrapper was calling it one allele at a time and exposing those outputs as if presentation were per-allele. That changed the wrapper contract relative to the upstream model and made Kind.pMHC_presentation semantics ambiguous for downstream tools.

Validation

  • ./lint.sh
  • ./test.sh (414 passed, 9 skipped, 2 xfailed)

Fixes #208
Fixes #209

@iskandr iskandr force-pushed the document-kind-semantics branch 2 times, most recently from f5bea86 to cde3692 Compare May 7, 2026 16:20
@iskandr iskandr force-pushed the document-kind-semantics branch from cde3692 to 8633db2 Compare May 7, 2026 18:57
@iskandr iskandr marked this pull request as ready for review May 7, 2026 19:16
@iskandr iskandr merged commit 7ab01a9 into master May 7, 2026
4 checks passed
@iskandr iskandr deleted the document-kind-semantics branch May 7, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant