![]() |
OpenMS
|
IChromatogramHandler implementation for DIA / SWATH / PRM / PASEF-DIA acquisitions, where chromatograms are extracted from full-scan MS2 data rather than being directly acquired as SRM/MRM traces. More...
#include <OpenMS/ANALYSIS/TARGETED/DIAChromHandler.h>
Public Member Functions | |
| DIAChromHandler ()=default | |
| ~DIAChromHandler () override=default | |
| std::vector< MSChromatogram > | collectIrtChromatogramsForIrt (const std::vector< OpenSwath::SwathMap > &swath_maps, const OpenSwath::LightTargetedExperiment &irt_transitions, const Param &mrm_mapping_param, const ChromExtractParams &cp, const TransformationDescription &trafo=TransformationDescription(), bool pasef=false, bool load_into_memory=false) override |
| Extract chromatograms for the iRT calibration transitions from each non-MS1 SWATH map. | |
| std::vector< MSChromatogram > | extractAndMapChromatogramsForTransitions (const std::vector< OpenSwath::SwathMap > &swath_maps, const OpenSwath::LightTargetedExperiment &transition_exp, const ChromExtractParams &cp, const Param &mrm_mapping_param) override |
| Extract chromatograms for the analytical transitions from each non-MS1 SWATH map. | |
Public Member Functions inherited from IChromatogramHandler | |
| IChromatogramHandler ()=default | |
| virtual | ~IChromatogramHandler ()=default |
Additional Inherited Members | |
Static Public Member Functions inherited from IChromatogramHandler | |
| static std::unique_ptr< IChromatogramHandler > | createDefault () |
| Factory: create the default handler (currently SRM/MRM-based) | |
IChromatogramHandler implementation for DIA / SWATH / PRM / PASEF-DIA acquisitions, where chromatograms are extracted from full-scan MS2 data rather than being directly acquired as SRM/MRM traces.
DIAChromHandler is the DIA-shaped sibling of MRMChromHandler. The two implement the same IChromatogramHandler interface but differ in where their chromatograms come from:
mrm_mapping_param argument of either method is therefore silently ignored.DefaultChromHandler is a thin dispatcher that owns one of each and forwards to whichever variant matches the run's acquisition mode.
Both override methods accept a pasef flag. When set, the handler performs an extra precursor-matching pass that requires every transition to carry a valid precursor IM value (via LightTransition::getPrecursorIM); transitions are then routed to the SWATH window whose IM range covers their precursor (see OpenSwathHelper::selectSwathTransitionsPasef). Without the flag the standard m/z-only window selection is used.
When load_into_memory is true the swath maps are wrapped in SpectrumAccessOpenMSInMemory before extraction, eliminating repeated disk I/O at the cost of holding the spectra in RAM for the duration of the call. Recommended for iRT calibration on small iRT-transition lists.
|
default |
|
overridedefault |
|
overridevirtual |
Extract chromatograms for the iRT calibration transitions from each non-MS1 SWATH map.
Per-map workflow:
pasef true), every transition is required to carry a valid precursor IM and OpenSwathHelper::selectSwathTransitionsPasef picks one map per transition by matching precursor IM/m/z.OpenSwathHelper::selectSwathTransitions picks the transitions whose precursor m/z falls into the map's [lower, upper] window.irt_transitions list is used as fallback so that native-ID matching against pre-acquired chromatograms can still happen.cp.rt_extraction_window >= 0.The outer loop over swath maps is OpenMP-parallel; the result vector is updated under a critical section.
| [in] | swath_maps | List of SWATH maps to extract from (MS1 maps are skipped). |
| [in] | irt_transitions | iRT calibration transitions (precursor and product info). |
| [in] | mrm_mapping_param | Currently unused (no MRMMapping pass is run); kept only to satisfy the IChromatogramHandler interface. |
| [in] | cp | Chromatogram extraction parameters (window widths, RT range, etc.). |
| [in] | trafo | RT transformation; default is identity. Inverted before being applied to extraction coordinates. |
| [in] | pasef | If true, route transitions to maps by precursor IM in addition to m/z; every transition must have a valid getPrecursorIM value. |
| [in] | load_into_memory | If true, wrap each map in SpectrumAccessOpenMSInMemory before extracting. |
| Exception::InvalidParameter | when pasef is true and any iRT transition has getPrecursorIM == -1. |
Implements IChromatogramHandler.
|
overridevirtual |
Extract chromatograms for the analytical transitions from each non-MS1 SWATH map.
For every non-MS1 swath map with a non-null spectrum-access pointer, the entire transition_exp is handed to ChromatogramExtractor::prepare_coordinates (no per-window precursor-m/z filtering is performed here), the chromatograms are extracted via ChromatogramExtractor::extractChromatograms, then ChromatogramExtractor::return_chromatogram populates them and assigns native IDs from the transition list directly. Extraction failures (any std::exception thrown by the extractor) on a single map are caught and logged at DEBUG, then the loop continues with the next map.
Mapping to transitions is therefore done implicitly via the native IDs assigned by ChromatogramExtractor — no separate MRMMapping pass is run, and the result is the concatenation of everything extracted (no per-map filtering down to a "mapped subset" either).
| [in] | swath_maps | List of SWATH maps to extract from. MS1 maps and maps with a null sptr are skipped. |
| [in] | transition_exp | Analytical transition list (passed in full to every non-skipped map). |
| [in] | cp | Chromatogram extraction parameters (window widths, RT range, etc.). |
| [in] | mrm_mapping_param | Currently unused (no MRMMapping pass is run in the DIA handler); kept only to satisfy the IChromatogramHandler interface. |
Implements IChromatogramHandler.