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

Method extractPeakSpectrum

src/topp/MetaProSIP.cpp:2315–2330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2313 }
2314
2315 PeakSpectrum extractPeakSpectrum(Size element_count, double mass_diff, double rt, double feature_hit_theoretical_mz, Int feature_hit_charge, const PeakMap& peak_map)
2316 {
2317 PeakSpectrum spec = *peak_map.RTBegin(rt - 1e-8);
2318 PeakSpectrum::ConstIterator begin_it = spec.MZBegin(feature_hit_theoretical_mz - 1e-8);
2319 PeakSpectrum::ConstIterator end_it = spec.MZEnd(feature_hit_theoretical_mz + element_count * mass_diff / feature_hit_charge + 1e-8);
2320
2321 PeakSpectrum ret;
2322 for (; begin_it != end_it; ++begin_it)
2323 {
2324 if (begin_it->getIntensity() > 1e-8)
2325 {
2326 ret.push_back(*begin_it);
2327 }
2328 }
2329 return ret;
2330 }
2331
2332 // collects intensities starting at seed_mz/_rt, if no peak is found at the expected position a 0 is added
2333 vector<double> extractIsotopicIntensities(Size element_count, double mass_diff, double mz_tolerance_ppm,

Callers

nothing calls this directly

Calls 5

RTBeginMethod · 0.45
MZBeginMethod · 0.45
MZEndMethod · 0.45
getIntensityMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected