OpenMS  2.8.0
Classes
RangeUtils

Predicates for range operations. More...

Collaboration diagram for RangeUtils:

Classes

class  HasMetaValue< MetaContainer >
 Predicate that determines if a class has a certain metavalue. More...
 
class  InRTRange< SpectrumType >
 Predicate that determines if a spectrum lies inside/outside a specific retention time range. More...
 
class  InMSLevelRange< SpectrumType >
 Predicate that determines if a spectrum lies inside/outside a specific MS level set. More...
 
class  HasScanMode< SpectrumType >
 Predicate that determines if a spectrum has a certain scan mode. More...
 
class  HasScanPolarity< SpectrumType >
 Predicate that determines if a spectrum has a certain scan polarity. More...
 
class  IsEmptySpectrum< SpectrumType >
 Predicate that determines if a spectrum is empty. More...
 
class  IsZoomSpectrum< SpectrumType >
 Predicate that determines if a spectrum is a zoom (enhanced resolution) spectrum. More...
 
class  HasActivationMethod< SpectrumType >
 Predicate that determines if a spectrum was generated using any activation method given in the constructor list. More...
 
class  InPrecursorMZRange< SpectrumType >
 Predicate that determines if a spectrum's precursor is within a certain m/z range. More...
 
class  HasPrecursorCharge< SpectrumType >
 Predicate that determines if a spectrum has a certain precursor charge as given in the constructor list. More...
 
class  InMzRange< PeakType >
 Predicate that determines if a peak lies inside/outside a specific m/z range. More...
 
class  InIntensityRange< PeakType >
 Predicate that determines if a peak lies inside/outside a specific intensity range. More...
 
class  IsInCollisionEnergyRange< SpectrumType >
 Predicate that determines if an MSn spectrum was generated with a collision energy in the given range. More...
 
class  IsInIsolationWindowSizeRange< SpectrumType >
 Predicate that determines if the width of the isolation window of an MSn spectrum is in the given range. More...
 
class  IsInIsolationWindow< SpectrumType >
 Predicate that determines if the isolation window covers ANY of the given m/z values. More...
 

Detailed Description

Predicates for range operations.

A group of predicates that can be used to perform range operations on MS data. They operate on classes that have the save interface as Spectrum or Peak1D or Peak2D, respectively.

The code for the removal of spectra in a certain retention time range from a vector of spectra might look like this:

//data
std::vector< MSSpectrum> spectra;
//... spectra are added to the vector ...
//range from 0.0 to 36.0 s
InRTRange< MSSpectrum> range(0.0, 36.0);
//remove the range
spectra.erase(remove_if(spectra.begin(), spectra.end(), range), spectra.end());

The code for the removal of peaks within certain intensity range from a spectrum might look like this:

//data
MSSpectrum spectrum;
//... peaks are added to the spectrum ...
//range from 0.0 to 5000.0 intensity
InIntensityRange range< Peak1D >(0.0, 5000.0);
//remove the range
spectrum.erase(remove_if(spectrum.begin(), spectrum.end(), range), spectrum.end());