Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Types | Protected Member Functions | List of all members
SpectraMerger Class Reference

Merges blocks of MS or MS2 spectra. More...

#include <OpenMS/FILTERING/TRANSFORMERS/SpectraMerger.h>

Inheritance diagram for SpectraMerger:
DefaultParamHandler

Classes

class  SpectraDistance_
 

Public Types

typedef Map< Size, std::vector
< Size > > 
MergeBlocks
 blocks of spectra (master-spectrum index to sacrifice-spectra(the ones being merged into the master-spectrum)) More...
 

Public Member Functions

 SpectraMerger ()
 default constructor More...
 
 SpectraMerger (const SpectraMerger &source)
 copy constructor More...
 
virtual ~SpectraMerger ()
 destructor More...
 
SpectraMergeroperator= (const SpectraMerger &source)
 assignment operator More...
 
template<typename MapType >
void mergeSpectraBlockWise (MapType &exp)
 
template<typename MapType >
void mergeSpectraPrecursors (MapType &exp)
 merges spectra with similar precursors (must have MS2 level) More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
virtual DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Protected Member Functions

template<typename MapType >
void mergeSpectra_ (MapType &exp, const MergeBlocks &spectra_to_merge, const UInt ms_level)
 merges blocks of spectra of a certain level More...
 
- Protected Member Functions inherited from DefaultParamHandler
virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Detailed Description

Merges blocks of MS or MS2 spectra.

Parameter's are accessible via the DefaultParamHandler.

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
mz_binning_width float0.0001 min: 0Max m/z distance of two peaks to be merged.
mz_binning_width_unit stringDa Da, ppmUnit in which the distance between two peaks is given.
sort_blocks stringRT_ascending RT_ascending, RT_descendingSort blocks by before merging them (useful for precursor order)
block_method:ms_levels int list[1] min: 1Merge spectra of this level. All spectra with other MS levels remain untouched.
block_method:rt_block_size int5 min: 1Maximum number of scans to be summed up.
block_method:rt_max_length float0 min: 0 max: 100000000000Maximum RT size of the block in seconds (0.0 = no size restriction).
precursor_method:mz_tolerance float0.0001 min: 0Max m/z distance of the precursor entries of two spectra to be merged in [Da].
precursor_method:rt_tolerance float5 min: 0Max RT distance of the precursor entries of two spectra to be merged in [s].

Note:

Member Typedef Documentation

typedef Map<Size, std::vector<Size> > MergeBlocks

blocks of spectra (master-spectrum index to sacrifice-spectra(the ones being merged into the master-spectrum))

Constructor & Destructor Documentation

default constructor

SpectraMerger ( const SpectraMerger source)

copy constructor

virtual ~SpectraMerger ( )
virtual

destructor

Member Function Documentation

void mergeSpectra_ ( MapType &  exp,
const MergeBlocks spectra_to_merge,
const UInt  ms_level 
)
inlineprotected

merges blocks of spectra of a certain level

Merges spectra belonging to the same block, setting their MS level to ms_level. All old spectra of level ms_level are removed, and the new consensus spectra (one per block) are added. All spectra with other MS levels remain untouched. The resulting map is NOT sorted!

References SpectrumAlignment::getSpectrumAlignment(), LOG_INFO, DefaultParamHandler::setParameters(), and Param::setValue().

void mergeSpectraBlockWise ( MapType &  exp)
inline
void mergeSpectraPrecursors ( MapType &  exp)
inline

merges spectra with similar precursors (must have MS2 level)

References ClusterHierarchical::cluster(), ClusterAnalyzer::cut(), LOG_WARN, Peak2D::setMZ(), DefaultParamHandler::setParameters(), and Peak2D::setRT().

SpectraMerger& operator= ( const SpectraMerger source)

assignment operator


OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:30 using doxygen 1.8.5