OpenMS
Loading...
Searching...
No Matches
PeakMapExtractor Class Reference

Extract raw mz/RT/IM peak clouds for targeted OpenSWATH coordinates. More...

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

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

Classes

struct  ExtractedPeakMap
 One extracted targeted peak map. More...
 

Public Types

using ExtractionCoordinates = ChromatogramExtractorAlgorithm::ExtractionCoordinates
 
- Public Types inherited from ProgressLogger
enum  LogType { CMD , GUI , NONE }
 Possible log types. More...
 

Public Member Functions

void extractPeakMaps (const OpenSwath::SpectrumAccessPtr &input, std::vector< ExtractedPeakMap > &output, const std::vector< ExtractionCoordinates > &extraction_coordinates, double mz_extraction_window, bool ppm, double im_extraction_window, const std::string &filter="tophat")
 Extract raw peak maps at the coordinates defined by extraction_coordinates.
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor.
 
virtual ~ProgressLogger ()
 Destructor.
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor.
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator.
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE!
 
LogType getLogType () const
 Returns the type of progress log being used.
 
void setLogger (ProgressLoggerImpl *logger)
 Sets the logger to be used for progress logging.
 
void startProgress (SignedSize begin, SignedSize end, const std::string &label) const
 Initializes the progress display.
 
void setProgress (SignedSize value) const
 Sets the current progress.
 
void endProgress (UInt64 bytes_processed=0) const
 
void nextProgress () const
 increment progress by 1 (according to range begin-end)
 

Private Member Functions

int getFilterNr_ (const std::string &filter) const
 

Additional Inherited Members

- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

Extract raw mz/RT/IM peak clouds for targeted OpenSWATH coordinates.

The extractor follows the same targeting contract as ChromatogramExtractorAlgorithm. It consumes sorted extraction coordinates and applies RT, m/z, and optionally ion mobility windows. Unlike chromatogram extraction, it retains every matching raw point instead of integrating a scalar intensity per spectrum.

The output is one extracted peak map per coordinate. Each peak map stores parallel arrays for m/z, RT, ion mobility, and intensity.


Class Documentation

◆ OpenMS::PeakMapExtractor::ExtractedPeakMap

struct OpenMS::PeakMapExtractor::ExtractedPeakMap

One extracted targeted peak map.

Collaboration diagram for PeakMapExtractor::ExtractedPeakMap:
[legend]
Class Members
vector< double > intensity
vector< double > ion_mobility
vector< double > mz
string native_id
vector< double > rt
double rt_end {-1.0}
double rt_start {0.0}
double target_ion_mobility {-1.0}
double target_mz {0.0}
double target_rt {std::numeric_limits<double>::quiet_NaN()}

Member Typedef Documentation

◆ ExtractionCoordinates

Member Function Documentation

◆ extractPeakMaps()

void extractPeakMaps ( const OpenSwath::SpectrumAccessPtr input,
std::vector< ExtractedPeakMap > &  output,
const std::vector< ExtractionCoordinates > &  extraction_coordinates,
double  mz_extraction_window,
bool  ppm,
double  im_extraction_window,
const std::string &  filter = "tophat" 
)

Extract raw peak maps at the coordinates defined by extraction_coordinates.

Parameters
[in]inputInput spectral map
[out]outputOutput peak maps; one row per extraction coordinate
[in]extraction_coordinatesTarget coordinates to extract
[in]mz_extraction_windowFull m/z extraction window in Th or ppm
[in]ppmWhether mz_extraction_window is specified in ppm
[in]im_extraction_windowFull ion mobility extraction window. A positive value activates ion mobility filtering around the coordinate's target ion mobility. A negative value extracts the full ion mobility range while still recording the raw ion mobility values.
[in]filterExtraction profile in m/z space. Only "tophat" is supported because the output preserves raw points instead of applying weighted integration.
Exceptions
Exception::IllegalArgumentif filter is not "tophat", if a spectrum is missing ion mobility data, or if the m/z, intensity, and ion mobility arrays on a spectrum have inconsistent sizes

◆ getFilterNr_()

int getFilterNr_ ( const std::string &  filter) const
private