Merges blocks of MS or MS2 spectra. More...
#include <OpenMS/FILTERING/TRANSFORMERS/SpectraMerger.h>
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... | |
| SpectraMerger & | operator= (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 DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
| Assignment operator. More... | |
| virtual bool | operator== (const DefaultParamHandler &rhs) const |
| Equality operator. More... | |
| void | setParameters (const Param ¶m) |
| Sets the parameters. More... | |
| const Param & | getParameters () const |
| Non-mutable access to the parameters. More... | |
| const Param & | getDefaults () const |
| Non-mutable access to the default parameters. More... | |
| const String & | getName () 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< String > | subsections_ |
| 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... | |
Merges blocks of MS or MS2 spectra.
Parameter's are accessible via the DefaultParamHandler.
Parameters of this class are:| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| mz_binning_width | float | 0.0001 | min: 0 | Max m/z distance of two peaks to be merged. |
| mz_binning_width_unit | string | Da | Da, ppm | Unit in which the distance between two peaks is given. |
| sort_blocks | string | RT_ascending | RT_ascending, RT_descending | Sort blocks by > before merging them (useful for precursor order) |
| block_method:ms_levels | int list | [1] | min: 1 | Merge spectra of this level. All spectra with other MS levels remain untouched. |
| block_method:rt_block_size | int | 5 | min: 1 | Maximum number of scans to be summed up. |
| block_method:rt_max_length | float | 0 | min: 0 max: 100000000000 | Maximum RT size of the block in seconds (0.0 = no size restriction). |
| precursor_method:mz_tolerance | float | 0.0001 | min: 0 | Max m/z distance of the precursor entries of two spectra to be merged in [Da]. |
| precursor_method:rt_tolerance | float | 5 | min: 0 | Max RT distance of the precursor entries of two spectra to be merged in [s]. |
| typedef Map<Size, std::vector<Size> > MergeBlocks |
blocks of spectra (master-spectrum index to sacrifice-spectra(the ones being merged into the master-spectrum))
| SpectraMerger | ( | ) |
default constructor
| SpectraMerger | ( | const SpectraMerger & | source | ) |
copy constructor
|
virtual |
destructor
|
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().
|
inline |
|
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 |