Skip to content

Add NetCleave integration for MHC-I/II C-terminal cleavage prediction #213

Description

@iskandr

Goal

Add a NetCleave predictor wrapper to mhctools for C-terminal peptide processing prediction (MHC-I and MHC-II pathways).

Why

  • One of the only public predictors that explicitly covers MHC-II antigen processing in addition to MHC-I. Class-II processing is currently a gap in our predictor set (NetChop / pepsickle are MHC-I proteasomal cleavage; no class-II option exists today).
  • Fits the existing proteasome_cleavage / antigen-processing slot for class-I; class-II coverage may motivate a separate Kind or a refinement of the existing semantics.

Integration shape (proposed)

Closest existing analogue is NetChop, not pepsickle:

  • Not pip-installable. Distributed as git clone + python3 NetCleave.py --predict .... We'd shell out to a user-configured installation path, the same way we configure NetMHCpan paths today.
  • Heavy deps on the NetCleave side: Keras/TensorFlow, scikit-learn, biopython, pandas, numpy, plus R (dplyr, argparser). Users provide a working install; we don't try to manage it.
  • Inputs: FASTA of a protein, or CSV (peptide + UniProt ID, or peptide + protein sequence). We'd write a temp FASTA/CSV and parse the output directory.
  • Side effects: NetCleave can fetch protein sequences from UniProt at runtime. Wrapper should prefer the peptide+protein-sequence CSV form so we don't introduce network dependence inside predict().
  • Subprocess isolation: Likely needed (same Keras/TF + libomp class of issues that motivated [codex] Add pepsickle subprocess isolation #201 for pepsickle). Worth following the optional-subprocess pattern from Pepsickle.

Open design questions

  1. Kind choice. Use existing proteasome_cleavage for both class I and II, or introduce a class-II-specific antigen-processing kind? The MHC-II pathway is endolysosomal, not proteasomal — strictly speaking proteasome_cleavage is misnamed if reused. Possible: add Kind.antigen_processing (already exists) as the umbrella and let predictors declare which they cover via kind_support() + mhc_class.
  2. Output semantics. NetCleave outputs positional cleavage probabilities, not a single per-peptide score. We need to decide whether the per-peptide score is the C-terminal probability (analogous to NetChop) or something derived. Should align with how ProcessingPredictor and the score_cterm / score_nterm_cterm family already collapse positional scores to per-peptide.
  3. Class-II peptide-length handling. Class-II peptides span a wider length range and the cleavage signal is different. Check whether the same wrapper code path works for both classes or whether class-II needs its own subclass (e.g. NetCleave_I / NetCleave_II mirroring NetMHCpan*_BA / _EL pattern).
  4. kind_support() metadata. New predictor needs to declare its mhc_class (I, II, or both) and mhc_dependence (none — cleavage is MHC-independent).

Out of scope

  • Bundling or vendoring NetCleave itself.
  • Training / --train mode of NetCleave; we only need --predict.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions