|
OpenMS
2.6.0
|
Go to the documentation of this file.
80 template <
typename SpectrumType>
83 if (spectrum.size() < 2)
89 double marks = (
double)param_.getValue(
"marks");
90 double parentmass = 0.0;
92 double tolerance = (
double)param_.getValue(
"tolerance");
93 std::map<double, int> matching_b_y_ions;
98 for (
Size i = 0; i < spectrum.size(); ++i)
100 while (j >= 0 && spectrum[j].getPosition()[0] > (parentmass - spectrum[i].getPosition()[0]) + tolerance)
106 if (j >= 0 && std::fabs(spectrum[i].getPosition()[0] + spectrum[j].getPosition()[0] - parentmass) < tolerance)
108 matching_b_y_ions[spectrum[i].getPosition()[0]]++;
109 matching_b_y_ions[spectrum[j].getPosition()[0]]++;
114 for (std::map<double, int>::const_iterator cmit = matching_b_y_ions.begin(); cmit != matching_b_y_ions.end(); ++cmit)
116 if (cmit->second >= marks)
118 marked.insert(std::pair<double, bool>(cmit->first,
true));
126 return "ComplementMarker";
void apply(std::map< double, bool > marked, SpectrumType &spectrum)
Definition: ComplementMarker.h:81
A more convenient string class.
Definition: String.h:59
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
ComplementMarker marks peak pairs which could represent y - b ion pairs.
Definition: ComplementMarker.h:51
static const String getProductName()
returns the name to register at the factory
Definition: ComplementMarker.h:124
void sortByPosition()
Lexicographically sorts the peaks by their position.
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:134
PeakMarker marks peaks that seem to fulfill some criterion.
Definition: PeakMarker.h:47
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67