OpenMS
2.7.0
|
The ChromatogramExtractorAlgorithm extracts chromatograms from a MS data. More...
#include <OpenMS/ANALYSIS/OPENSWATH/ChromatogramExtractorAlgorithm.h>
Classes | |
struct | ExtractionCoordinates |
Public Member Functions | |
void | extractChromatograms (const OpenSwath::SpectrumAccessPtr input, std::vector< OpenSwath::ChromatogramPtr > &output, const std::vector< ExtractionCoordinates > &extraction_coordinates, double mz_extraction_window, bool ppm, double im_extraction_window, const String &filter) |
Extract chromatograms at the m/z and RT defined by the ExtractionCoordinates. More... | |
void | extract_value_tophat (const std::vector< double >::const_iterator &mz_start, std::vector< double >::const_iterator &mz_it, const std::vector< double >::const_iterator &mz_end, std::vector< double >::const_iterator &int_it, const double mz, double &integrated_intensity, const double mz_extraction_window, const bool ppm) |
Extract the next mz value and add the integrated intensity to integrated_intensity. More... | |
void | extract_value_tophat (const std::vector< double >::const_iterator &mz_start, std::vector< double >::const_iterator &mz_it, const std::vector< double >::const_iterator &mz_end, std::vector< double >::const_iterator &int_it, std::vector< double >::const_iterator &im_it, const double mz, const double im, double &integrated_intensity, const double mz_extraction_window, const double im_extraction_window, const bool ppm) |
Extract the next m/z value and add the integrated intensity to integrated_intensity. 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 | 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 () const |
Ends the progress display. More... | |
void | nextProgress () const |
increment progress by 1 (according to range begin-end) More... | |
Private Member Functions | |
int | getFilterNr_ (const String &filter) |
Additional Inherited Members | |
Public Types inherited from ProgressLogger | |
enum | LogType { CMD , GUI , NONE } |
Possible log types. More... | |
Static Protected Member Functions inherited from ProgressLogger | |
static String | logTypeToFactoryName_ (LogType type) |
Return the name of the factory product used for this log type. 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_ |
The ChromatogramExtractorAlgorithm extracts chromatograms from a MS data.
It will take as input a set of transitions coordinates and will extract the signal of the provided map at the product ion m/z and retention time (rt) values specified by the extraction coordinates. This interface only expects a set of coordinates which are up to the user to fill but a convenient prepare_coordinates function is provided (in the ChromatogramExtractor class) to create the coordinates for the most common case of an MS2 and MS1 extraction.
In the case of MS2 extraction, the map is assumed to originate from a SWATH (data-independent acquisition or DIA) experiment.
void extract_value_tophat | ( | const std::vector< double >::const_iterator & | mz_start, |
std::vector< double >::const_iterator & | mz_it, | ||
const std::vector< double >::const_iterator & | mz_end, | ||
std::vector< double >::const_iterator & | int_it, | ||
const double | mz, | ||
double & | integrated_intensity, | ||
const double | mz_extraction_window, | ||
const bool | ppm | ||
) |
Extract the next mz value and add the integrated intensity to integrated_intensity.
This function will sum up all intensities within a window of mass-to-charge. It will extract around mz +/- mz_extract_window / 2.0 and add the result to integrated_intensity.
mz_start | Start of the spectrum (m/z coordinates) |
mz_it | Current m/z position (will be modified) |
mz_end | End of the spectrum (m/z coordinates) |
int_int | Current intensity position (will be modified) |
mz | Target m/z for the current ion |
integrated_intensity | Resulting intensity (will be overwritten) |
mz_extraction_window | Extracts a window of this size in m/z dimension (e.g. a window of 50 ppm means an extraction of 25 ppm on either side) |
ppm | Whether the parameter mz_extraction_window is given in ppm or Th |
void extract_value_tophat | ( | const std::vector< double >::const_iterator & | mz_start, |
std::vector< double >::const_iterator & | mz_it, | ||
const std::vector< double >::const_iterator & | mz_end, | ||
std::vector< double >::const_iterator & | int_it, | ||
std::vector< double >::const_iterator & | im_it, | ||
const double | mz, | ||
const double | im, | ||
double & | integrated_intensity, | ||
const double | mz_extraction_window, | ||
const double | im_extraction_window, | ||
const bool | ppm | ||
) |
Extract the next m/z value and add the integrated intensity to integrated_intensity.
This function will sum up all intensities within a two-dimensional window of mass-to-charge and ion mobility. It will extract around mz +/- mz_extract_window / 2.0 and im +/- im_extraction_window / 2.0 and add the result to integrated_intensity.
mz_start | Start of the spectrum (m/z coordinates) |
mz_it | Current m/z position (will be modified) |
mz_end | End of the spectrum (m/z coordinates) |
int_int | Current intensity position (will be modified) |
im_int | Current ion mobility position (will be modified) |
mz | Target m/z for the current ion |
im | Target ion mobility for the current ion |
integrated_intensity | Resulting intensity (will be overwritten) |
mz_extraction_window | Extracts a window of this size in m/z dimension (e.g. a window of 50 ppm means an extraction of 25 ppm on either side) |
im_extraction_window | Extracts a window of this size in ion mobility dimension. |
ppm | Whether the parameter mz_extraction_window is given in ppm or Th |
void extractChromatograms | ( | const OpenSwath::SpectrumAccessPtr | input, |
std::vector< OpenSwath::ChromatogramPtr > & | output, | ||
const std::vector< ExtractionCoordinates > & | extraction_coordinates, | ||
double | mz_extraction_window, | ||
bool | ppm, | ||
double | im_extraction_window, | ||
const String & | filter | ||
) |
Extract chromatograms at the m/z and RT defined by the ExtractionCoordinates.
input | Input spectral map |
output | Output chromatograms (XICs) |
extraction_coordinates | Extracts around these coordinates (from rt_start to rt_end in seconds - extracts the whole chromatogram if rt_end - rt_start < 0). |
mz_extraction_window | Extracts a window of this size in m/z dimension in Th or ppm (e.g. a window of 50 ppm means an extraction of 25 ppm on either side) |
ppm | Whether mz_extraction_window is in ppm or in Th |
filter | Which function to apply in m/z space (currently "tophat" only) |
Referenced by ChromatogramExtractor::extractChromatograms().
|
private |