Skip to content

Default to trypsin/P so results don't change under mzLib #1186 (needs mzLib #1186) - #31

Draft
trishorts wants to merge 1 commit into
fix/toml-protease-historical-namesfrom
fix/keep-unrestricted-trypsin
Draft

trishorts wants to merge 1 commit into
fix/toml-protease-historical-namesfrom
fix/keep-unrestricted-trypsin

Conversation

@trishorts

@trishorts trishorts commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Project of origin: none — standalone fix (companion to smith-chem-wisc/mzLib#1186)

Draft on the fork until the mzLib release that carries smith-chem-wisc/mzLib#1186. At that point:

  1. bump the mzLib pin in the six csproj files;
  2. open this on smith, in the same pin-bump PR as fork Read PSI-MOD formal charges from mzLib's PsiModFormalCharges.tsv #27, Quantify a design with a numbering gap, with a warning in the log and results.txt, instead of refusing it #29 and Expect a sequence in two indistinguishable proteins to quantify their group (needs mzLib #1463) #30;
  3. add the labels, reviewers and board.

This draft is based on smith-chem-wisc#2905's branch, so the diff shows only this change. Retarget it to master once smith-chem-wisc#2905 merges. Closes smith-chem-wisc#2750 when it lands on smith.

Why

smith-chem-wisc/mzLib#1186 restores the protease naming every other search engine uses:

  • bare trypsin is the proline-restricted enzyme, K[P]|,R[P]|;
  • trypsin/P cleaves before proline, K|,R|.

Bare trypsin has meant the unrestricted enzyme since at least 2022, and that is what MetaMorpheus searches with by default. Against a pack of smith-chem-wisc/mzLib#1186, MetaMorpheus master fails 77 of 2,910 tests:

The decision for MetaMorpheus is to keep today's results: default to trypsin/P and name it wherever a test's expected values were measured with it.

What this changes

  • CommonParameters.DefaultProteaseName = "trypsin/P":
    • CommonParameters uses it when no digestion parameters are given.
    • The search, calibration, GPTMD, glyco and crosslink windows and the file-specific parameters window start on it.
    • The Arg-C and semi-trypsin recommended-settings switches select it.
  • GUI recommended-settings cases:
  • Tests:
    • Tests whose expected values were measured with the unrestricted enzyme now name trypsin/P: 18 lines in 8 test files.
    • So do six settings files. One is TestData/SmallCalibratible_Yeast.toml, a file-specific settings file that several searches pick up. Its bare trypsin overrode the task's protease, which is why TestPepFilteringFewerThan100Psms changed even with the new default.
    • Tests that pass under either rule keep their spelling.
  • DigestionAgentNameTests.ASavedTaskReloadsWithItsProtease round-trips chymotrypsin and trypsin/P instead of the retired chymotrypsin|P.

Not changed

Saved task files. A saved task file that says Protease = "trypsin" now loads as the restricted enzyme. Every such file was saved meaning the unrestricted one, so re-running it changes its results. smith-chem-wisc/mzLib#1186 documents this as its one deliberate break. Nothing in this PR handles it; whether MetaMorpheus should is an open decision (see smith-chem-wisc#2750).

Verified

Against a local pack of smith-chem-wisc/mzLib#1186 at 5b424f6a2 (its later head adds only an error-message change), with smith-chem-wisc#2905, smith-chem-wisc#2906 and this change, the full suite (filter Category!=ExternalService, as mzLib's integration job runs it) gives 2912 passed, 0 failed, 1 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_013NnV5rYxLKC7SNfcgT1uEV

…hem-wisc#1186

mzLib smith-chem-wisc#1186 makes bare "trypsin" the proline-restricted enzyme and
names the unrestricted one "trypsin/P". MetaMorpheus's default has
been the unrestricted enzyme, so without this every default search
would change.

- CommonParameters.DefaultProteaseName is "trypsin/P". CommonParameters
  uses it when no digestion parameters are given, and the task windows,
  file-specific parameters window and the Arg-C and semi-trypsin
  recommended-settings switches select it instead of "trypsin".
- The chymotrypsin recommended-settings cases match "chymotrypsin" and
  "chymotrypsin/P". They matched the parenthetical names mzLib smith-chem-wisc#1005
  replaced in February 2026, so they never fired on a current mzLib.
- Tests whose expected values were measured with the unrestricted
  enzyme now name trypsin/P: 18 lines in 8 test files and six settings
  files, including TestData/SmallCalibratible_Yeast.toml, the
  file-specific settings many searches pick up. Tests that pass under
  either rule keep their spelling.
- DigestionAgentNameTests round-trips "chymotrypsin" and "trypsin/P"
  in place of the retired "chymotrypsin|P".

Needs the mzLib release that carries smith-chem-wisc#1186; "trypsin/P" does not
exist in 1.0.594.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013NnV5rYxLKC7SNfcgT1uEV
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.

1 participant