|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +### Added |
| 11 | + |
| 12 | +- `annotate_spectra()` in `parse_spectra.py`: annotates all PSM spectra once before feature |
| 13 | + generators run, eliminating redundant per-generator spectrum annotation. |
| 14 | +- Top-level configuration options `fragmentation_model`, `tolerance_value`, and `tolerance_mode` |
| 15 | + to control centralized fragment ion annotation. Defaults: `cidhcd`, `0.02 Da`. |
| 16 | +- New `rescoring` configuration option for the ristretto rescoring engine: `train_fdr` and |
| 17 | + `model` (`"svm"`, default, or `"lda"`, faster but less powerful). Accepts `{}` for defaults, |
| 18 | + or a partial dict -- missing keys fall back to ristretto's own defaults. |
| 19 | +- New top-level `report_fdr` configuration option: FDR threshold used for console-logged |
| 20 | + identification counts, the HTML report's stats/charts, and FlashLFQ output filtering. |
| 21 | + Previously hardcoded at 1% throughout. |
| 22 | +- `ms2rescore-report` CLI: new `--fdr` option to regenerate a report at a different FDR |
| 23 | + threshold without rerunning rescoring. |
| 24 | +- Automatic inference of search-engine score direction (higher-is-better vs. lower-is-better) |
| 25 | + via spectrum-competed target-decoy evaluation, replacing the user-set `lower_score_is_better` |
| 26 | + option. Grouped by run, so multi-file input sharing native spectrum/scan IDs across runs |
| 27 | + doesn't corrupt the inferred direction. |
| 28 | +- Rescoring result tables (`<prefix>.psms.tsv`, `.peptidoforms.tsv`, `.peptides.tsv`, |
| 29 | + `.proteins.tsv`, `.weights.tsv`) are now always written as plain TSV, independent of rescoring |
| 30 | + engine internals. |
| 31 | +- `ristretto-ms` dependency: a lean, dependency-light (numpy/scikit-learn/pandas) |
| 32 | + reimplementation of the Percolator/Käll semi-supervised rescoring algorithm. |
| 33 | +- GUI: rescoring model selector (svm/lda); GUI runs now also write an HTML log file |
| 34 | + (`<prefix>.log.html`), matching the CLI. |
| 35 | + |
| 36 | +### Changed |
| 37 | + |
| 38 | +- Spectrum annotation is now performed once in `core.py` before all feature generators run. |
| 39 | + MS²PIP and MS2 feature generators reuse `AnnotatedMS2Spectrum` objects attached to each PSM. |
| 40 | +- MS²PIP: migrated from `correlate_preloaded` back to the now-unified `correlate()` API. Spectra |
| 41 | + are passed via `psm.spectrum`. |
| 42 | +- MS2: migrated from `ms2_features_from_ms2spectra` to `score_ms2_spectra` API. Feature set |
| 43 | + expanded to cover all ion series (a, b, c, x, y, z). |
| 44 | +- Dependencies bumped: `ms2pip>=4.2.0b1`, `ms2rescore_rs>=0.5.0b1`. Added `pyarrow>=14`. |
| 45 | +- numpy 2.0 compatibility in `charts.py` (`np.trapz` → `np.trapezoid`). |
| 46 | +- Rescoring engine replaced: mokapot → ristretto. Rescoring can no longer be skipped -- it |
| 47 | + always runs. |
| 48 | +- Main PSM list output renamed `<prefix>.psms.tsv` → `<prefix>.tsv`; the crash-recovery |
| 49 | + intermediate file renamed the same way (`<prefix>.intermediate.tsv`). |
| 50 | +- HTML report generation (both in-run and standalone via `ms2rescore-report`) reconstructs |
| 51 | + before/after rescoring comparisons from the main PSM list's provenance data and current state, |
| 52 | + rather than relying on separately persisted result tables. |
| 53 | +- Report/identification-overlap comparisons key on `(run, spectrum_id)` instead of bare |
| 54 | + `spectrum_id`, so multiple input files reusing the same native spectrum IDs no longer collide. |
| 55 | +- Multi-run PSM lists are disambiguated during rescoring/competition via ristretto's `run_col`, |
| 56 | + instead of relying on `spectrum_id` alone. |
| 57 | +- `max_psm_rank_output > 1` now applies consistently across the main output, rescoring tables, |
| 58 | + and report: multiple ranked PSMs per spectrum, with q-values/PEPs computed per-row rather than |
| 59 | + through full spectrum competition. Intended for surfacing ambiguous candidates (e.g. from |
| 60 | + Mumble), not a statistically rigorous FDR-controlled count. |
| 61 | +- Protein-level rollups use ristretto's picked-protein competition (Savitski et al. 2015) when |
| 62 | + `id_decoy_pattern` is set. |
| 63 | + |
| 64 | +### Removed |
| 65 | + |
| 66 | +- [BREAKING] `ms2_tolerance`, `spectrum_path`, and `spectrum_id_pattern` parameters removed from |
| 67 | + `MS2PIPFeatureGenerator`. Fragment mass tolerance is set globally via `tolerance_value` / |
| 68 | + `tolerance_mode` in the top-level configuration (default: `0.02 Da`). |
| 69 | +- [BREAKING] `spectrum_path`, `spectrum_id_pattern`, `mass_mode`, and `processes` parameters |
| 70 | + removed from `MS2FeatureGenerator`. Spectra are provided via centralized `annotate_spectra()`. |
| 71 | +- [BREAKING] Mokapot rescoring engine and the `mokapot` dependency removed, along with the |
| 72 | + `ms2rescore.rescoring_engines` module. |
| 73 | +- [BREAKING] `rescoring_engine` configuration option removed (mokapot-specific: `fasta_file`, |
| 74 | + `write_weights`, `write_txt`, `protein_kwargs`), replaced by `rescoring` (see Added). |
| 75 | +- [BREAKING] `fasta_file` configuration option and FASTA-based protein inference removed. |
| 76 | +- [BREAKING] `lower_score_is_better` configuration option removed. Score direction is now always |
| 77 | + auto-inferred (see Added) with no config-level override. |
| 78 | +- [BREAKING] `write_rescoring_tables` configuration option removed -- rescoring tables are |
| 79 | + unconditionally written now. |
| 80 | +- [BREAKING] PIN (Percolator) file output removed for `log_level=debug` -- the main PSM list |
| 81 | + TSV already carries all rescoring features. |
| 82 | +- [BREAKING] Ability to skip rescoring via configuration removed. `rescoring: null` is now |
| 83 | + rejected by config validation instead of being silently ignored; rescoring always runs. |
| 84 | +- [BREAKING] `ms2rescore.utils` (public) renamed to `ms2rescore._utils` (internal) and merged |
| 85 | + with the new rescoring integration layer -- no longer part of the public API surface. |
| 86 | + |
| 87 | +### Fixed |
| 88 | + |
| 89 | +- MS²PIP features incorrectly computed for multi-rank PSMs (`max_psm_rank_input > 1`): all |
| 90 | + PSMs sharing a spectrum ID received the annotation of the first-seen PSM, producing a bimodal |
| 91 | + `spec_pearson_norm` distribution. Fixed in ms2pip (per-PSM annotation) and reflected in |
| 92 | + ms2rescore via centralized per-PSM `annotate_spectra()`. |
| 93 | +- DeepLC RT features incorrectly assigned across PSMs: missing `sort_index()` after q-value sort |
| 94 | + for calibration caused PSMs to receive another PSM's RT predictions. |
| 95 | +- `processes=-1` (ms2rescore default) passed to DeepLC `num_threads`, which requires a positive |
| 96 | + integer or `None`. |
| 97 | +- Q-value NaN check in `parse_psms.py` failed when `qvalue` array contained `None` values. |
| 98 | +- `BrokenExecutor` not caught in mokapot rescoring engine. |
| 99 | +- Fragment mass tolerance fallback defaults in `core.py` incorrectly set to `20.0 ppm` instead |
| 100 | + of `0.02 Da`. |
| 101 | +- GUI runs never wrote an HTML log file (`<prefix>.log.html`), unlike CLI runs -- the GUI's |
| 102 | + logging setup only ever attached a plain text-file handler. |
| 103 | + |
| 104 | +## [3.3.0a1] - 2026-04-09 |
| 105 | + |
| 106 | +### Added |
| 107 | + |
| 108 | +- New MS2 feature generator using Rust-based `ms2rescore_rs` for direct spectrum feature |
| 109 | + extraction (intensity ratios, matched ion counts/percentages, hyperscore). |
| 110 | +- Mumble integration as an optional PSM generator for exploring alternative peptide |
| 111 | + identifications with mass shift modifications (`pip install ms2rescore[mumble]`). |
| 112 | +- Intermediate file output (`.intermediate.psms.tsv`) on feature generation or rescoring errors, |
| 113 | + enabling recovery by rerunning with modified configuration. |
| 114 | +- Intelligent skipping of feature generators when all their features are already present in the |
| 115 | + PSM file (e.g., from an intermediate recovery run). |
| 116 | +- New basic features: `theoretical_mass`, `experimental_mass`, `mass_error`, `pep_len`. |
| 117 | +- Standalone report generation from PSM TSV files without requiring full config or log files. |
| 118 | +- `ParseSpectrumError` exception for spectrum parsing failures. |
| 119 | + |
| 120 | +### Changed |
| 121 | + |
| 122 | +- Migrated MS2 and MS2PIP feature calculations to Rust via `ms2rescore_rs`, significantly |
| 123 | + improving performance (~5x speed-up). |
| 124 | +- Spectrum files are now parsed once and stored as `MS2Spectrum` objects, replacing the previous |
| 125 | + per-feature-generator parsing approach. |
| 126 | +- DeepLC integration upgraded to v4 API: dataset-wide processing, fine-tuning enabled by |
| 127 | + default, `SplineTransformerCalibration` for retention time calibration. |
| 128 | +- IM2Deep integration upgraded to v2 API: dataset-wide processing with per-run |
| 129 | + `LinearCCSCalibration` using reference peptides. |
| 130 | +- MS2PIP integration upgraded to use preloaded spectra and Rust-based feature calculation. |
| 131 | +- Basic feature generator now uses fixed charge encoding (charges 1-6) instead of dynamic |
| 132 | + min-max range. |
| 133 | +- Report generation CLI now accepts PSM file path with optional `--output` flag. |
| 134 | +- Charge-stripping regex pattern consolidated into shared `CHARGE_PATTERN` constant. |
| 135 | +- Upgraded dependencies: `deeplc>=4.0.0a2`, `im2deep>=2.0.0a2`, `ms2pip>=4.2.0a0`, |
| 136 | + `ms2rescore_rs>=0.5.0a0`. |
| 137 | + |
| 138 | +### Removed |
| 139 | + |
| 140 | +- MaxQuant feature generator (functionality consolidated into MS2 feature generator). |
| 141 | +- ionmob feature generator (replaced by IM2Deep v2). |
| 142 | +- `deeplcretrainer` dependency (functionality merged into DeepLC v4). |
| 143 | + |
| 144 | +### Fixed |
| 145 | + |
| 146 | +- Percolator kwargs silently ignored due to parameter name shadowing local variable. |
| 147 | +- Unreachable and broken error handlers in Percolator subprocess execution. |
| 148 | +- `fdr` parameter ignored in `_log_id_psms_before` (hardcoded to 0.01). |
| 149 | +- Out-of-memory errors from multiprocessing in spectrum parsing. |
0 commit comments