MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / SpectraMerger

Method SpectraMerger

src/openms/source/FILTERING/TRANSFORMERS/SpectraMerger.cpp:16–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14{
15
16 SpectraMerger::SpectraMerger() :
17 DefaultParamHandler("SpectraMerger")
18 {
19 // common
20 defaults_.setValue("mz_binning_width", 5.0, "minimum m/z distance for two data points (profile data) or peaks (centroided data) to be considered distinct. Closer data points or peaks will be merged.", {"advanced"});
21 defaults_.setMinFloat("mz_binning_width", 0.0);
22
23 defaults_.setValue("mz_binning_width_unit",
24 "ppm",
25 "Unit in which the distance between two data points or peaks is given.",
26 {"advanced"});
27 defaults_.setValidStrings("mz_binning_width_unit", {"Da", "ppm"});
28
29 defaults_.setValue("sort_blocks",
30 "RT_ascending",
31 "Sort blocks by <?> before merging them (useful for precursor order)",
32 {"advanced"});
33 defaults_.setValidStrings("sort_blocks", {"RT_ascending", "RT_descending"});
34
35 // Gaussian average
36 defaults_.setValue("average_gaussian:spectrum_type", "automatic", "Spectrum type of the MS level to be averaged");
37 defaults_.setValidStrings("average_gaussian:spectrum_type", {"profile", "centroid", "automatic"});
38 defaults_
39 .setValue("average_gaussian:ms_level",
40 1,
41 "If set to be 0, each MS level will be merged from 1 to max. Otherwise, average spectra of this level. All other spectra remain unchanged.");
42 defaults_.setMinInt("average_gaussian:ms_level", 0);
43 defaults_.setValue("average_gaussian:rt_FWHM", 5.0, "FWHM of Gauss curve in seconds to be averaged over.");
44 defaults_.setMinFloat("average_gaussian:rt_FWHM", 0.0);
45 defaults_.setMaxFloat("average_gaussian:rt_FWHM", 10e10);
46 defaults_.setValue("average_gaussian:cutoff",
47 0.01,
48 "Intensity cutoff for Gaussian. The Gaussian RT profile decreases from 1 at its apex to 0 at infinity. Spectra for which the intensity of the Gaussian drops below the cutoff do not contribute to the average.",
49 {"advanced"});
50 defaults_.setMinFloat("average_gaussian:cutoff", 0.0);
51 defaults_.setMaxFloat("average_gaussian:cutoff", 1.0);
52 defaults_.setValue("average_gaussian:precursor_mass_tol",
53 0.0,
54 "PPM mass tolerance for precursor mass. If set, MSn (n>2) spectra of precursor masses within the tolerance are averaged.");
55 defaults_.setValue("average_gaussian:precursor_max_charge",
56 1,
57 "Possible maximum precursor ion charge. Effective only when average_gaussian:precursor_mass_tol option is active.");
58 defaults_.setMinFloat("average_gaussian:precursor_mass_tol", 0.0);
59 defaults_.setMinInt("average_gaussian:precursor_max_charge", 1);
60
61 // top-hat average
62 defaults_.setValue("average_tophat:spectrum_type", "automatic", "Spectrum type of the MS level to be averaged");
63 defaults_.setValidStrings("average_tophat:spectrum_type", {"profile", "centroid", "automatic"});
64 defaults_
65 .setValue("average_tophat:ms_level",
66 1,
67 "If set to be 0, each MS level will be merged from 1 to max. Otherwise, average spectra of this level. All other spectra remain unchanged.");
68 defaults_.setMinInt("average_tophat:ms_level", 0);
69 defaults_.setValue("average_tophat:rt_range",
70 5.0,
71 "RT range to be averaged over, i.e. +/-(RT range)/2 from each spectrum.");
72 defaults_.setMinFloat("average_tophat:rt_range", 0.0);
73 defaults_.setMaxFloat("average_tophat:rt_range", 10e10);

Callers

nothing calls this directly

Calls 5

setMinFloatMethod · 0.80
setValidStringsMethod · 0.80
setMinIntMethod · 0.80
setMaxFloatMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected