Add DeepImmuno class-I immunogenicity predictor (#250) - #251
Merged
Conversation
DeepImmuno (Li et al., Briefings in Bioinformatics 2021) is a small CNN that scores class-I CD8+ immunogenicity from a peptide and its HLA-A/B/C allele. It joins the other immunogenicity predictors (Calis, PRIME, BigMHC_IM), emitting one Kind.immunogenicity prediction per (peptide, allele). DeepImmuno ships MIT-licensed weights in-repo but loads them with an old Keras 2 / TensorFlow stack, so the wrapper shells out to its deepimmuno-cnn.py CLI in a user-provided checkout (DEEPIMMUNO_HOME) via a user-provided interpreter (DEEPIMMUNO_PYTHON) — the DeepTAP pattern. On newer TensorFlow the interpreter only needs the tf-keras shim; the wrapper sets TF_USE_LEGACY_KERAS=1 for the subprocess so the Keras-2 checkpoint loads. - 9- and 10-mers only (validated up front); ~62 alleles, nearest-match rescue handled by DeepImmuno itself - add cwd/env passthrough to AsyncProcess/run_command (the tool hardcodes ./data and ./models relative paths, so it must run in its own dir) - register as "deepimmuno" in the CLI; export from the package - tests: parser + allele-format + construction/validation offline, end-to-end gated on DEEPIMMUNO_HOME (verified locally: NLVPMVATV/HLA-A*02:01 = 0.9568) - README + kind_support table; bump 3.29.0 -> 3.30.0 Verified end-to-end against a local DeepImmuno checkout on TF 2.17 + tf-keras. Claude-Session: https://claude.ai/code/session_01LZahFhBSCiehXTESCYQ7wG
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.
Closes #250.
Adds DeepImmuno (Li et al., Briefings in Bioinformatics 2021) — a small CNN that scores class-I CD8+ immunogenicity from a peptide and its HLA-A/B/C allele. It's the fourth immunogenicity predictor alongside
Calis,PRIME, andBigMHC_IM, emitting oneKind.immunogenicityprediction per (peptide, allele).Design
DeepTAPpattern). DeepImmuno ships MIT-licensed weights in-repo but itsdeepimmuno-cnn.pyrebuilds the net and loads them with an old Keras 2 / TensorFlow stack, so mhctools shells out to that CLI in a user-provided checkout (DEEPIMMUNO_HOME) via a user-provided interpreter (DEEPIMMUNO_PYTHON). On newer TensorFlow the interpreter only needs thetf-kerasshim — the wrapper setsTF_USE_LEGACY_KERAS=1for the subprocess so the Keras-2 checkpoint loads.HLA-A*02:01→HLA-A*0201).AsyncProcess/run_commandgaincwd/envpassthrough (backward-compatible) because DeepImmuno hardcodes./dataand./modelsand must run in its own dir.Verification
Confirmed end-to-end against a local DeepImmuno checkout on TF 2.17 + tf-keras:
NLVPMVATV/HLA-A*02:01= 0.9568,GILGFVFTL= 0.8872. Offline tests (parser, allele format, construction/validation) run in CI; the end-to-end tests are gated onDEEPIMMUNO_HOME.ruffclean.Version bump 3.29.0 → 3.30.0.
https://claude.ai/code/session_01LZahFhBSCiehXTESCYQ7wG