OpenMS
|
Execute all steps for retention time and m/z calibration of SWATH-MS data. More...
#include <OpenMS/ANALYSIS/OPENSWATH/OpenSwathWorkflow.h>
Public Member Functions | |
OpenSwathCalibrationWorkflow () | |
OpenSwathCalibrationWorkflow (bool use_ms1_traces) | |
TransformationDescription | performRTNormalization (const OpenSwath::LightTargetedExperiment &irt_transitions, std::vector< OpenSwath::SwathMap > &swath_maps, TransformationDescription &im_trafo, double min_rsq, double min_coverage, const Param &feature_finder_param, const ChromExtractParams &cp_irt, const Param &irt_detection_param, const Param &calibration_param, const String &irt_mzml_out, Size debug_level, bool sonar=false, bool pasef=false, bool load_into_memory=false) |
Perform RT and m/z correction of the input data using RT-normalization peptides. More... | |
TransformationDescription | doDataNormalization_ (const OpenSwath::LightTargetedExperiment &transition_exp_, const std::vector< OpenMS::MSChromatogram > &chromatograms, TransformationDescription &im_trafo, std::vector< OpenSwath::SwathMap > &swath_maps, double min_rsq, double min_coverage, const Param &default_ffparam, const Param &irt_detection_param, const Param &calibration_param, const bool pasef) |
Perform retention time and m/z calibration. More... | |
void | simpleExtractChromatograms_ (const std::vector< OpenSwath::SwathMap > &swath_maps, const OpenSwath::LightTargetedExperiment &irt_transitions, std::vector< OpenMS::MSChromatogram > &chromatograms, const TransformationDescription &trafo, const ChromExtractParams &cp, bool sonar, bool pasef, bool load_into_memory) |
Simple method to extract chromatograms (for the RT-normalization peptides) More... | |
Public Member Functions inherited from ProgressLogger | |
ProgressLogger () | |
Constructor. More... | |
virtual | ~ProgressLogger () |
Destructor. More... | |
ProgressLogger (const ProgressLogger &other) | |
Copy constructor. More... | |
ProgressLogger & | operator= (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 Public Member Functions | |
static void | addChromatograms (MSChromatogram &base_chrom, const MSChromatogram &newchrom) |
Add two chromatograms. More... | |
Additional Inherited Members | |
Public Types inherited from ProgressLogger | |
enum | LogType { CMD , GUI , NONE } |
Possible log types. More... | |
Protected Member Functions inherited from OpenSwathWorkflowBase | |
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 inherited from OpenSwathWorkflowBase | |
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_ |
ProgressLoggerImpl * | current_logger_ |
Static Protected Attributes inherited from ProgressLogger | |
static int | recursion_depth_ |
Execute all steps for retention time and m/z calibration of SWATH-MS data.
Uses a set of robust calibrant peptides (e.g. iRT peptides, common calibrants) perform RT and m/z correction in SWATH-MS data. Currently supports (non-)linear correction of RT against library RT as well as (non-)linear correction of m/z error as a function of m/z.
The overall execution flow in this class is as follows (see performRTNormalization() function):
|
inline |
|
inlineexplicit |
|
static |
Add two chromatograms.
base_chrom | The base chromatogram to which we will add intensity |
newchrom | The chromatogram to be added |
TransformationDescription doDataNormalization_ | ( | const OpenSwath::LightTargetedExperiment & | transition_exp_, |
const std::vector< OpenMS::MSChromatogram > & | chromatograms, | ||
TransformationDescription & | im_trafo, | ||
std::vector< OpenSwath::SwathMap > & | swath_maps, | ||
double | min_rsq, | ||
double | min_coverage, | ||
const Param & | default_ffparam, | ||
const Param & | irt_detection_param, | ||
const Param & | calibration_param, | ||
const bool | pasef | ||
) |
Perform retention time and m/z calibration.
Uses MRMRTNormalizer for RT calibration and SwathMapMassCorrection for m/z calibration.
The overall execution flow is as follows:
transition_exp_ | The transitions for the normalization peptides | |
chromatograms | The extracted chromatograms | |
[out] | im_trafo | Ion mobility trafo values on the RT-normalization peptides |
swath_maps | The raw data (swath maps) | |
min_rsq | Minimal R^2 value that is expected for the RT regression | |
min_coverage | Minimal coverage of the chromatographic space that needs to be achieved | |
default_ffparam | Parameter set for the feature finding in chromatographic dimension | |
irt_detection_param | Parameter set for the detection of the iRTs (outlier detection, peptides per bin etc) | |
calibration_param | Parameter for the m/z and im calibration (see SwathMapMassCorrection) | |
pasef | whether this data is pasef data with potentially overlapping m/z windows (differing by IM) |
TransformationDescription performRTNormalization | ( | const OpenSwath::LightTargetedExperiment & | irt_transitions, |
std::vector< OpenSwath::SwathMap > & | swath_maps, | ||
TransformationDescription & | im_trafo, | ||
double | min_rsq, | ||
double | min_coverage, | ||
const Param & | feature_finder_param, | ||
const ChromExtractParams & | cp_irt, | ||
const Param & | irt_detection_param, | ||
const Param & | calibration_param, | ||
const String & | irt_mzml_out, | ||
Size | debug_level, | ||
bool | sonar = false , |
||
bool | pasef = false , |
||
bool | load_into_memory = false |
||
) |
Perform RT and m/z correction of the input data using RT-normalization peptides.
This function extracts the RT normalization chromatograms using simpleExtractChromatograms_() and then uses the chromatograms to find features (in doDataNormalization_()). If desired, also m/z correction is performed using the lock masses of the given peptides. The provided raw data (swath_maps) are therefore not constant but may be changed in this function.
irt_transitions | A set of transitions used for the RT normalization peptides | |
swath_maps | The raw data (swath maps) | |
[out] | im_trafo | Ion mobility trafo values on the RT-normalization peptides |
min_rsq | Minimal R^2 value that is expected for the RT regression | |
min_coverage | Minimal coverage of the chromatographic space that needs to be achieved | |
feature_finder_param | Parameter set for the feature finding in chromatographic dimension | |
cp_irt | Parameter set for the chromatogram extraction | |
irt_detection_param | Parameter set for the detection of the iRTs (outlier detection, peptides per bin etc) | |
calibration_param | Parameter for the m/z and im calibration (see SwathMapMassCorrection) | |
debug_level | Debug level (writes out the RT normalization chromatograms if larger than 1) | |
irt_mzml_out | Output Chromatogram mzML containing the iRT peptides (if not empty, iRT chromatograms will be stored in this file) | |
sonar | Whether the data is SONAR data | |
pasef | whether the data is PASEF data (should match transitions by their IM) | |
load_into_memory | Whether to cache the current SWATH map in memory |
Referenced by TOPPOpenSwathBase::performCalibration().
void simpleExtractChromatograms_ | ( | const std::vector< OpenSwath::SwathMap > & | swath_maps, |
const OpenSwath::LightTargetedExperiment & | irt_transitions, | ||
std::vector< OpenMS::MSChromatogram > & | chromatograms, | ||
const TransformationDescription & | trafo, | ||
const ChromExtractParams & | cp, | ||
bool | sonar, | ||
bool | pasef, | ||
bool | load_into_memory | ||
) |
Simple method to extract chromatograms (for the RT-normalization peptides)
swath_maps | The raw data (swath maps) |
irt_transitions | A set of transitions used for the RT normalization peptides |
chromatograms | The extracted chromatograms (output) |
trafo | Transformation description for RT normalization |
cp | Parameter set for the chromatogram extraction |
load_into_memory | Whether to cache the current SWATH map in memory |
sonar | Whether the data is SONAR data |
pasef | whether the data is PASEF data with possible overlapping m/z windows (with different ion mobility) |