AttributeError: 'PercolatorTabWriter' object has no attribute 'style'
during rescoring
#208
Labels
'PercolatorTabWriter' object has no attribute 'style'
during rescoring
#208
Uh oh!
There was an error while loading. Please reload this page.
Description:
When using an XTandem output as input for MS²Rescore v3.1.4, the following error occurs during the rescoring step. This issue was introduced in version 3.1.2, where the psm-utils library was updated:
`
MS²Rescore (v3.1.4)
Developed at CompOmics, VIB / Ghent University, Belgium.
Please cite: Buur & Declercq et al. JPR (2024)
2024-12-11 16:35:01 INFO ms2rescore.parse_psms // Reading PSMs from PSM file
(1/1): '/xtandemserver/download/output2.xml'...
INFO ms2rescore.parse_psms // Removed 0 PSMs with rank
>= 10.
INFO ms2rescore.parse_psms // Found 56 PSMs, of which
50.00% are decoys.
WARNING ms2rescore.parse_psms // Non-mapped modifications
found: {'+57.02147', '+15.99492', '-18.01056'}
This can be ignored if they are Unimod modification
labels.
INFO ms2rescore.core // Found 4 identified PSMs with
rank <= 1 at 0.01 FDR before rescoring.
INFO ms2rescore.feature_generators.basic // Adding basic
features to PSMs.
INFO ms2rescore.feature_generators.ms2pip // Adding
MS²PIP-derived features to PSMs.
INFO ms2rescore.feature_generators.ms2pip // Running
MS²PIP for PSMs from run (1/1) spectra...
2024-12-11 16:35:02 INFO ms2pip.core // Processing spectra and peptides...
2024-12-11 16:35:08 INFO ms2rescore.feature_generators.deeplc // Adding
DeepLC-derived features to PSMs.
INFO ms2rescore.feature_generators.deeplc // Running
DeepLC for PSMs from run (1/1): spectra...
/usr/local/lib/python3.10/dist-packages/pygam/pygam.py:1150: RuntimeWarning: divide by zero encountered in scalar divide
r2['explained_deviance'] = 1.0 - full_d.sum() / null_d.sum()
2024-12-11 16:35:12 ERROR ms2rescore.main // 'PercolatorTabWriter' object
has no attribute 'style'
╭─────── Traceback (most recent call last) ───────╮
│ /usr/local/lib/python3.10/dist-packages/ms2resc │
│ ore/main.py:237 in main │
│ │
│ 234 │ │ │ profiled_rescore = profile(re │
│ 235 │ │ │ profiled_rescore(configuratio │
│ 236 │ │ else: │
│ ❱ 237 │ │ │ rescore(configuration=config) │
│ 238 │ except Exception as e: │
│ 239 │ │ LOGGER.exception(e) │
│ 240 │ │ sys.exit(1) │
│ │
│ /usr/local/lib/python3.10/dist-packages/ms2resc │
│ ore/core.py:126 in rescore │
│ │
│ 123 │ # Rescore PSMs │
│ 124 │ try: │
│ 125 │ │ if "percolator" in config["rescor │
│ ❱ 126 │ │ │ percolator.rescore( │
│ 127 │ │ │ │ psm_list, │
│ 128 │ │ │ │ output_file_root=output_f │
│ 129 │ │ │ │ log_level=config["log_lev │
│ │
│ /usr/local/lib/python3.10/dist-packages/ms2resc │
│ ore/rescoring_engines/percolator.py:116 in │
│ rescore │
│ │
│ 113 │ │ spectrum_id: index for index, spe │
│ enumerate(psm_list_reindexed["spectrum_id │
│ 114 │ } │
│ 115 │ │
│ ❱ 116 │ _write_pin_file(psm_list_reindexed, p │
│ 117 │ │
│ 118 │ logger.debug(f"Running percolator com │
│ 119 │ try: │
│ │
│ /usr/local/lib/python3.10/dist-packages/ms2resc │
│ ore/rescoring_engines/percolator.py:184 in │
│ _write_pin_file │
│ │
│ 181 def _write_pin_file(psm_list: psm_utils.P │
│ 182 │ """Write PIN file for rescoring.""" │
│ 183 │ logger.debug(f"Writing PIN file to {f │
│ ❱ 184 │ psm_utils.io.write_file( │
│ 185 │ │ psm_list, │
│ 186 │ │ filename=filepath, │
│ 187 │ │ filetype="percolator", │
│ │
│ /usr/local/lib/python3.10/dist-packages/psm_uti │
│ ls/io/init.py:256 in write_file │
│ │
│ 253 │ │
│ 254 │ # Get example PSM, instantiate writer │
│ 255 │ example_psm = psm_list[0] │
│ ❱ 256 │ with writer_cls( │
│ 257 │ │ filename, │
│ 258 │ │ *args, │
│ 259 │ │ example_psm=example_psm, │
│ │
│ /usr/local/lib/python3.10/dist-packages/psm_uti │
│ ls/io/percolator.py:250 in init │
│ │
│ 247 │ │ │ │ │ "Please provide the│
│ 248 │ │ │ │ ) │
│ 249 │ │ │
│ ❱ 250 │ │ if self.style == "pin": │
│ 251 │ │ │ basic_features = ["PSMScore", │
│ 252 │ │ │ self._columns = ( │
│ 253 │ │ │ │ ["SpecId", "Label", "Scan │
╰─────────────────────────────────────────────────╯
AttributeError: 'PercolatorTabWriter' object has no
attribute 'style'
`
Expected Behavior:
The pipeline should complete without errors.
Suggested Fix:
Review the changes made to the psm-utils library in the version used by MS²Rescore v3.1.2.
The text was updated successfully, but these errors were encountered: