| OpenMS 2.5.0

RangeUtils.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg$
32 // $Authors: Marc Sturm, Chris Bielow $
33 // --------------------------------------------------------------------------
34
35 #pragma once
36
37 #include <functional>
38 #include <algorithm>
39 #include <vector>
40 #include <OpenMS/CONCEPT/Types.h>
41 #include <OpenMS/METADATA/Precursor.h>
42 #include <OpenMS/DATASTRUCTURES/ListUtils.h>
43 #include <OpenMS/CONCEPT/LogStream.h>
44
45 namespace OpenMS
46 {
95 template <class MetaContainer>
96 class HasMetaValue :
97 std::unary_function<MetaContainer, bool>
98 {
99 public:
106 HasMetaValue(String metavalue, bool reverse = false) :
107 metavalue_key_(metavalue),
108 reverse_(reverse)
109 {}
110
111 inline bool operator()(const MetaContainer& s) const
112 {
113 bool has_meta_value = s.metaValueExists(metavalue_key_);
114 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
115 return reverse_ ^ has_meta_value;
116 }
117
118 protected:
119 String metavalue_key_;
120 bool reverse_;
121 };
122
123
131 template <class SpectrumType>
132 class InRTRange :
133 std::unary_function<SpectrumType, bool>
134 {
135 public:
144 InRTRange(double min, double max, bool reverse = false) :
145 min_(min),
146 max_(max),
147 reverse_(reverse)
148 {}
149
150 inline bool operator()(const SpectrumType& s) const
151 {
152 double tmp = s.getRT();
153 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
154 return reverse_ ^ (min_ <= tmp && tmp <= max_);
155 }
156
157 protected:
158 double min_, max_;
159 bool reverse_;
160 };
161
169 template <class SpectrumType>
170 class InMSLevelRange :
171 std::unary_function<SpectrumType, bool>
172 {
173 public:
181 InMSLevelRange(const IntList& levels, bool reverse = false) :
182 levels_(levels),
183 reverse_(reverse)
184 {}
185
186 inline bool operator()(const SpectrumType& s) const
187 {
188 Int tmp = s.getMSLevel();
189 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
190 return reverse_ ^ std::find(levels_.begin(), levels_.end(), tmp) != levels_.end();
191 }
192
193 protected:
194 IntList levels_;
195 bool reverse_;
196 };
197
205 template <class SpectrumType>
206 class HasScanMode :
207 std::unary_function<SpectrumType, bool>
208 {
209 public:
217 HasScanMode(Int mode, bool reverse = false) :
218 mode_(mode),
219 reverse_(reverse)
220 {}
221
222 inline bool operator()(const SpectrumType& s) const
223 {
224 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
225 return reverse_ ^ (s.getInstrumentSettings().getScanMode() == mode_);
226 }
227
228 protected:
229 Int mode_;
230 bool reverse_;
231 };
232
240 template <class SpectrumType>
241 class HasScanPolarity :
242 std::unary_function<SpectrumType, bool>
243 {
244 public:
252 HasScanPolarity(Int polarity, bool reverse = false) :
253 polarity_(polarity),
254 reverse_(reverse)
255 {}
256
257 inline bool operator()(const SpectrumType& s) const
258 {
259 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
260 return reverse_ ^ (s.getInstrumentSettings().getPolarity() == polarity_);
261 }
262
263 protected:
264 Int polarity_;
265 bool reverse_;
266 };
267
268
276 template <class SpectrumType>
277 class IsEmptySpectrum :
278 std::unary_function<SpectrumType, bool>
279 {
280 public:
286 explicit IsEmptySpectrum(bool reverse = false) :
287 reverse_(reverse)
288 {}
289
290 inline bool operator()(const SpectrumType& s) const
291 {
292 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
293 return reverse_ ^ s.empty();
294 }
295
296 protected:
297 bool reverse_;
298 };
299
307 template <class SpectrumType>
308 class IsZoomSpectrum :
309 std::unary_function<SpectrumType, bool>
310 {
311 public:
318 explicit IsZoomSpectrum(bool reverse = false) :
319 reverse_(reverse)
320 {}
321
322 inline bool operator()(const SpectrumType& s) const
323 {
324 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
325 return reverse_ ^ s.getInstrumentSettings().getZoomScan();
326 }
327
328 protected:
329 bool reverse_;
330 };
331
332
341 template <class SpectrumType>
342 class HasActivationMethod :
343 std::unary_function<SpectrumType, bool>
344 {
345 public:
353 HasActivationMethod(const StringList& methods, bool reverse = false) :
354 methods_(methods),
355 reverse_(reverse)
356 {}
357
358 inline bool operator()(const SpectrumType& s) const
359 {
360 for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
361 {
362 for (std::set<Precursor::ActivationMethod>::const_iterator it_a = it->getActivationMethods().begin();
363 it_a != it->getActivationMethods().end();
364 ++it_a)
365 {
366 if (ListUtils::contains(methods_, Precursor::NamesOfActivationMethod[*it_a]))
367 {
368 // found matching activation method
369 if (reverse_) return false;
370 else return true;
371 }
372 }
373 }
374
375 if (reverse_) return true;
376 else return false;
377 }
378
379 protected:
380 StringList methods_;
381 bool reverse_;
382 };
383
393 template <class SpectrumType>
394 class InPrecursorMZRange :
395 std::unary_function<SpectrumType, bool>
396 {
397 public:
405 InPrecursorMZRange(const double& mz_left, const double& mz_right, bool reverse = false) :
406 mz_left_(mz_left),
407 mz_right_(mz_right),
408 reverse_(reverse)
409 {}
410
411 inline bool operator()(const SpectrumType& s) const
412 {
413 for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
414 {
415 //std::cerr << mz_left_ << " " << mz_right_ << " " << it->getMZ() << "\n";
416 if (!(mz_left_ <= it->getMZ() && it->getMZ() <= mz_right_))
417 { // found PC outside of allowed window
418 if (reverse_) return true;
419 else return false;
420 }
421 }
422
423 if (reverse_) return false;
424 else return true;
425 }
426
427 protected:
428 double mz_left_;
429 double mz_right_;
430 bool reverse_;
431 };
432
433
442 template <class SpectrumType>
443 class HasPrecursorCharge :
444 std::unary_function<SpectrumType, bool>
445 {
446 public:
454 HasPrecursorCharge(const IntList& charges, bool reverse = false) :
455 charges_(charges),
456 reverse_(reverse)
457 {}
458
459 inline bool operator()(const SpectrumType& s) const
460 {
461 bool match = false;
462 for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
463 {
464 Int tmp = it->getCharge();
465 match = match || (std::find(charges_.begin(), charges_.end(), tmp) != charges_.end());
466 }
467
468 if (reverse_) return !match;
469 else return match;
470 }
471
472 protected:
473 IntList charges_;
474 bool reverse_;
475 };
476
477
487 template <class PeakType>
488 class InMzRange :
489 std::unary_function<PeakType, bool>
490 {
491 public:
500 InMzRange(double min, double max, bool reverse = false) :
501 min_(min),
502 max_(max),
503 reverse_(reverse)
504 {}
505
506 inline bool operator()(const PeakType& p) const
507 {
508 double tmp = p.getPosition()[0];
509 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
510 return reverse_ ^ (min_ <= tmp && tmp <= max_);
511 }
512
513 protected:
514 double min_, max_;
515 bool reverse_;
516 };
517
525 template <class PeakType>
526 class InIntensityRange :
527 std::unary_function<PeakType, bool>
528 {
529 public:
537 InIntensityRange(double min, double max, bool reverse = false) :
538 min_(min),
539 max_(max),
540 reverse_(reverse)
541 {}
542
543 inline bool operator()(const PeakType& p) const
544 {
545 double tmp = p.getIntensity();
546 // XOR(^): same as 'if (rev_) return !(test) else return test;' where (test) is the condition; Speed: XOR is about 25% faster in VS10
547 return reverse_ ^ (min_ <= tmp && tmp <= max_);
548 }
549
550 protected:
551 double min_, max_;
552 bool reverse_;
553 };
554
562 template <class SpectrumType>
563 class IsInCollisionEnergyRange :
564 std::unary_function<SpectrumType, bool>
565 {
566 public:
574 IsInCollisionEnergyRange(double min, double max, bool reverse = false) :
575 min_energy_(min),
576 max_energy_(max),
577 reverse_(reverse)
578 {}
579
580 inline bool operator()(const SpectrumType& s) const
581 {
582 // leave non-fragmentation spectra untouched
583 if (s.getMSLevel() == 1) return false;
584
585 bool isIn = false;
586 bool hasCollisionEnergy = false;
587 for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
588 {
589 if (it->metaValueExists("collision energy"))
590 {
591 hasCollisionEnergy = true;
592 double cE = it->getMetaValue("collision energy");
593 isIn |= !(cE > max_energy_ || cE < min_energy_);
594 }
595 }
596
597 // we accept all spectra that have no collision energy value
598 if (!hasCollisionEnergy) return false;
599
600 if (reverse_) return !isIn;
601 else return isIn;
602 }
603
604 private:
605 double min_energy_, max_energy_;
606 bool reverse_;
607 };
608
615 template <class SpectrumType>
616 class IsInIsolationWindowSizeRange :
617 std::unary_function<SpectrumType, bool>
618 {
619
620 public:
628 IsInIsolationWindowSizeRange(double min_size, double max_size, bool reverse = false) :
629 min_size_(min_size),
630 max_size_(max_size),
631 reverse_(reverse)
632 {}
633
634 inline bool operator()(const SpectrumType& s) const
635 {
636 // leave non-fragmentation spectra untouched
637 if (s.getMSLevel() == 1) return false;
638
639 bool isIn = false;
640 for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
641 {
642 const double isolationWindowSize = it->getIsolationWindowUpperOffset() + it->getIsolationWindowLowerOffset();
643 isIn |= !(isolationWindowSize > max_size_ || isolationWindowSize < min_size_);
644 }
645
646 if (reverse_) return !isIn;
647 else return isIn;
648 }
649
650 private:
651 double min_size_, max_size_;
652 bool reverse_;
653 };
654
661 template <class SpectrumType>
662 class IsInIsolationWindow :
663 std::unary_function<SpectrumType, bool>
664 {
665
666 public:
673 IsInIsolationWindow(std::vector<double> vec_mz, bool reverse = false) :
674 vec_mz_(vec_mz),
675 reverse_(reverse)
676 {
677 std::sort(vec_mz_.begin(), vec_mz_.end());
678 }
679
680 inline bool operator()(const SpectrumType& s) const
681 {
682 // leave non-fragmentation spectra untouched
683 if (s.getMSLevel() == 1) return false;
684
685 bool isIn = false;
686 for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
687 {
688 if (it->getIsolationWindowLowerOffset() == 0 || it->getIsolationWindowUpperOffset() == 0)
689 {
690 OPENMS_LOG_WARN << "IsInIsolationWindow(): Lower/Upper Offset for Precursor Isolation Window is Zero! " <<
691 "Filtering will probably be too strict (unless you hit the exact precursor m/z)!" << std::endl;
692 }
693 const double lower_mz = it->getMZ() - it->getIsolationWindowLowerOffset();
694 std::vector<double>::const_iterator it_mz = std::lower_bound(vec_mz_.begin(), vec_mz_.end(), lower_mz);
695 if (it_mz != vec_mz_.end()) // left side ok
696 { // right side?
697 const double upper_mz = it->getMZ() + it->getIsolationWindowUpperOffset();
698 isIn |= (*it_mz <= upper_mz);
699 }
700 }
701
702 if (reverse_) return !isIn;
703 else return isIn;
704 }
705
706 private:
707 std::vector<double> vec_mz_;
708 bool reverse_;
709 };
710
711 } // namespace OpenMS
712
OpenMS::InPrecursorMZRange::mz_left_
double mz_left_
Definition: RangeUtils.h:428
OpenMS::IsInCollisionEnergyRange::min_energy_
double min_energy_
Definition: RangeUtils.h:605
OpenMS::HasMetaValue
Predicate that determines if a class has a certain metavalue.
Definition: RangeUtils.h:96
OpenMS::IsInIsolationWindowSizeRange
Predicate that determines if the width of the isolation window of an MSn spectrum is in the given ran...
Definition: RangeUtils.h:616
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::IsZoomSpectrum::IsZoomSpectrum
IsZoomSpectrum(bool reverse=false)
Constructor.
Definition: RangeUtils.h:318
OpenMS::HasActivationMethod::methods_
StringList methods_
Definition: RangeUtils.h:380
OpenMS::InMzRange::min_
double min_
Definition: RangeUtils.h:514
OpenMS::InMSLevelRange::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:186
OpenMS::Peak2D::getIntensity
IntensityType getIntensity() const
Definition: Peak2D.h:166
OpenMS::InPrecursorMZRange::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:411
OpenMS::InRTRange::reverse_
bool reverse_
Definition: RangeUtils.h:159
OpenMS::InPrecursorMZRange::reverse_
bool reverse_
Definition: RangeUtils.h:430
OpenMS::InstrumentSettings::getScanMode
ScanMode getScanMode() const
returns the scan mode
OpenMS::HasPrecursorCharge::HasPrecursorCharge
HasPrecursorCharge(const IntList &charges, bool reverse=false)
Constructor.
Definition: RangeUtils.h:454
OpenMS::HasScanPolarity::HasScanPolarity
HasScanPolarity(Int polarity, bool reverse=false)
Constructor.
Definition: RangeUtils.h:252
OpenMS::IsEmptySpectrum
Predicate that determines if a spectrum is empty.
Definition: RangeUtils.h:277
OpenMS::Peak2D
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:54
OpenMS::IntList
std::vector< Int > IntList
Vector of signed integers.
Definition: ListUtils.h:55
OpenMS::InMSLevelRange
Predicate that determines if a spectrum lies inside/outside a specific MS level set.
Definition: RangeUtils.h:170
OpenMS::MSSpectrum::getRT
double getRT() const
OpenMS::Precursor::NamesOfActivationMethod
static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD]
Names of activation methods.
Definition: Precursor.h:94
Precursor.h
OpenMS::HasPrecursorCharge::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:459
OpenMS::HasScanMode::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:222
OpenMS::IsZoomSpectrum::reverse_
bool reverse_
Definition: RangeUtils.h:329
OpenMS::IsInIsolationWindowSizeRange::reverse_
bool reverse_
Definition: RangeUtils.h:652
OpenMS::IsEmptySpectrum::IsEmptySpectrum
IsEmptySpectrum(bool reverse=false)
Constructor.
Definition: RangeUtils.h:286
OpenMS::HasScanPolarity::polarity_
Int polarity_
Definition: RangeUtils.h:264
OpenMS::InMzRange
Predicate that determines if a peak lies inside/outside a specific m/z range.
Definition: RangeUtils.h:488
OpenMS::InMSLevelRange::levels_
IntList levels_
Definition: RangeUtils.h:194
OpenMS::IsInIsolationWindow::vec_mz_
std::vector< double > vec_mz_
Definition: RangeUtils.h:707
OpenMS::HasActivationMethod
Predicate that determines if a spectrum was generated using any activation method given in the constr...
Definition: RangeUtils.h:342
OpenMS::HasScanPolarity
Predicate that determines if a spectrum has a certain scan polarity.
Definition: RangeUtils.h:241
OpenMS::HasScanPolarity::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:257
OpenMS::InRTRange
Predicate that determines if a spectrum lies inside/outside a specific retention time range...
Definition: RangeUtils.h:132
OpenMS::InIntensityRange::reverse_
bool reverse_
Definition: RangeUtils.h:552
OpenMS::IsInCollisionEnergyRange
Predicate that determines if an MSn spectrum was generated with a collision energy in the given range...
Definition: RangeUtils.h:563
OpenMS::HasMetaValue::HasMetaValue
HasMetaValue(String metavalue, bool reverse=false)
Constructor.
Definition: RangeUtils.h:106
Types.h
OpenMS::HasScanMode::mode_
Int mode_
Definition: RangeUtils.h:229
OpenMS::ListUtils::contains
static bool contains(const std::vector< T > &container, const E &elem)
Checks whether the element elem is contained in the given container.
Definition: ListUtils.h:146
OpenMS::HasPrecursorCharge
Predicate that determines if a spectrum has a certain precursor charge as given in the constructor li...
Definition: RangeUtils.h:443
OpenMS::SpectrumSettings::getPrecursors
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
OpenMS::HasMetaValue::operator()
bool operator()(const MetaContainer &s) const
Definition: RangeUtils.h:111
OpenMS::HasScanPolarity::reverse_
bool reverse_
Definition: RangeUtils.h:265
OpenMS::SpectrumSettings::getInstrumentSettings
const InstrumentSettings & getInstrumentSettings() const
returns a const reference to the instrument settings of the current spectrum
OpenMS::IsZoomSpectrum
Predicate that determines if a spectrum is a zoom (enhanced resolution) spectrum. ...
Definition: RangeUtils.h:308
OpenMS::IsInCollisionEnergyRange::IsInCollisionEnergyRange
IsInCollisionEnergyRange(double min, double max, bool reverse=false)
Constructor.
Definition: RangeUtils.h:574
OpenMS::IsInIsolationWindowSizeRange::IsInIsolationWindowSizeRange
IsInIsolationWindowSizeRange(double min_size, double max_size, bool reverse=false)
Constructor.
Definition: RangeUtils.h:628
OpenMS::IsInIsolationWindowSizeRange::max_size_
double max_size_
Definition: RangeUtils.h:651
OpenMS::InstrumentSettings::getZoomScan
bool getZoomScan() const
return if this scan is a zoom (enhanced resolution) scan
OpenMS::InRTRange::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:150
OpenMS::IsInIsolationWindow
Predicate that determines if the isolation window covers ANY of the given m/z values.
Definition: RangeUtils.h:662
OpenMS::InMSLevelRange::InMSLevelRange
InMSLevelRange(const IntList &levels, bool reverse=false)
Constructor.
Definition: RangeUtils.h:181
OPENMS_LOG_WARN
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged...
Definition: LogStream.h:460
OpenMS::InMSLevelRange::reverse_
bool reverse_
Definition: RangeUtils.h:195
OpenMS::MSSpectrum
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
OpenMS::HasPrecursorCharge::reverse_
bool reverse_
Definition: RangeUtils.h:474
OpenMS::InMzRange::InMzRange
InMzRange(double min, double max, bool reverse=false)
Constructor.
Definition: RangeUtils.h:500
OpenMS::InRTRange::InRTRange
InRTRange(double min, double max, bool reverse=false)
Constructor.
Definition: RangeUtils.h:144
OpenMS::InIntensityRange
Predicate that determines if a peak lies inside/outside a specific intensity range.
Definition: RangeUtils.h:526
OpenMS::IsInCollisionEnergyRange::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:580
OpenMS::InPrecursorMZRange::mz_right_
double mz_right_
Definition: RangeUtils.h:429
OpenMS::HasActivationMethod::HasActivationMethod
HasActivationMethod(const StringList &methods, bool reverse=false)
Constructor.
Definition: RangeUtils.h:353
OpenMS::IsInIsolationWindowSizeRange::min_size_
double min_size_
Definition: RangeUtils.h:651
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::HasPrecursorCharge::charges_
IntList charges_
Definition: RangeUtils.h:473
OpenMS::HasActivationMethod::reverse_
bool reverse_
Definition: RangeUtils.h:381
OpenMS::IsInIsolationWindow::reverse_
bool reverse_
Definition: RangeUtils.h:708
OpenMS::InIntensityRange::min_
double min_
Definition: RangeUtils.h:551
OpenMS::InRTRange::max_
double max_
Definition: RangeUtils.h:158
OpenMS::HasActivationMethod::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:358
OpenMS::IsInIsolationWindowSizeRange::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:634
LogStream.h
OpenMS::InstrumentSettings::getPolarity
IonSource::Polarity getPolarity() const
returns the polarity
OpenMS::HasMetaValue::reverse_
bool reverse_
Definition: RangeUtils.h:120
OpenMS::InIntensityRange::operator()
bool operator()(const PeakType &p) const
Definition: RangeUtils.h:543
OpenMS::IsInCollisionEnergyRange::reverse_
bool reverse_
Definition: RangeUtils.h:606
seqan::find
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
OpenMS::IsInIsolationWindow::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:680
OpenMS::IsEmptySpectrum::reverse_
bool reverse_
Definition: RangeUtils.h:297
OpenMS::StringList
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
OpenMS::MSSpectrum::getMSLevel
UInt getMSLevel() const
Returns the MS level.
int
OpenMS::HasMetaValue::metavalue_key_
String metavalue_key_
Definition: RangeUtils.h:119
OpenMS::InIntensityRange::InIntensityRange
InIntensityRange(double min, double max, bool reverse=false)
Constructor.
Definition: RangeUtils.h:537
OpenMS::InMzRange::reverse_
bool reverse_
Definition: RangeUtils.h:515
OpenMS::InMzRange::operator()
bool operator()(const PeakType &p) const
Definition: RangeUtils.h:506
OpenMS::HasScanMode
Predicate that determines if a spectrum has a certain scan mode.
Definition: RangeUtils.h:206
OpenMS::IsInIsolationWindow::IsInIsolationWindow
IsInIsolationWindow(std::vector< double > vec_mz, bool reverse=false)
Constructor.
Definition: RangeUtils.h:673
OpenMS::Peak2D::getPosition
PositionType const & getPosition() const
Non-mutable access to the position.
Definition: Peak2D.h:178
OpenMS::InPrecursorMZRange::InPrecursorMZRange
InPrecursorMZRange(const double &mz_left, const double &mz_right, bool reverse=false)
Constructor.
Definition: RangeUtils.h:405
ListUtils.h
OpenMS::IsEmptySpectrum::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:290
OpenMS::HasScanMode::HasScanMode
HasScanMode(Int mode, bool reverse=false)
Constructor.
Definition: RangeUtils.h:217
OpenMS::InPrecursorMZRange
Predicate that determines if a spectrum&#39;s precursor is within a certain m/z range.
Definition: RangeUtils.h:394
OpenMS::IsZoomSpectrum::operator()
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:322
OpenMS::InMzRange::max_
double max_
Definition: RangeUtils.h:514
OpenMS::IsInCollisionEnergyRange::max_energy_
double max_energy_
Definition: RangeUtils.h:605
OpenMS::InRTRange::min_
double min_
Definition: RangeUtils.h:158
OpenMS::InIntensityRange::max_
double max_
Definition: RangeUtils.h:551
OpenMS::HasScanMode::reverse_
bool reverse_
Definition: RangeUtils.h:230