Installation¶
Requirements¶
- Python >= 3.10, < 3.13
Install from Source¶
Or using uv (recommended for development):
PyPI
PyPI distribution is not yet available. For now, install from source as shown above.
NetMHCpan / NetMHCIIpan Setup¶
Most OptiMHC dependencies are installed automatically via pip. The only exceptions are NetMHCpan and NetMHCIIpan, which are standalone executables that must be downloaded and installed manually.
1. Download¶
- NetMHCpan 4.1 (MHC Class I)
- NetMHCIIpan 4.3 (MHC Class II)
Both require a license from DTU Health Tech (free for academic use).
2. Install and Add to PATH¶
After downloading and extracting, follow the installation instructions provided by DTU. Then make sure the executables are accessible from your shell:
OptiMHC calls these tools via the mhctools library, which invokes netMHCpan and netMHCIIpan as command-line programs. If they are not on your PATH, the prediction step will fail with a "command not found" error.
3. Test the Installation¶
Tip
If you do not need MHC binding predictions, you can skip this step entirely and use OptiMHC with other features (Basic, SpectralSimilarity, DeepLC, PWM, OverlappingPeptide, MHCflurry) — all of which are installed via pip.
Verify OptiMHC Installation¶
You should see the available commands: pipeline and experiment.