OpenMS
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 (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) noexcept=default
 move constructor More...
 
DeconvolvedSpectrumoperator= (const DeconvolvedSpectrum &deconvolved_spectrum)=default
 assignment operator More...
 
MSSpectrum toSpectrum (int to_charge, uint min_ms_level, double tol=10.0, bool retain_undeconvolved=false)
 
const MSSpectrumgetOriginalSpectrum () const
 original spectrum getter More...
 
PeakGroupgetPrecursorPeakGroup ()
 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...
 
double getCurrentMaxMass (double max_mass) const
 
double getCurrentMinMass (double min_mass) const
 
int getCurrentMaxAbsCharge (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 Precursor::ActivationMethodgetActivationMethod () const
 get activation method More...
 
void setPrecursor (const Precursor &precursor)
 set precursor for MSn for n>1 More...
 
void setPrecursorIntensity (float i)
 set precursor peak intensity More...
 
void setPrecursorScanNumber (int scan_number)
 set precursor scan number More...
 
void setActivationMethod (const Precursor::ActivationMethod &method)
 set activation method More...
 
void setPrecursorPeakGroup (const PeakGroup &pg)
 set precursor peakGroup More...
 
void setOriginalSpectrum (const MSSpectrum &spec)
 original spectrum setter More...
 
void setPeakGroups (std::vector< PeakGroup > &x)
 set peak groups in this spectrum More...
 
std::vector< PeakGroup >::const_iterator begin () const noexcept
 iterators and vector operators for std::vector<PeakGroup> peak_groups_ in this spectrum More...
 
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
 
PeakGroupoperator[] (Size i)
 
void push_back (const PeakGroup &pg)
 
Size size () const noexcept
 
void clear ()
 
void reserve (Size n)
 
bool empty () const
 
void sort ()
 sort by deconvolved monoisotopic masses More...
 
void sortByQscore ()
 sort by Qscore of peakGroups More...
 

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...
 
Precursor::ActivationMethod 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 ( int  scan_number)
explicit

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

Parameters
scan_numberscan number of the spectrum

◆ ~DeconvolvedSpectrum()

~DeconvolvedSpectrum ( )
default

default destructor

◆ DeconvolvedSpectrum() [3/4]

copy constructor

◆ DeconvolvedSpectrum() [4/4]

DeconvolvedSpectrum ( DeconvolvedSpectrum &&  other)
defaultnoexcept

move constructor

Member Function Documentation

◆ begin() [1/2]

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

iterators and vector operators for std::vector<PeakGroup> peak_groups_ in this spectrum

◆ 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 Precursor::ActivationMethod& getActivationMethod ( ) const

get activation method

◆ getCurrentMaxAbsCharge()

int getCurrentMaxAbsCharge ( 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 ( 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 ( 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()

PeakGroup& getPrecursorPeakGroup ( )

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[]() [1/2]

PeakGroup& operator[] ( Size  i)

◆ operator[]() [2/2]

const PeakGroup& operator[] ( Size  i) const

◆ push_back()

void push_back ( const PeakGroup pg)

Referenced by TOPPFLASHDeconv::main_().

◆ reserve()

void reserve ( Size  n)

Referenced by TOPPFLASHDeconv::main_().

◆ setActivationMethod()

void setActivationMethod ( const Precursor::ActivationMethod method)

set activation method

◆ setOriginalSpectrum()

void setOriginalSpectrum ( const MSSpectrum spec)

original spectrum setter

Referenced by TOPPFLASHDeconv::main_().

◆ setPeakGroups()

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

set peak groups in this spectrum

◆ setPrecursor()

void setPrecursor ( const Precursor precursor)

set precursor for MSn for n>1

◆ setPrecursorIntensity()

void setPrecursorIntensity ( float  i)

set precursor peak intensity

◆ setPrecursorPeakGroup()

void setPrecursorPeakGroup ( const PeakGroup pg)

set precursor peakGroup

◆ setPrecursorScanNumber()

void setPrecursorScanNumber ( int  scan_number)

set precursor scan number

◆ size()

Size size ( ) const
noexcept

Referenced by TOPPFLASHDeconv::main_().

◆ sort()

void sort ( )

sort by deconvolved monoisotopic masses

Referenced by TOPPFLASHDeconv::main_().

◆ sortByQscore()

void sortByQscore ( )

sort by Qscore of peakGroups

◆ toSpectrum()

MSSpectrum toSpectrum ( int  to_charge,
uint  min_ms_level,
double  tol = 10.0,
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.
min_ms_levelthe minimum MS level. If the original spec had an MS level lower than min_ms_level the precursor information of the returned spectrum is set to this value.
tolthe ppm tolerance
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)

Member Data Documentation

◆ activation_method_

Precursor::ActivationMethod 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)