OpenMS  3.0.0
DeconvolvedSpectrum Class Reference

A class representing a deconvolved spectrum. DeconvolvedSpectrum consists of PeakGroups representing masses. For MSn n>1, a PeakGroup representing the precursor mass is also added in this class. Properly assigning a precursor mass from the original precursor peak and its deconvolution result is very important in top down proteomics. This assignment is performed here for conventional datasets. But for FLASHIda acquired datasets, the assignment is already done by FLASHIda. So this class simply use the results from FLASHIda log file for assignment. The parsing of FLASHIda log file is done in FLASHDeconv tool class. More...

#include <OpenMS/ANALYSIS/TOPDOWN/DeconvolvedSpectrum.h>

Collaboration diagram for DeconvolvedSpectrum:
[legend]

Public Types

typedef FLASHDeconvHelperStructs::LogMzPeak LogMzPeak
 

Public Member Functions

 DeconvolvedSpectrum ()=default
 default constructor More...
 
 DeconvolvedSpectrum (const MSSpectrum &spectrum, const int scan_number)
 Constructor for DeconvolvedSpectrum. Takes the spectrum and scan number calculated from outside. More...
 
 ~DeconvolvedSpectrum ()=default
 default destructor More...
 
 DeconvolvedSpectrum (const DeconvolvedSpectrum &)=default
 copy constructor More...
 
 DeconvolvedSpectrum (DeconvolvedSpectrum &&other)=default
 move constructor More...
 
DeconvolvedSpectrumoperator= (const DeconvolvedSpectrum &deconvolved_spectrum)=default
 assignment operator More...
 
MSSpectrum toSpectrum (const int to_charge, bool retain_undeconvolved=false)
 
const MSSpectrumgetOriginalSpectrum () const
 original spectrum getter More...
 
const PeakGroupgetPrecursorPeakGroup () const
 get precursor peak group for MSn (n>1) spectrum. It returns an empty peak group if no peak group is registered (by registerPrecursor) More...
 
int getPrecursorCharge () const
 precursor charge getter (set in registerPrecursor) More...
 
const PrecursorgetPrecursor () const
 get precursor peak More...
 
void setPrecursorPeakGroupQvalue (const double qvalue_with_iso_decoy_only, const double qvalue_with_noise_decoy_only, const double qvalue_with_charge_decoy_only)
 set qvalue of precursor peak More...
 
double getCurrentMaxMass (const double max_mass) const
 
double getCurrentMinMass (const double min_mass) const
 
int getCurrentMaxAbsCharge (const int max_abs_charge) const
 
int getScanNumber () const
 get scan number of the original spectrum More...
 
int getPrecursorScanNumber () const
 get precursor scan number - only if it is registered. Otherwise return 0 More...
 
const StringgetActivationMethod () const
 get activation method More...
 
void setPrecursor (const Precursor &precursor)
 set max isotope index More...
 
void setPrecursorIntensity (const double i)
 set precursor peak intensity More...
 
void setPrecursorScanNumber (const int scan_number)
 set max isotope index More...
 
void setActivationMethod (const String &method)
 set activation method More...
 
void setPrecursorPeakGroup (const PeakGroup &pg)
 set precusor peakGroup More...
 
std::vector< PeakGroup >::const_iterator begin () const noexcept
 
std::vector< PeakGroup >::const_iterator end () const noexcept
 
std::vector< PeakGroup >::iterator begin () noexcept
 
std::vector< PeakGroup >::iterator end () noexcept
 
const PeakGroupoperator[] (Size i) const
 
void push_back (const PeakGroup &pg)
 
Size size () const noexcept
 
void clear ()
 
void reserve (Size n)
 
bool empty () const
 
void swap (std::vector< PeakGroup > &x)
 
void sort ()
 
void sortByQScore ()
 

Static Public Member Functions

static void updatePeakGroupQvalues (std::vector< DeconvolvedSpectrum > &deconvolved_spectra, std::vector< DeconvolvedSpectrum > &deconvolved_decoy_spectra)
 

Private Attributes

std::vector< PeakGrouppeak_groups
 peak groups (deconvolved masses) More...
 
MSSpectrum spec_
 the original raw spectrum (not deconvolved) More...
 
PeakGroup precursor_peak_group_
 precursor peakGroup (or mass) More...
 
Precursor precursor_peak_
 precursor raw peak (not deconvolved one) More...
 
String activation_method_
 activation method for file output More...
 
int scan_number_ = 0
 scan number and precursor scan number More...
 
int precursor_scan_number_ = 0
 

Detailed Description

A class representing a deconvolved spectrum. DeconvolvedSpectrum consists of PeakGroups representing masses. For MSn n>1, a PeakGroup representing the precursor mass is also added in this class. Properly assigning a precursor mass from the original precursor peak and its deconvolution result is very important in top down proteomics. This assignment is performed here for conventional datasets. But for FLASHIda acquired datasets, the assignment is already done by FLASHIda. So this class simply use the results from FLASHIda log file for assignment. The parsing of FLASHIda log file is done in FLASHDeconv tool class.

Member Typedef Documentation

◆ LogMzPeak

Constructor & Destructor Documentation

◆ DeconvolvedSpectrum() [1/4]

DeconvolvedSpectrum ( )
default

default constructor

◆ DeconvolvedSpectrum() [2/4]

DeconvolvedSpectrum ( const MSSpectrum spectrum,
const int  scan_number 
)

Constructor for DeconvolvedSpectrum. Takes the spectrum and scan number calculated from outside.

