OpenMS
OpenSwathWorkflowBase Class Reference

#include <OpenMS/ANALYSIS/OPENSWATH/OpenSwathWorkflow.h>

Inheritance diagram for OpenSwathWorkflowBase:
[legend]
Collaboration diagram for OpenSwathWorkflowBase:
[legend]

Protected Member Functions

 OpenSwathWorkflowBase ()
 Default constructor. More...
 
 OpenSwathWorkflowBase (bool use_ms1_traces, bool use_ms1_ion_mobility, bool prm, bool pasef, int threads_outer_loop)
 Constructor. More...
 
void MS1Extraction_ (const OpenSwath::SpectrumAccessPtr &ms1_map, const std::vector< OpenSwath::SwathMap > &swath_maps, std::vector< MSChromatogram > &ms1_chromatograms, const ChromExtractParams &cp, const OpenSwath::LightTargetedExperiment &transition_exp, const TransformationDescription &trafo_inverse, bool ms1_only=false, int ms1_isotopes=0)
 Perform MS1 extraction and store result in ms1_chromatograms. More...
 
void prepareExtractionCoordinates_ (std::vector< OpenSwath::ChromatogramPtr > &chrom_list, std::vector< ChromatogramExtractorAlgorithm::ExtractionCoordinates > &coordinates, const OpenSwath::LightTargetedExperiment &transition_exp_used, const TransformationDescription &trafo_inverse, const ChromExtractParams &cp, const bool ms1=false, const int ms1_isotopes=-1) const
 Function to prepare extraction coordinates that also correctly handles RT transformations. More...
 

Protected Attributes

OpenSwath::SpectrumAccessPtr ms1_map_ = nullptr
 Spectrum Access to the MS1 map (note that this is not threadsafe!) More...
 
bool use_ms1_traces_
 Whether to use the MS1 traces. More...
 
bool use_ms1_ion_mobility_
 Whether to use ion mobility extraction on MS1 traces. More...
 
bool prm_
 Whether data is acquired in targeted DIA (e.g. PRM mode) with potentially overlapping windows. More...
 
bool pasef_
 Whether data is diaPASEF data. More...
 
int threads_outer_loop_
 How many threads should be used for the outer loop. More...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD , GUI , NONE }
 Possible log types. More...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
virtual ~ProgressLogger ()
 Destructor. More...
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor. More...
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void setLogger (ProgressLoggerImpl *logger)
 Sets the logger to be used for progress logging. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress (UInt64 bytes_processed=0) const
 
void nextProgress () const
 increment progress by 1 (according to range begin-end) More...
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Constructor & Destructor Documentation

◆ OpenSwathWorkflowBase() [1/2]

OpenSwathWorkflowBase ( )
inlineprotected

Default constructor.

Will not use any ms1 traces and use all threads in the outer loop.

◆ OpenSwathWorkflowBase() [2/2]

OpenSwathWorkflowBase ( bool  use_ms1_traces,
bool  use_ms1_ion_mobility,
bool  prm,
bool  pasef,
int  threads_outer_loop 
)
inlineprotected

Constructor.

Parameters
use_ms1_tracesUse MS1 data?
use_ms1_ion_mobilityUse ion mobility extraction on MS1 traces?
prmIs data acquired in targeted DIA (e.g. PRM mode) with potentially overlapping windows?
pasefIs this diaPASEF data?
threads_outer_loopHow many threads should be used for the outer loop (-1 will use all threads in the outer loop)
Note
The total number of threads should be divisible by this number (e.g. use 8 in outer loop if you have 24 threads in total and 3 will be used for the inner loop).

Member Function Documentation

◆ MS1Extraction_()

void MS1Extraction_ ( const OpenSwath::SpectrumAccessPtr ms1_map,
const std::vector< OpenSwath::SwathMap > &  swath_maps,
std::vector< MSChromatogram > &  ms1_chromatograms,
const ChromExtractParams cp,
const OpenSwath::LightTargetedExperiment transition_exp,
const TransformationDescription trafo_inverse,
bool  ms1_only = false,
int  ms1_isotopes = 0 
)
protected

Perform MS1 extraction and store result in ms1_chromatograms.

Parameters
ms1_mapSpectrum Access to the MS1 map
swath_mapsThe raw data (swath maps)
ms1_chromatogramsOutput vector for MS1 chromatograms
cpParameter set for the chromatogram extraction
transition_expThe set of assays to be extracted and scored
trafo_inverseInverse transformation function
ms1_onlyIf true, will only score on MS1 level and ignore MS2 level
ms1_isotopesNumber of MS1 isotopes to extract (zero means only monoisotopic peak)

◆ prepareExtractionCoordinates_()

void prepareExtractionCoordinates_ ( std::vector< OpenSwath::ChromatogramPtr > &  chrom_list,
std::vector< ChromatogramExtractorAlgorithm::ExtractionCoordinates > &  coordinates,
const OpenSwath::LightTargetedExperiment transition_exp_used,
const TransformationDescription trafo_inverse,
const ChromExtractParams cp,
const bool  ms1 = false,
const int  ms1_isotopes = -1 
) const
protected

Function to prepare extraction coordinates that also correctly handles RT transformations.

Creates a set of (empty) chromatograms and extraction coordinates with the correct ids, m/z and retention time start/end points to be extracted by the ChromatogramExtractor.

Handles RT extraction windows by calculating the correct transformation for each coordinate.

Parameters
chrom_listOutput of chromatograms (will be filled with empty chromatogram ptrs)
coordinatesOutput of extraction coordinates (will be filled with matching extraction coordinates)
transition_exp_usedThe transition experiment used to create the coordinates
trafo_inverseInverse transformation function
cpParameter set for the chromatogram extraction
ms1Whether to perform MS1 (precursor ion) or MS2 (fragment ion) extraction
ms1_isotopesNumber of MS1 isotopes to extract (zero means only monoisotopic peak)

Member Data Documentation

◆ ms1_map_

OpenSwath::SpectrumAccessPtr ms1_map_ = nullptr
protected

Spectrum Access to the MS1 map (note that this is not threadsafe!)

Note
This pointer is not threadsafe, please use the lightClone() function to create a copy for each thread
This pointer may be NULL if use_ms1_traces_ is set to false

◆ pasef_

bool pasef_
protected

Whether data is diaPASEF data.

If set to true, a precursor will only be extracted from a single window that matches both in m/z and whose ion mobility (drift time) center is closest to the library ion mobility of the precursor. This is required if windows overlap in m/z or in ion mobility, as is the case for diaPASEF data.

◆ prm_

bool prm_
protected

Whether data is acquired in targeted DIA (e.g. PRM mode) with potentially overlapping windows.

If set to true, a precursor will only be extracted from a single window that matches in m/z and whose m/z center is closest to the library m/z of the precursor. This is required if windows overlap in m/z as is the case for SRM / PRM data where often multiple windows with similar (or overlaping) m/z are used to target different precursors at different RT.

◆ threads_outer_loop_

int threads_outer_loop_
protected

How many threads should be used for the outer loop.

Note
A value of -1 will use all threads in the outer loop
The total number of threads should be divisible by this number (e.g. use 8 in outer loop if you have 24 threads in total and 3 will be used for the inner loop).

◆ use_ms1_ion_mobility_

bool use_ms1_ion_mobility_
protected

Whether to use ion mobility extraction on MS1 traces.

◆ use_ms1_traces_

bool use_ms1_traces_
protected

Whether to use the MS1 traces.