Skip to content

Add support for NetMHCpan-4.2#22

Open
yannic-chen wants to merge 6 commits into
CaronLab:masterfrom
yannic-chen:claude/mhcvizpip-netmhcpan-upgrade-13ldqn
Open

Add support for NetMHCpan-4.2#22
yannic-chen wants to merge 6 commits into
CaronLab:masterfrom
yannic-chen:claude/mhcvizpip-netmhcpan-upgrade-13ldqn

Conversation

@yannic-chen

Copy link
Copy Markdown

NetMHCpan-4.2 shares the same command-line interface and tabular output format as 4.1, so the job construction and output parser work unchanged. This wires 4.2 through the config/auto-detection paths while keeping 4.1 as a supported fallback:

  • parameters.py: the "auto" NetMHCpan path now resolves to the bundled netMHCpan4.2 wrapper.
  • gui.py initialize(): accepts a netMHCpan-4.2 (preferred) or netMHCpan-4.1 (legacy) tools directory and downloads the matching data files.
  • gui.py download_data_file(): new netMHCpan4.2 branch pointing at the DTU NetMHCpan-4.2 data archive.
  • tool_scripts/netMHCpan4.2: bash wrapper mirroring the 4.1 one with NMHOME set to netMHCpan-4.2.
  • Updated GUI citation, docs and CHANGELOG; bumped version to 0.7.12.

Claude-Session: https://claude.ai/code/session_0165QaBkysJcvX2ZizxWyvop

claude added 6 commits July 21, 2026 07:16
NetMHCpan-4.2 shares the same command-line interface and tabular output
format as 4.1, so the job construction and output parser work unchanged.
This wires 4.2 through the config/auto-detection paths while keeping 4.1
as a supported fallback:

- parameters.py: the "auto" NetMHCpan path now resolves to the bundled
  netMHCpan4.2 wrapper.
- gui.py initialize(): accepts a netMHCpan-4.2 (preferred) or netMHCpan-4.1
  (legacy) tools directory and downloads the matching data files.
- gui.py download_data_file(): new netMHCpan4.2 branch pointing at the DTU
  NetMHCpan-4.2 data archive.
- tool_scripts/netMHCpan4.2: bash wrapper mirroring the 4.1 one with
  NMHOME set to netMHCpan-4.2.
- Updated GUI citation, docs and CHANGELOG; bumped version to 0.7.12.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_0165QaBkysJcvX2ZizxWyvop
Make a fresh install work on current Python and pip:

- plotly_venn.py: import Iterable from collections.abc; the
  collections.Iterable alias was removed in Python 3.10.
- requirements.txt / setup.py: add version ceilings matching the last
  releases MVP works with -- pandas<2.0 (DataFrame.append removed in
  pandas 2.0), numpy<2.0, dash<3.0 with dash-bootstrap-components 1.x
  (Dash 3.0 removed the standalone dash_*_components packages), and
  kaleido==0.2.1 / plotly<6. Also add seaborn and mhcnames to setup.py.

Verified the CLI and GUI import chains build cleanly on Python 3.10 with
this set (pandas 1.5.3, numpy 1.26.4, dash 2.18.2, dbc 1.7.1).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_0165QaBkysJcvX2ZizxWyvop
Replace the pandas DataFrame.append() call in cl_tools.make_binding_predictions
with pd.concat() (append was removed in pandas 2.0). Empty frames are filtered
out of the concat so the pandas>=2.1 empty/all-NA FutureWarning does not fire.

This removes the only reason pandas/numpy were version-capped, so those pins are
dropped. dash<3.0 (+ dash-bootstrap-components 1.x) is still required because the
GUI imports the standalone dash_*_components packages that Dash 3.0 removed; that
constraint is independent of the Python version.

Verified on Python 3.12 with pandas 3.0.3 / numpy 2.5.1 / dash 2.18.2: full CLI and
GUI import chain, the concat path (no FutureWarning), and the NetMHCpan output
parser all work.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_0165QaBkysJcvX2ZizxWyvop
NetMHCIIpan changed its output column layout across 4.0->4.3, and MVP parsed
results by fixed column position, so newer versions would be misparsed.

- netmhcpan_helper: parse NetMHCpan/NetMHCIIpan output by column *header name*
  (Score_EL, %Rank_EL, Score_BA, Affinity(nM)/Aff(nM), %Rank_BA) instead of a
  fixed index. Positions are read from the results header each block, so added
  or reordered columns no longer break parsing. Falls back to the previous
  fixed indices if no header is found, so existing behavior is preserved.
- gui.initialize(): accept netMHCIIpan-4.0 through 4.3 (newest first), mirroring
  the NetMHCpan handling.
- gui.download_data_file(): derive the DTU service name and destination folder
  from the version, so any netMHCpan/netMHCIIpan version resolves automatically.
- tool_scripts/netMHCIIpan: auto-detect the newest installed netMHCIIpan-4.x and
  dispatch to the right entry point (4.0 Perl frontend, or 4.1+ launcher/binary).
- Docs/CHANGELOG updated.

Verified on Python 3.12: parser maps columns correctly for a class I 4.2 header,
a class II 4.0 header, a class II header with shifted columns (simulating 4.3),
and the no-header fallback; full CLI and GUI imports still succeed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_0165QaBkysJcvX2ZizxWyvop
- docs/INSTALL.md: step-by-step guide for installing from source and running
  MhcVizPipe interactively or as a server -- Python environment, DTU tool setup
  (NetMHCpan-4.2, NetMHCIIpan 4.0-4.3, GibbsCluster), configuration, a CLI smoke
  test, running the GUI server behind an SSH tunnel / systemd, and troubleshooting
  the errors commonly hit during setup.
- README: link to the new guide from the Installation section.
- test_data/class_I readme: correct the mouse alleles from H2-Kb/H2-Db to the
  recognized H-2-Kb/H-2-Db.
- CHANGELOG: note the guide and the allele-name correction.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_0165QaBkysJcvX2ZizxWyvop
SVG app icon: a sequence-logo motif (Y and C as the tall anchor residues) with
an 'MVP' wordmark and a '0.7.12' version badge to visually distinguish this build.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_0165QaBkysJcvX2ZizxWyvop
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.

2 participants