Repository navigation
Closed
Labels
Description
OpenSwathWorkflow seems to attempt to integrate with drift time for regular DIA (non ion mobility) data. The ion mobility params are turned off, so I'm not sure why it would still try to integrate with drift_time.
Also noticed use_ms1_ion_mobility seems to be a duplicated param.
params
TOPPBase.cpp(1662): Value of string option 'no_progress': 0
TOPPBase.cpp(1662): Value of string option 'in': /data/input/20200902_Erli_pro_117.mzML.gz
TOPPBase.cpp(1662): Value of string option 'tr': /data/input/library.pqp
TOPPBase.cpp(1662): Value of string option 'out_features': /data/20200902_Erli_pro_117.osw
TOPPBase.cpp(1662): Value of string option 'tr_type':
TOPPBase.cpp(1662): Value of string option 'out_features_type':
TOPPBase.cpp(1662): Value of string option 'out_qc':
TOPPBase.cpp(1662): Value of string option 'tr_irt': /data/input/20200902_Erli_pro_117_Q1_run_peaks_linear.pqp
TOPPBase.cpp(1662): Value of string option 'tr_irt_nonlinear': /data/input/20200902_Erli_pro_117_Q1_run_peaks.pqp
TOPPBase.cpp(1662): Value of string option 'rt_norm':
TOPPBase.cpp(1662): Value of string option 'swath_windows_file':
TOPPBase.cpp(1662): Value of string option 'out_chrom': /data/20200902_Erli_pro_117.sqMass
TOPPBase.cpp(1662): Value of string option 'split_file_input': 0
TOPPBase.cpp(1662): Value of string option 'use_elution_model_score': 0
TOPPBase.cpp(1662): Value of string option 'force': 1
TOPPBase.cpp(1662): Value of string option 'pasef': 0
TOPPBase.cpp(1662): Value of string option 'sort_swath_maps': 0
TOPPBase.cpp(1662): Value of string option 'enable_ms1': true
TOPPBase.cpp(1662): Value of string option 'enable_ipf': true
TOPPBase.cpp(1662): Value of int option 'batchSize': 1000
TOPPBase.cpp(1662): Value of int option 'outer_loop_threads': -1
TOPPBase.cpp(1662): Value of int option 'ms1_isotopes': 3
TOPPBase.cpp(1662): Value of int option 'debug': 1
TOPPBase.cpp(1662): Value of double option 'min_rsq': 0.95
TOPPBase.cpp(1662): Value of double option 'min_coverage': 0.6
TOPPBase.cpp(1662): Value of string option 'readOptions': cacheWorkingInMemory
TOPPBase.cpp(1662): Value of string option 'mz_correction_function': quadratic_regression_delta_ppm
TOPPBase.cpp(1662): Value of string option 'tempDirectory': /data/tmp/
TOPPBase.cpp(1662): Value of double option 'min_upper_edge_dist': 1.0
TOPPBase.cpp(1662): Value of string option 'use_ms1_ion_mobility': false
TOPPBase.cpp(1662): Value of string option 'matching_window_only': false
TOPPBase.cpp(1662): Value of double option 'mz_extraction_window': 20.0
TOPPBase.cpp(1662): Value of string option 'mz_extraction_window_unit': ppm
TOPPBase.cpp(1662): Value of double option 'rt_extraction_window': 300.0
TOPPBase.cpp(1662): Value of double option 'ion_mobility_window': -1.0
TOPPBase.cpp(1662): Value of string option 'extraction_function': tophat
TOPPBase.cpp(1662): Value of double option 'extra_rt_extraction_window': 0.0
TOPPBase.cpp(1662): Value of double option 'irt_mz_extraction_window': 40.0
TOPPBase.cpp(1662): Value of double option 'irt_im_extraction_window': -1.0
TOPPBase.cpp(1662): Value of string option 'irt_mz_extraction_window_unit': ppm
TOPPBase.cpp(1662): Value of double option 'mz_extraction_window_ms1': 20.0
TOPPBase.cpp(1662): Value of string option 'mz_extraction_window_ms1_unit': ppm
TOPPBase.cpp(1662): Value of string option 'use_ms1_ion_mobility': false
Log
MRMTransitionGroupPicker.h(214): **** Creating MRMFeature for peak 0 in chrom. 0 with POS: 809.17 INT: 112815 and borders 805.843 817.14 (11.2979)
MRMTransitionGroupPicker.h(979): * peak 0 left boundary 805.843 with inty 397496
MRMTransitionGroupPicker.h(980): * peak 0 right boundary 817.14 with inty 397496
MRMTransitionGroupPicker.h(979): * peak 1 left boundary 803.017 with inty 8280.83
MRMTransitionGroupPicker.h(980): * peak 1 right boundary 825.609 with inty 8280.83
MRMTransitionGroupPicker.h(1008): - Recalculating right peak boundaries 821.375 mean / best 817.14 std 4.23444 : 1 coefficient of variation
MRMTransitionGroupPicker.h(1016): - CV too large: correcting right boundary to 825.609
MRMTransitionGroupPicker.h(1025): - Recalculating left peak boundaries 804.43 mean / best 805.843 std 1.41281 : 1 coefficient of variation
MRMTransitionGroupPicker.h(1033): - CV too large: correcting left boundary to 805.843
MRMTransitionGroupPicker.h(735): ** Removed 2 peaks enclosed in and 0 peaks overlapping with added feature.
MRMTransitionGroupPicker.h(153): **** No more peaks left. Nr. chroms: 6
MRMFeatureFinderScoring.cpp(607): Scoring feature RT: 873.494 MZ: 0 INT: 1.59159e+07 == 13136 [ expected RT 9.69507 / 915.457 ] with 6 transitions and 6 chromatograms
---------------------------------------------------
FATAL: uncaught exception!
---------------------------------------------------
last entry in the exception handler:
exception of type MissingInformation occurred in line 82, function void OpenMS::DIAHelpers::integrateWindow_(const SpectrumPtr&, double&, double&, double&, const OpenMS::RangeMZ&, const OpenMS::RangeMobility&, bool) of /code/OpenMS/src/openms/source/ANALYSIS/OPENSWATH/DIAHelper.cpp
error message: Cannot integrate with drift time if no drift time is available
---------------------------------------------------
Activity
singjc commentedon Mar 5, 2025
@jcharkow, off quick glance, do you know why this would occur? Shouldn't the im_ranges and im related stuff be turned off if pasef is not set and the ion_mobility scoring is turned off?
jcharkow commentedon Mar 5, 2025
Sorry, at quick glance I am not sure.
Some possibilities:
PASEF flag should be unrelated, I don't think it is passed this far down in the workflow. Also I the error is occurring when intensity of the feature is computed so I don't think it would be related to IM scores either.
Can you post the run command?
singjc commentedon Mar 5, 2025
Looking at the library, there is no IM information, so probably rules out that.
I don't set the IM extraction windows either 🤔
Yeah it's occurring during scoring, I think it's most likely during the DIAScoring
timosachsenberg commentedon Mar 5, 2025
Let's if AI is helpful:
Based on my analysis of the OpenSwathWorkflow code, I've identified the issue with drift time integration for regular DIA (non-ion mobility) data.
The Issue
The problem occurs in the DIAScoring process during the OpenSwathWorkflow execution. Even when ion mobility parameters are turned off, the code is still passing a RangeMobility object to various scoring functions that handle drift time.
Key findings:
In OpenSwathScoring.cpp, the calculateDIAScores function takes a RangeMobility& im_range parameter that is passed to various scoring functions, including:
diascoring.dia_massdiff_score
diascoring.score_with_isotopes
diascoring.dia_isotope_scores
For MS1 scoring, there's a check that correctly creates an empty RangeMobility object when ion mobility is disabled:
RangeMobility im_range_ms1;
if (use_ms1_ion_mobility_)
{
im_range_ms1 = im_range;
}
else // do not extract across IM in MS1
{
im_range_ms1 = RangeMobility();
}
However, for MS2 scoring, there's no similar check. The im_range parameter is passed directly to the scoring functions regardless of whether ion mobility is enabled.
In OpenSwathWorkflow.cpp, when calling scoreAllChromatograms_, the im_range parameter is passed from the extraction process, but there's no check to ensure it's empty when ion mobility is disabled.
The Root Cause
The root cause is that when ion mobility is disabled, a non-empty RangeMobility object is still being passed to the DIAScoring functions. This causes the scoring functions to attempt to filter spectra by drift time, even though this shouldn't happen for regular DIA data.
The issue is likely in the OpenSwathWorkflow::scoreAllChromatograms_ function, where the im_range parameter is not properly initialized as empty when ion mobility is disabled.
Solution
The solution would be to ensure that when ion mobility is disabled, an empty RangeMobility object is passed to the DIAScoring functions. This could be done by:
Adding a check in OpenSwathWorkflow::scoreAllChromatograms_ to create an empty RangeMobility object when ion mobility is disabled.
Or, modifying the fetchSpectrumSwath function in OpenSwathScoring.cpp to ignore the im_range parameter when ion mobility is disabled.
Alternatively, adding a check in each DIAScoring function to ignore the im_range parameter when it's not empty but ion mobility is disabled.
The most straightforward fix would be to add a check in OpenSwathWorkflow::scoreAllChromatograms_ similar to the one for MS1 scoring, to ensure that an empty RangeMobility object is used when ion mobility is disabled.
singjc commentedon Mar 5, 2025
Kind of close, the error seems to stem from the
MRMFeatureFinderScoring::scoreIdentification_method, theim_rangeseems to be set in MRMFeatureFinderScoring.cpp#L319-L328. Even though the there is no drift time set in the library, it still gets set to a value of -1 to -1, soim_rangeends up not being empty, which is why it tries to integrate the drift time as well.I am wondering why we don't pass the same
im_rangethat is used by the regular/detecting DIA scores toscoreIdentification_(MRMFeatureFinderScoring.cpp#L732-L775)? @jcharkow?