mmzdouc / FERMO

Dashboard for analysis of liquid chromatography (tandem) mass spectrometry data.
https://fermo.bioinformatics.nl/example
MIT License
28 stars 2 forks source link

Callback error updating ..store_processing.data...processed_data_FERMO.data.. #24

Closed nici7 closed 2 weeks ago

nici7 commented 4 months ago

Hi Mitja,

During processing my data in FERMO including MS2Query, the following error occured:

Traceback (most recent call last): File "C:\Users\thomenu\AppData\Local\miniconda3\envs\FERMO\lib\site-packages\flask\app.py", line 867, in full_dispatch_request rv = self.dispatch_request() File "C:\Users\thomenu\AppData\Local\miniconda3\envs\FERMO\lib\site-packages\flask\app.py", line 852, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args) File "C:\Users\thomenu\AppData\Local\miniconda3\envs\FERMO\lib\site-packages\dash\dash.py", line 1274, in dispatch ctx.run( File "C:\Users\thomenu\AppData\Local\miniconda3\envs\FERMO\lib\site-packages\dash_callback.py", line 422, in add_context raise LongCallbackError( dash.exceptions.LongCallbackError: An error occurred inside a long callback: 'NoneType' object has no attribute 'query_spectrum' Traceback (most recent call last): File "C:\Users\thomenu\AppData\Local\miniconda3\envs\FERMO\lib\site-packages\dash\long_callback\managers\diskcache_manager.py", line 175, in run user_callback_output = fn(maybe_progress, *user_callback_args) File "C:\Users\thomenu\Desktop\FERMO-main\src\fermo\app.py", line 364, in app_peaktable_processing FERMO_data = peaktable_processing(uploaded_files, dict_params,) File "C:\Users\thomenu\Desktop\FERMO-main\src\fermo\app_utils\FERMO_peaktable_processing.py", line 301, in peaktable_processing feature_dicts = ms2query_search( File "C:\Users\thomenu\Desktop\FERMO-main\src\fermo\processing\ms2query_search.py", line 160, in ms2query_search feature_ID = results_table.query_spectrum.get('id') AttributeError: 'NoneType' object has no attribute 'query_spectrum'


The error does not occur if I process the exemple data. But I did not find differences in the table format or mgf file (only that the latter also includes the row MERGED_STATS= ) The processing of my data without MS2Query works fine.

Thank you! Nicola

mmzdouc commented 4 months ago

Hi Nicola,

thanks for your interest in FERMO!

The error seems to be related to the generation of the MS2 spectra that are used for MS2Query matching. I haven't seen this error before. It is interesting that it only occurrs during MS2Query maching. I assume that you also did the molecular network/spectral similarity network analysis? This also uses the MS2 spectra, so it is curious that FERMO did not break before.

I would need some additional information to troubleshoot the error:

Kind regards,

Mitja

nici7 commented 4 months ago

Hi, Thanks for your fast reply! Yes, the creation of the molecular networks in FERMO did work.

BEGIN IONS FEATURE_ID=1208 PEPMASS=139.9879 SCANS=1208 RTINSECONDS=677.18 CHARGE=0+ MSLEVEL=2 140.0578 2.0E2 END IONS

BEGIN IONS FEATURE_ID=95 PEPMASS=143.0815 SCANS=95 RTINSECONDS=161.096 CHARGE=0+ MSLEVEL=2 MERGED_STATS=1 / 2 (0 removed due to low quality, 1 removed due to low cosine). 102.0130 4.2E2 115.0861 5.3E2 END IONS

BEGIN IONS FEATURE_ID=1794 PEPMASS=144.9820 SCANS=1794 RTINSECONDS=790.615 CHARGE=0+ MSLEVEL=2 MERGED_STATS=14 / 14 (0 removed due to low quality, 0 removed due to low cosine). 102.8896 4.8E2 103.9553 5.1E5 104.0221 4.9E2 104.0257 1.8E3 104.1936 5.2E2 121.9653 4.2E3 144.9831 8.8E2 145.0802 1.5E3 END IONS

Thanks! Best regards, Nicola

mmzdouc commented 4 months ago

Hi Nicola,

thanks for the data! I used your MS/MS data to create a "fake" dataset of two features and processed it with FERMO 0.8.11 with MS2Query switched on. This worked out and although there were no matches, there was also no error. The "MERGED_STATS" does not seem to be the issue. I also re-processed my old data with MZmine version 3.9 and everything worked out.

I am a bit puzzled and the only thing I can think of is that the issue is with MS2Query (or its implementation in FERMO).

We are currently working on a complete rewrite of FERMO, with an estimated release by mid- to end-March. This release will also feature a re-implementation of MS2Query. While I cannot think of an easy way to fix your error in FERMO 0.8.11, I am positive that this issue won't arise with FERMO 1.0.0. I will leave this Issue open and notify you once we release the new version.

Sorry that I couldn't be of greater help.

Kind regards,

Mitja

mmzdouc commented 2 weeks ago

Not applicable in version >=1.0.0