compomics / ms2rescore

Modular and user-friendly platform for AI-assisted rescoring of peptide identifications
https://ms2rescore.readthedocs.io
Apache License 2.0
39 stars 14 forks source link

Percolator [WinError 2] The system cannot find the file specified with the .pin #109

Closed NicolasProvencher closed 7 months ago

NicolasProvencher commented 7 months ago

Hi again, another issue comes up when i skip deeplc and percolator is started, It seems to have difficulty finding the .pin created by ms2pip. Here is the log

Using 12 of 12 available CPUs.
Reading PSMs from file...
Reading PSMs from PSM file (1/1): `C:/Users/pron2107/Desktop/mspipeline/test1/report/test1.mzid`...
Finding decoys...
Found 54927 PSMs, of which 41.02% are decoys.
Recalculating q-values...
Parsing modifications...
Found modifications: {'Glu->pyro-Glu', 'Gln->pyro-Glu', 'Oxidation', 'Carbamidomethyl', 'Acetyl'}
Non-mapped modifications found: {'Carbamidomethyl', 'Glu->pyro-Glu', 'Gln->pyro-Glu'}
This can be ignored if Unimod modification label
Applying `psm_id_pattern`...
Parsing `controllerType=0 controllerNumber=1 scan=109268` to `109268`
Found 2954 identified PSMs at 1% FDR before rescoring.
PSMs already contain the following rescoring features: set()
Adding basic features to PSMs.
Adding features from basic: {'charge_4', 'abs_ms1_error_ppm', 'charge_1', 'search_engine_score', 'charge_n', 'charge_6', 'charge_5', 'charge_2', 'charge_3'}
Adding MS²PIP-derived features to PSMs.
Running MS²PIP for PSMs from run (1/1) `586APMS_FLAG_alt1`...
Using spectrum file `C:\Users\pron2107\Desktop\mspipeline\test1\586APMS_FLAG_alt1.mzML`
Read 54927 PSMs.
Using HCD2021 model
Processing spectra and peptides...
Starting workers (processes=12)...
Processing 12 chunk(s) of ~4578 entries each.
Gathered data for 54927 PSMs.
Converting feature vectors to XGBoost DMatrix...
Initializing model from file: `C:\Users\pron2107\.ms2pip\model_20210416_HCD2021_B.xgboost`
Initializing model from file: `C:\Users\pron2107\.ms2pip\model_20210416_HCD2021_Y.xgboost`
Predicting intensities from XGBoost model files...
Adding XGBoost predictions to results...
Calculating features from predicted spectra
Adding features from ms2pip: {'cos', 'iony_abs_diff_Q3_norm', 'mean_abs_diff', 'ionb_mse_norm', 'spec_mse_norm', 'ionb_max_abs_diff_norm', 'max_abs_diff_iontype', 'ionb_abs_diff_Q2', 'iony_mean_abs_diff_norm', 'dotprod', 'mean_abs_diff_norm', 'dotprod_iony', 'abs_diff_Q2', 'iony_max_abs_diff', 'min_abs_diff_iontype', 'dotprod_ionb', 'iony_max_abs_diff_norm', 'spec_pearson_norm', 'ionb_pearson', 'iony_abs_diff_Q2_norm', 'dotprod_ionb_norm', 'ionb_mse', 'ionb_abs_diff_Q3', 'iony_std_abs_diff', 'abs_diff_Q1', 'iony_pearson', 'ionb_pearson_norm', 'iony_std_abs_diff_norm', 'dotprod_norm', 'iony_min_abs_diff_norm', 'min_abs_diff_norm', 'spec_pearson', 'min_abs_diff', 'ionb_abs_diff_Q1', 'cos_ionb', 'ionb_std_abs_diff', 'ionb_abs_diff_Q1_norm', 'iony_abs_diff_Q3', 'ionb_abs_diff_Q3_norm', 'cos_iony_norm', 'iony_pearson_norm', 'spec_mse', 'cos_ionb_norm', 'abs_diff_Q3', 'abs_diff_Q1_norm', 'iony_abs_diff_Q2', 'abs_diff_Q3_norm', 'iony_abs_diff_Q1_norm', 'cos_iony', 'spec_spearman', 'iony_mse_norm', 'ionb_min_abs_diff_norm', 'std_abs_diff', 'ionb_max_abs_diff', 'iony_min_abs_diff', 'ionb_min_abs_diff', 'ionb_abs_diff_Q2_norm', 'std_abs_diff_norm', 'ionb_std_abs_diff_norm', 'iony_mse', 'max_abs_diff_norm', 'ionb_spearman', 'ionb_mean_abs_diff', 'cos_norm', 'ionb_mean_abs_diff_norm', 'iony_mean_abs_diff', 'max_abs_diff', 'dotprod_iony_norm', 'abs_diff_Q2_norm', 'iony_abs_diff_Q1', 'iony_spearman'}
Writing PIN file to C:/Users/pron2107/Desktop/mspipeline/test1/test.pin
Running percolator command percolator --results-psms C:/Users/pron2107/Desktop/mspipeline/test1/test_target_psms.pout --decoy-results-psms C:/Users/pron2107/Desktop/mspipeline/test1/test_decoy_psms.pout --results-peptides C:/Users/pron2107/Desktop/mspipeline/test1/test_target_peptides.pout --decoy-results-peptides C:/Users/pron2107/Desktop/mspipeline/test1/test_decoy_peptides.pout --results-proteins C:/Users/pron2107/Desktop/mspipeline/test1/test_target_proteins.pout --decoy-results-proteins C:/Users/pron2107/Desktop/mspipeline/test1/test_decoy_proteins.pout --weights C:/Users/pron2107/Desktop/mspipeline/test1/test.weights --verbose 1 --num-threads 12 --post-processing-tdc C:/Users/pron2107/Desktop/mspipeline/test1/test.pin
[WinError 2] The system cannot find the file specified
Traceback (most recent call last):
  File "ms2rescore\gui\function2ctk.py", line 301, in run
    self.fn(*self.fn_args, **self.fn_kwargs)
  File "ms2rescore\gui\app.py", line 637, in function
    rescore(configuration=config)
  File "ms2rescore\core.py", line 119, in rescore
    percolator.rescore(
  File "ms2rescore\rescoring_engines\percolator.py", line 112, in rescore
    output = subprocess.run(percolator_cmd, capture_output=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "subprocess.py", line 548, in run
  File "subprocess.py", line 1026, in __init__
  File "subprocess.py", line 1538, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

When i check the directory, the file is there.

It seems to do the error both on my work laptop which is running w11 and the MS desktop which is running on w10

It seems to not be an issues on another of our windows computer and i cant figure out why

if there are anything i can do to help get more information or any thread you can suggest to me that i can pull it would be my pleasure to help

Nicolas

RalfG commented 7 months ago

Hi Nicolas,

Thanks for posting! Could you check if Percolator itself is installed and that the percolator command is available on the command line?

Best, Ralf

NicolasProvencher commented 7 months ago

Hi Ralf

It does seems like percolator isn't installed

First, since i used the .exe to install ms2rescore i dont think i can access it through when i start the shell. It seems like the installer didn't add a path to any of the installed program/package.

When i add the folder with the ms2rescore.exe to the path and launch ms2rescore -v it also only open the gui and doesnt seem to act like a cli program, I dont know if this is also a concern.

Second, when i go check where ms2rescore is installed "C:\Users\pron2107\AppData\Local\Programs\MS2Rescore_internal" i cant seem to find any folder for percolator while mokapot has one, is it possible that its missing from your .exe installer

I tried installing percolator separately and running it, it does seems like percolator started (a shell windows briefly opened) but returned me with the same error, yet a different error path this time

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\pron2107\\Desktop\\mspipeline\\test1\\ms2rescore\\test4_target_psms.pout'

2 question,

  1. Is it normal the your exe doesnt change the path variable to include ms2rescore installation path
  2. Is it normal that percolator isnt installed by default by your exe nor is there any documentation saying it should be installed separately

Thanks a lot for the help

Nicolas

RalfG commented 7 months ago

Hi Nicolas,

  1. Indeed, the bundled exe installer is currently only meant to be used for the graphical user interface. To use MS²Rescore on the command line, it must be installed with pip, conda, or docker.
  2. We indeed do not ship Percolator as part of the installer. This is now more clearly documented and I have made the error message more descriptive.

Thanks for the feedback!