Parameters
spectrumspectrum for which the deconvolution will be performed
scan_numberscan number of the spectrum: this argument is put here for real time case where scan number should be input separately.

◆ ~DeconvolvedSpectrum()

~DeconvolvedSpectrum ( )
default

default destructor

◆ DeconvolvedSpectrum() [3/4]

copy constructor

◆ DeconvolvedSpectrum() [4/4]

move constructor

Member Function Documentation

◆ begin() [1/2]

std::vector<PeakGroup>::const_iterator begin ( ) const
noexcept

◆ begin() [2/2]

std::vector<PeakGroup>::iterator begin ( )
noexcept

◆ clear()

void clear ( )

◆ empty()

bool empty ( ) const

◆ end() [1/2]

std::vector<PeakGroup>::const_iterator end ( ) const
noexcept

◆ end() [2/2]

std::vector<PeakGroup>::iterator end ( )
noexcept

◆ getActivationMethod()

const String& getActivationMethod ( ) const

get activation method

◆ getCurrentMaxAbsCharge()

int getCurrentMaxAbsCharge ( const int  max_abs_charge) const

get possible max charge of the deconvolved masses - for MS1, max charge specified by user for MSn, min value between max charge specified by the user and precursor charge

Parameters
max_abs_chargethe max absolute value of the charge specified by the user

◆ getCurrentMaxMass()

double getCurrentMaxMass ( const double  max_mass) const

get possible max mass of the deconvolved masses - for MS1, max mass specified by user for MSn, min value between max mass specified by the user and precursor mass

Parameters
max_massthe max mass specified by the user

◆ getCurrentMinMass()

double getCurrentMinMass ( const double  min_mass) const

get possible min mass of the deconvolved masses - for MS1, min mass specified by user for MSn, 50.0

Parameters
min_massthe min mass specified by the user

◆ getOriginalSpectrum()

const MSSpectrum& getOriginalSpectrum ( ) const

original spectrum getter

◆ getPrecursor()

const Precursor& getPrecursor ( ) const

get precursor peak

◆ getPrecursorCharge()

int getPrecursorCharge ( ) const

precursor charge getter (set in registerPrecursor)

◆ getPrecursorPeakGroup()

const PeakGroup& getPrecursorPeakGroup ( ) const

get precursor peak group for MSn (n>1) spectrum. It returns an empty peak group if no peak group is registered (by registerPrecursor)

◆ getPrecursorScanNumber()

int getPrecursorScanNumber ( ) const

get precursor scan number - only if it is registered. Otherwise return 0

◆ getScanNumber()

int getScanNumber ( ) const

get scan number of the original spectrum

◆ operator=()

DeconvolvedSpectrum& operator= ( const DeconvolvedSpectrum deconvolved_spectrum)
default

assignment operator

◆ operator[]()

const PeakGroup& operator[] ( Size  i) const

◆ push_back()

void push_back ( const PeakGroup pg)

◆ reserve()

void reserve ( Size  n)

◆ setActivationMethod()

void setActivationMethod ( const String method)

set activation method

◆ setPrecursor()

void setPrecursor ( const Precursor precursor)

set max isotope index

◆ setPrecursorIntensity()

void setPrecursorIntensity ( const double  i)

set precursor peak intensity

◆ setPrecursorPeakGroup()

void setPrecursorPeakGroup ( const PeakGroup pg)

set precusor peakGroup

◆ setPrecursorPeakGroupQvalue()

void setPrecursorPeakGroupQvalue ( const double  qvalue_with_iso_decoy_only,
const double  qvalue_with_noise_decoy_only,
const double  qvalue_with_charge_decoy_only 
)

set qvalue of precursor peak

◆ setPrecursorScanNumber()

void setPrecursorScanNumber ( const int  scan_number)

set max isotope index

◆ size()

Size size ( ) const
noexcept

Referenced by TOPPFLASHDeconv::main_().

◆ sort()

void sort ( )

◆ sortByQScore()

void sortByQScore ( )

◆ swap()

void swap ( std::vector< PeakGroup > &  x)

◆ toSpectrum()

MSSpectrum toSpectrum ( const int  to_charge,
bool  retain_undeconvolved = false 
)

Convert DeconvolvedSpectrum to MSSpectrum (e.g., used to store in mzML format).

Parameters
to_chargethe charge of each peak in mzml output.
retain_undeconvolvedif set, undeconvolved peaks in the original peaks are output (assuming their abs charge == 1 and m/zs are adjusted with the to_charge parameter)

◆ updatePeakGroupQvalues()

static void updatePeakGroupQvalues ( std::vector< DeconvolvedSpectrum > &  deconvolved_spectra,
std::vector< DeconvolvedSpectrum > &  deconvolved_decoy_spectra 
)
static

Referenced by TOPPFLASHDeconv::main_().

Member Data Documentation

◆ activation_method_

String activation_method_
private

activation method for file output

◆ peak_groups

std::vector<PeakGroup> peak_groups
private

peak groups (deconvolved masses)

◆ precursor_peak_

Precursor precursor_peak_
private

precursor raw peak (not deconvolved one)

◆ precursor_peak_group_

PeakGroup precursor_peak_group_
private

precursor peakGroup (or mass)

◆ precursor_scan_number_

int precursor_scan_number_ = 0
private

◆ scan_number_

int scan_number_ = 0
private

scan number and precursor scan number

◆ spec_

MSSpectrum spec_
private

the original raw spectrum (not deconvolved)