OpenMS
2.6.0
|
The representation of a 1D spectrum. More...
#include <OpenMS/KERNEL/MSSpectrum.h>
Classes | |
struct | Chunk |
Used to remember what subsets in a spectrum are sorted already to allow faster sorting of the spectrum. More... | |
struct | Chunks |
struct | RTLess |
Comparator for the retention time. More... | |
Public Types | |
Base type definitions | |
typedef OpenMS::Peak1D | PeakType |
Peak type. More... | |
typedef PeakType::CoordinateType | CoordinateType |
Coordinate (m/z) type. More... | |
typedef std::vector< PeakType > | ContainerType |
Spectrum base type. More... | |
typedef OpenMS::DataArrays::FloatDataArray | FloatDataArray |
Float data array vector type. More... | |
typedef std::vector< FloatDataArray > | FloatDataArrays |
typedef OpenMS::DataArrays::StringDataArray | StringDataArray |
String data array vector type. More... | |
typedef std::vector< StringDataArray > | StringDataArrays |
typedef OpenMS::DataArrays::IntegerDataArray | IntegerDataArray |
Integer data array vector type. More... | |
typedef std::vector< IntegerDataArray > | IntegerDataArrays |
Peak container iterator type definitions | |
typedef ContainerType::iterator | Iterator |
Mutable iterator. More... | |
typedef ContainerType::const_iterator | ConstIterator |
Non-mutable iterator. More... | |
typedef ContainerType::reverse_iterator | ReverseIterator |
Mutable reverse iterator. More... | |
typedef ContainerType::const_reverse_iterator | ConstReverseIterator |
Non-mutable reverse iterator. More... | |
Public Types inherited from RangeManager< 1 > | |
enum | |
Dimension of the position range. More... | |
typedef DRange< D > | PositionRangeType |
Position range type. More... | |
typedef DPosition< D > | PositionType |
Position Type. More... | |
typedef DRange< 1 > | IntensityRangeType |
Intensity range type. More... | |
Public Types inherited from SpectrumSettings | |
enum | SpectrumType { UNKNOWN, CENTROID, PROFILE, SIZE_OF_SPECTRUMTYPE } |
Spectrum peak type. More... | |
Public Member Functions | |
Accessors for meta information | |
Returns the absolute retention time (in seconds) | |
double | getRT () const |
void | setRT (double rt) |
Sets the absolute retention time (in seconds) More... | |
double | getDriftTime () const |
Returns the ion mobility drift time (-1 means it is not set) More... | |
void | setDriftTime (double dt) |
Sets the ion mobility drift time. More... | |
DriftTimeUnit | getDriftTimeUnit () const |
Returns the ion mobility drift time unit. More... | |
void | setDriftTimeUnit (DriftTimeUnit dt) |
Sets the ion mobility drift time unit. More... | |
UInt | getMSLevel () const |
Returns the MS level. More... | |
void | setMSLevel (UInt ms_level) |
Sets the MS level. More... | |
const String & | getName () const |
Returns the name. More... | |
void | setName (const String &name) |
Sets the name. More... | |
Peak data array methods | |
These methods are used to annotate each peak in a spectrum with meta information. It is an intermediate way between storing the information in the peak's MetaInfoInterface and deriving a new peak type with members for this information. These statements should help you chose which approach to use
| |
const FloatDataArrays & | getFloatDataArrays () const |
Returns a const reference to the float meta data arrays. More... | |
FloatDataArrays & | getFloatDataArrays () |
Returns a mutable reference to the float meta data arrays. More... | |
void | setFloatDataArrays (const FloatDataArrays &fda) |
Sets the float meta data arrays. More... | |
const StringDataArrays & | getStringDataArrays () const |
Returns a const reference to the string meta data arrays. More... | |
StringDataArrays & | getStringDataArrays () |
Returns a mutable reference to the string meta data arrays. More... | |
void | setStringDataArrays (const StringDataArrays &sda) |
Sets the string meta data arrays. More... | |
const IntegerDataArrays & | getIntegerDataArrays () const |
Returns a const reference to the integer meta data arrays. More... | |
IntegerDataArrays & | getIntegerDataArrays () |
Returns a mutable reference to the integer meta data arrays. More... | |
void | setIntegerDataArrays (const IntegerDataArrays &ida) |
Sets the integer meta data arrays. More... | |
Sorting peaks | |
void | sortByIntensity (bool reverse=false) |
Lexicographically sorts the peaks by their intensity. More... | |
void | sortByPosition () |
Lexicographically sorts the peaks by their position. More... | |
void | sortByPositionPresorted (const std::vector< Chunk > &chunks) |
Sort the spectrum, but uses the fact, that certain chunks are presorted. More... | |
bool | isSorted () const |
Checks if all peaks are sorted with respect to ascending m/z. More... | |
Public Member Functions inherited from RangeManager< 1 > | |
RangeManager () | |
Default constructor. More... | |
RangeManager (const RangeManager &rhs) | |
Copy constructor. More... | |
RangeManager (RangeManager &&) noexcept=default | |
Move constructor. More... | |
virtual | ~RangeManager () |
Destructor. More... | |
RangeManager & | operator= (const RangeManager &rhs) |
Assignment operator. More... | |
bool | operator== (const RangeManager &rhs) const |
Equality operator. More... | |
bool | operator!= (const RangeManager &rhs) const |
Equality operator. More... | |
const PositionType & | getMin () const |
Returns the minimum position. More... | |
const PositionType & | getMax () const |
Returns the maximum position. More... | |
double | getMinInt () const |
Returns the minimum intensity. More... | |
double | getMaxInt () const |
Returns the maximum intensity. More... | |
void | clearRanges () |
Resets the ranges. More... | |
Public Member Functions inherited from SpectrumSettings | |
SpectrumSettings () | |
Constructor. More... | |
SpectrumSettings (const SpectrumSettings &)=default | |
Copy constructor. More... | |
SpectrumSettings (SpectrumSettings &&)=default | |
Move constructor. More... | |
~SpectrumSettings () | |
Destructor. More... | |
SpectrumSettings & | operator= (const SpectrumSettings &)=default |
SpectrumSettings & | operator= (SpectrumSettings &&) &=default |
Move assignment operator. More... | |
bool | operator== (const SpectrumSettings &rhs) const |
Equality operator. More... | |
bool | operator!= (const SpectrumSettings &rhs) const |
Equality operator. More... | |
void | unify (const SpectrumSettings &rhs) |
merge another spectrum setting into this one (data is usually appended, except for spectrum type which needs to be unambiguous to be kept) More... | |
SpectrumType | getType () const |
returns the spectrum type (centroided (PEAKS) or profile data (RAW)) More... | |
void | setType (SpectrumType type) |
sets the spectrum type More... | |
const String & | getNativeID () const |
returns the native identifier for the spectrum, used by the acquisition software. More... | |
void | setNativeID (const String &native_id) |
sets the native identifier for the spectrum, used by the acquisition software. More... | |
const String & | getComment () const |
returns the free-text comment More... | |
void | setComment (const String &comment) |
sets the free-text comment More... | |
const InstrumentSettings & | getInstrumentSettings () const |
returns a const reference to the instrument settings of the current spectrum More... | |
InstrumentSettings & | getInstrumentSettings () |
returns a mutable reference to the instrument settings of the current spectrum More... | |
void | setInstrumentSettings (const InstrumentSettings &instrument_settings) |
sets the instrument settings of the current spectrum More... | |
const AcquisitionInfo & | getAcquisitionInfo () const |
returns a const reference to the acquisition info More... | |
AcquisitionInfo & | getAcquisitionInfo () |
returns a mutable reference to the acquisition info More... | |
void | setAcquisitionInfo (const AcquisitionInfo &acquisition_info) |
sets the acquisition info More... | |
const SourceFile & | getSourceFile () const |
returns a const reference to the source file More... | |
SourceFile & | getSourceFile () |
returns a mutable reference to the source file More... | |
void | setSourceFile (const SourceFile &source_file) |
sets the source file More... | |
const std::vector< Precursor > & | getPrecursors () const |
returns a const reference to the precursors More... | |
std::vector< Precursor > & | getPrecursors () |
returns a mutable reference to the precursors More... | |
void | setPrecursors (const std::vector< Precursor > &precursors) |
sets the precursors More... | |
const std::vector< Product > & | getProducts () const |
returns a const reference to the products More... | |
std::vector< Product > & | getProducts () |
returns a mutable reference to the products More... | |
void | setProducts (const std::vector< Product > &products) |
sets the products More... | |
const std::vector< PeptideIdentification > & | getPeptideIdentifications () const |
returns a const reference to the PeptideIdentification vector More... | |
std::vector< PeptideIdentification > & | getPeptideIdentifications () |
returns a mutable reference to the PeptideIdentification vector More... | |
void | setPeptideIdentifications (const std::vector< PeptideIdentification > &identifications) |
sets the PeptideIdentification vector More... | |
void | setDataProcessing (const std::vector< DataProcessingPtr > &data_processing) |
sets the description of the applied processing More... | |
std::vector< DataProcessingPtr > & | getDataProcessing () |
returns a mutable reference to the description of the applied processing More... | |
const std::vector< boost::shared_ptr< const DataProcessing > > | getDataProcessing () const |
returns a const reference to the description of the applied processing More... | |
Public Member Functions inherited from MetaInfoInterface | |
MetaInfoInterface () | |
Constructor. More... | |
MetaInfoInterface (const MetaInfoInterface &rhs) | |
Copy constructor. More... | |
MetaInfoInterface (MetaInfoInterface &&) noexcept | |
Move constructor. More... | |
~MetaInfoInterface () | |
Destructor. More... | |
MetaInfoInterface & | operator= (const MetaInfoInterface &rhs) |
Assignment operator. More... | |
MetaInfoInterface & | operator= (MetaInfoInterface &&) noexcept |
Move assignment operator. More... | |
bool | operator== (const MetaInfoInterface &rhs) const |
Equality operator. More... | |
bool | operator!= (const MetaInfoInterface &rhs) const |
Equality operator. More... | |
const DataValue & | getMetaValue (const String &name, const DataValue &default_value=DataValue::EMPTY) const |
Returns the value corresponding to a string, or a default value (default: DataValue::EMPTY) if not found. More... | |
const DataValue & | getMetaValue (UInt index, const DataValue &default_value=DataValue::EMPTY) const |
Returns the value corresponding to an index, or a default value (default: DataValue::EMPTY) if not found. More... | |
bool | metaValueExists (const String &name) const |
Returns whether an entry with the given name exists. More... | |
bool | metaValueExists (UInt index) const |
Returns whether an entry with the given index exists. More... | |
void | setMetaValue (const String &name, const DataValue &value) |
Sets the DataValue corresponding to a name. More... | |
void | setMetaValue (UInt index, const DataValue &value) |
Sets the DataValue corresponding to an index. More... | |
void | removeMetaValue (const String &name) |
Removes the DataValue corresponding to name if it exists. More... | |
void | removeMetaValue (UInt index) |
Removes the DataValue corresponding to index if it exists. More... | |
void | addMetaValues (const MetaInfoInterface &from) |
function to copy all meta values from one object to this one More... | |
void | getKeys (std::vector< String > &keys) const |
Fills the given vector with a list of all keys for which a value is set. More... | |
void | getKeys (std::vector< UInt > &keys) const |
Fills the given vector with a list of all keys for which a value is set. More... | |
bool | isMetaEmpty () const |
Returns if the MetaInfo is empty. More... | |
void | clearMetaInfo () |
Removes all meta values. More... | |
Export methods from std::vector<Peak1D> | |
typedef Precursor::DriftTimeUnit | DriftTimeUnit |
MSSpectrum () | |
Constructor. More... | |
MSSpectrum (const MSSpectrum &source) | |
Copy constructor. More... | |
MSSpectrum (MSSpectrum &&)=default | |
Move constructor. More... | |
~MSSpectrum () override | |
Destructor. More... | |
MSSpectrum & | operator= (const MSSpectrum &source) |
Assignment operator. More... | |
MSSpectrum & | operator= (MSSpectrum &&) &=default |
Move assignment operator. More... | |
MSSpectrum & | operator= (const SpectrumSettings &source) |
Assignment operator. More... | |
bool | operator== (const MSSpectrum &rhs) const |
Equality operator. More... | |
bool | operator!= (const MSSpectrum &rhs) const |
Equality operator. More... | |
void | updateRanges () override |
Updates minimum and maximum position/intensity. More... | |
Searching a peak or peak range | |
double | retention_time_ |
Retention time. More... | |
double | drift_time_ |
Drift time. More... | |
DriftTimeUnit | drift_time_unit_ |
Drift time unit. More... | |
UInt | ms_level_ |
MS level. More... | |
String | name_ |
Name. More... | |
FloatDataArrays | float_data_arrays_ |
Float data arrays. More... | |
StringDataArrays | string_data_arrays_ |
String data arrays. More... | |
IntegerDataArrays | integer_data_arrays_ |
Integer data arrays. More... | |
Size | findNearest (CoordinateType mz) const |
Binary search for the peak nearest to a specific m/z. More... | |
Int | findNearest (CoordinateType mz, CoordinateType tolerance) const |
Binary search for the peak nearest to a specific m/z given a +/- tolerance windows in Th. More... | |
Int | findNearest (CoordinateType mz, CoordinateType tolerance_left, CoordinateType tolerance_right) const |
Search for the peak nearest to a specific m/z given two +/- tolerance windows in Th. More... | |
Int | findHighestInWindow (CoordinateType mz, CoordinateType tolerance_left, CoordinateType tolerance_right) const |
Search for the peak with highest intensity among the peaks near to a specific m/z given two +/- tolerance windows in Th. More... | |
Iterator | MZBegin (CoordinateType mz) |
Binary search for peak range begin. More... | |
Iterator | MZBegin (Iterator begin, CoordinateType mz, Iterator end) |
Binary search for peak range begin. More... | |
Iterator | MZEnd (CoordinateType mz) |
Binary search for peak range end (returns the past-the-end iterator) More... | |
Iterator | MZEnd (Iterator begin, CoordinateType mz, Iterator end) |
Binary search for peak range end (returns the past-the-end iterator) More... | |
ConstIterator | MZBegin (CoordinateType mz) const |
Binary search for peak range begin. More... | |
ConstIterator | MZBegin (ConstIterator begin, CoordinateType mz, ConstIterator end) const |
Binary search for peak range begin. More... | |
ConstIterator | MZEnd (CoordinateType mz) const |
Binary search for peak range end (returns the past-the-end iterator) More... | |
ConstIterator | MZEnd (ConstIterator begin, CoordinateType mz, ConstIterator end) const |
Binary search for peak range end (returns the past-the-end iterator) More... | |
Iterator | PosBegin (CoordinateType mz) |
Binary search for peak range begin. More... | |
Iterator | PosBegin (Iterator begin, CoordinateType mz, Iterator end) |
Binary search for peak range begin. More... | |
ConstIterator | PosBegin (CoordinateType mz) const |
Binary search for peak range begin. More... | |
ConstIterator | PosBegin (ConstIterator begin, CoordinateType mz, ConstIterator end) const |
Binary search for peak range begin. More... | |
Iterator | PosEnd (CoordinateType mz) |
Binary search for peak range end (returns the past-the-end iterator) More... | |
Iterator | PosEnd (Iterator begin, CoordinateType mz, Iterator end) |
Binary search for peak range end (returns the past-the-end iterator) More... | |
ConstIterator | PosEnd (CoordinateType mz) const |
Binary search for peak range end (returns the past-the-end iterator) More... | |
ConstIterator | PosEnd (ConstIterator begin, CoordinateType mz, ConstIterator end) const |
Binary search for peak range end (returns the past-the-end iterator) More... | |
bool | containsIMData () const |
do the names of internal metadata arrays contain any hint of ion mobility data, e.g. 'Ion Mobility' More... | |
void | clear (bool clear_meta_data) |
Clears all data and meta data. More... | |
MSSpectrum & | select (const std::vector< Size > &indices) |
SpectrumSettings::SpectrumType | getType (const bool query_data) const |
Determine if spectrum is profile or centroided using up to three layers of information. More... | |
ConstIterator | getBasePeak () const |
Iterator | getBasePeak () |
PeakType::IntensityType | getTIC () const |
compute the total ion count (sum of all peak intensities) More... | |
SpectrumType | getType () const |
returns the spectrum type (centroided (PEAKS) or profile data (RAW)) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from MetaInfoInterface | |
static MetaInfoRegistry & | metaRegistry () |
Returns a reference to the MetaInfoRegistry. More... | |
Static Public Attributes inherited from SpectrumSettings | |
static const std::string | NamesOfSpectrumType [SIZE_OF_SPECTRUMTYPE] |
Names of spectrum types. More... | |
Protected Member Functions inherited from RangeManager< 1 > | |
void | updateRanges_ (const PeakIteratorType &begin, const PeakIteratorType &end) |
Updates the range using data points in the iterator range. More... | |
Protected Member Functions inherited from MetaInfoInterface | |
void | createIfNotExists_ () |
Creates the MetaInfo object if it does not exist. More... | |
Protected Attributes inherited from RangeManager< 1 > | |
IntensityRangeType | int_range_ |
Intensity range (1-dimensional) More... | |
PositionRangeType | pos_range_ |
Position range (D-dimensional) More... | |
Protected Attributes inherited from SpectrumSettings | |
SpectrumType | type_ |
String | native_id_ |
String | comment_ |
InstrumentSettings | instrument_settings_ |
SourceFile | source_file_ |
AcquisitionInfo | acquisition_info_ |
std::vector< Precursor > | precursors_ |
std::vector< Product > | products_ |
std::vector< PeptideIdentification > | identification_ |
std::vector< DataProcessingPtr > | data_processing_ |
Protected Attributes inherited from MetaInfoInterface | |
MetaInfo * | meta_ |
Pointer to the MetaInfo object (0 by default) More... | |
The representation of a 1D spectrum.
It contains peak data and metadata about specific instrument settings, acquisition settings, description of the meta values used in the peaks and precursor info (SpectrumSettings).
Several MSSpectrum instances are contained in a peak map (MSExperiment), which is essentially a vector of spectra with additional information about the experiment.
Precursor info from SpectrumSettings should only be used if this spectrum is a tandem-MS spectrum. The precursor spectrum is the first spectrum in MSExperiment, that has a lower MS-level than the current spectrum.
typedef ContainerType::const_iterator ConstIterator |
Non-mutable iterator.
typedef ContainerType::const_reverse_iterator ConstReverseIterator |
Non-mutable reverse iterator.
typedef std::vector<PeakType> ContainerType |
Spectrum base type.
Coordinate (m/z) type.
Float data array vector type.
typedef std::vector<FloatDataArray> FloatDataArrays |
Integer data array vector type.
typedef std::vector<IntegerDataArray> IntegerDataArrays |
typedef ContainerType::iterator Iterator |
Mutable iterator.
typedef OpenMS::Peak1D PeakType |
Peak type.
typedef ContainerType::reverse_iterator ReverseIterator |
Mutable reverse iterator.
String data array vector type.
typedef std::vector<StringDataArray> StringDataArrays |
MSSpectrum | ( | ) |
Constructor.
MSSpectrum | ( | const MSSpectrum & | source | ) |
Copy constructor.
|
default |
Move constructor.
|
inlineoverride |
Destructor.
void clear | ( | bool | clear_meta_data | ) |
Clears all data and meta data.
clear_meta_data | If true, all meta data is cleared in addition to the data. |
Referenced by SpectraMerger::averageCentroidSpectra_(), SpectraMerger::averageProfileSpectra_(), MzMLSwathFileConsumer::consumeSwathSpectrum_(), ChromatogramTools::convertSpectraToChromatograms(), NucleicAcidSearchEngine::deisotopeAndSingleChargeMSSpectrum_(), OpenMS::expandIMSpectrum(), WindowMower::filterPeakSpectrumForTopNInJumpingWindow(), MS2File::load(), DTAFile::load(), XMassFile::load(), DTA2DFile::load(), PeakPickerIterative::pick(), and OpenMS::processDriftTimeStack().
bool containsIMData | ( | ) | const |
do the names of internal metadata arrays contain any hint of ion mobility data, e.g. 'Ion Mobility'
Referenced by TOPPViewBase::showCurrentPeaksAsIonMobility().
Int findHighestInWindow | ( | CoordinateType | mz, |
CoordinateType | tolerance_left, | ||
CoordinateType | tolerance_right | ||
) | const |
Search for the peak with highest intensity among the peaks near to a specific m/z given two +/- tolerance windows in Th.
mz | The searched for mass-to-charge ratio searched |
tolerance | The non-negative tolerance applied to both sides of mz |
Size findNearest | ( | CoordinateType | mz | ) | const |
Binary search for the peak nearest to a specific m/z.
mz | The searched for mass-to-charge ratio searched |
Exception::Precondition | is thrown if the spectrum is empty (not only in debug mode) |
Referenced by NucleicAcidSearchEngine::deisotopeAndSingleChargeMSSpectrum_().
Int findNearest | ( | CoordinateType | mz, |
CoordinateType | tolerance | ||
) | const |
Binary search for the peak nearest to a specific m/z given a +/- tolerance windows in Th.
mz | The searched for mass-to-charge ratio searched |
tolerance | The non-negative tolerance applied to both sides of mz |
Int findNearest | ( | CoordinateType | mz, |
CoordinateType | tolerance_left, | ||
CoordinateType | tolerance_right | ||
) | const |
Search for the peak nearest to a specific m/z given two +/- tolerance windows in Th.
mz | The searched for mass-to-charge ratio searched |
tolerance_left | The non-negative tolerance applied left of mz |
tolerance_right | The non-negative tolerance applied right of mz |
Iterator getBasePeak | ( | ) |
return the peak with the highest intensity. If the peak is not unique, the first peak in the container is returned. The function works correctly, even if the spectrum is unsorted.
ConstIterator getBasePeak | ( | ) | const |
return the peak with the highest intensity. If the peak is not unique, the first peak in the container is returned. The function works correctly, even if the spectrum is unsorted.
double getDriftTime | ( | ) | const |
Returns the ion mobility drift time (-1 means it is not set)
DriftTimeUnit getDriftTimeUnit | ( | ) | const |
Returns the ion mobility drift time unit.
Referenced by OpenMS::processDriftTimeStack().
|
inline |
Returns a mutable reference to the float meta data arrays.
const FloatDataArrays& getFloatDataArrays | ( | ) | const |
Returns a const reference to the float meta data arrays.
Referenced by MetaDataBrowser::add(), MSExperiment::ContainerAdd_< ContainerValueType, false >::addData_(), OpenMS::expandIMSpectrum(), TwoDOptimization::optimizeRegionsScanwise_(), DataFilters::passes(), PeakPickerIterative::pick(), and TOPPViewBase::showCurrentPeaksAsIonMobility().
IntegerDataArrays& getIntegerDataArrays | ( | ) |
Returns a mutable reference to the integer meta data arrays.
const IntegerDataArrays& getIntegerDataArrays | ( | ) | const |
Returns a const reference to the integer meta data arrays.
Referenced by MetaDataBrowser::add(), and DataFilters::passes().
UInt getMSLevel | ( | ) | const |
Returns the MS level.
For survey scans this is 1, for MS/MS scans 2, ...
Referenced by FullSwathFileConsumer::consumeSpectrum(), ParentPeakMower::filterSpectrum(), InMSLevelRange< SpectrumType >::operator()(), IsInCollisionEnergyRange< SpectrumType >::operator()(), IsInIsolationWindowSizeRange< SpectrumType >::operator()(), IsInIsolationWindow< SpectrumType >::operator()(), and PeakPickerIterative::pick().
const String& getName | ( | ) | const |
Returns the name.
Referenced by OpenMS::expandIMSpectrum(), and PeakPickerIterative::pick().
double getRT | ( | ) | const |
Referenced by IsotopeWaveletTransform< PeakType >::checkPositionForPlausibility_(), GaussFilter::filter(), IsotopeWaveletTransform< PeakType >::TransSpectrum::getRT(), IsotopeWaveletTransform< PeakType >::identifyCharge(), IsotopeWaveletTransform< PeakType >::initializeScan(), DTA2DFile::load(), IDMapper::mapPrecursorsToIdentifications(), SpectraMerger::mergeSpectra_(), InRTRange< SpectrumType >::operator()(), PeakPickerIterative::pick(), NucleicAcidSearchEngine::postProcessHits_(), and SpectrumLookup::readSpectra().
StringDataArrays& getStringDataArrays | ( | ) |
Returns a mutable reference to the string meta data arrays.
const StringDataArrays& getStringDataArrays | ( | ) | const |
Returns a const reference to the string meta data arrays.
Referenced by MetaDataBrowser::add().
PeakType::IntensityType getTIC | ( | ) | const |
compute the total ion count (sum of all peak intensities)
SpectrumType getType |
returns the spectrum type (centroided (PEAKS) or profile data (RAW))
SpectrumSettings::SpectrumType getType | ( | const bool | query_data | ) | const |
Determine if spectrum is profile or centroided using up to three layers of information.
First, the SpectrumSettings are inquired and the type is returned unless it is unknown. Second, all data processing entries are searched for a centroiding step. If that is unsuccessful as well and query_data
is true, the data is fed into PeakTypeEstimator().
[query_data] | If SpectrumSettings and DataProcessing information are not sufficient, should the data be queried? (potentially expensive) |
bool isSorted | ( | ) | const |
Checks if all peaks are sorted with respect to ascending m/z.
ConstIterator MZBegin | ( | ConstIterator | begin, |
CoordinateType | mz, | ||
ConstIterator | end | ||
) | const |
Binary search for peak range begin.
Iterator MZBegin | ( | CoordinateType | mz | ) |
Binary search for peak range begin.
Referenced by IsotopeWaveletTransform< PeakType >::checkPositionForPlausibility_(), IsotopeWaveletTransform< PeakType >::checkPPMTheoModel_(), IsotopeWaveletTransform< PeakType >::identifyCharge(), IsotopeWaveletTransform< PeakType >::initializeScan(), IsotopeWaveletTransform< PeakType >::mapSeeds2Features(), IsotopeWaveletTransform< PeakType >::TransSpectrum::MZBegin(), and IsotopeWaveletTransform< PeakType >::scoreThis_().
ConstIterator MZBegin | ( | CoordinateType | mz | ) | const |
Binary search for peak range begin.
Iterator MZBegin | ( | Iterator | begin, |
CoordinateType | mz, | ||
Iterator | end | ||
) |
Binary search for peak range begin.
ConstIterator MZEnd | ( | ConstIterator | begin, |
CoordinateType | mz, | ||
ConstIterator | end | ||
) | const |
Binary search for peak range end (returns the past-the-end iterator)
Iterator MZEnd | ( | CoordinateType | mz | ) |
Binary search for peak range end (returns the past-the-end iterator)
Referenced by IsotopeWaveletTransform< PeakType >::identifyCharge(), IsotopeWaveletTransform< PeakType >::initializeScan(), and IsotopeWaveletTransform< PeakType >::TransSpectrum::MZEnd().
ConstIterator MZEnd | ( | CoordinateType | mz | ) | const |
Binary search for peak range end (returns the past-the-end iterator)
Iterator MZEnd | ( | Iterator | begin, |
CoordinateType | mz, | ||
Iterator | end | ||
) |
Binary search for peak range end (returns the past-the-end iterator)
|
inline |
Equality operator.
References OpenMS::Internal::operator==().
MSSpectrum& operator= | ( | const MSSpectrum & | source | ) |
Assignment operator.
MSSpectrum& operator= | ( | const SpectrumSettings & | source | ) |
Assignment operator.
|
default |
Move assignment operator.
bool operator== | ( | const MSSpectrum & | rhs | ) | const |
Equality operator.
ConstIterator PosBegin | ( | ConstIterator | begin, |
CoordinateType | mz, | ||
ConstIterator | end | ||
) | const |
Binary search for peak range begin.
Alias for MZBegin()
Iterator PosBegin | ( | CoordinateType | mz | ) |
Binary search for peak range begin.
Alias for MZBegin()
ConstIterator PosBegin | ( | CoordinateType | mz | ) | const |
Binary search for peak range begin.
Alias for MZBegin()
Iterator PosBegin | ( | Iterator | begin, |
CoordinateType | mz, | ||
Iterator | end | ||
) |
Binary search for peak range begin.
Alias for MZBegin()
ConstIterator PosEnd | ( | ConstIterator | begin, |
CoordinateType | mz, | ||
ConstIterator | end | ||
) | const |
Binary search for peak range end (returns the past-the-end iterator)
Alias for MZEnd()
Iterator PosEnd | ( | CoordinateType | mz | ) |
Binary search for peak range end (returns the past-the-end iterator)
Alias for MZEnd()
ConstIterator PosEnd | ( | CoordinateType | mz | ) | const |
Binary search for peak range end (returns the past-the-end iterator)
Alias for MZEnd()
Iterator PosEnd | ( | Iterator | begin, |
CoordinateType | mz, | ||
Iterator | end | ||
) |
Binary search for peak range end (returns the past-the-end iterator)
Alias for MZEnd()
MSSpectrum& select | ( | const std::vector< Size > & | indices | ) |
void setDriftTime | ( | double | dt | ) |
Sets the ion mobility drift time.
Referenced by OpenMS::expandIMSpectrum(), and OpenMS::processDriftTimeStack().
void setDriftTimeUnit | ( | DriftTimeUnit | dt | ) |
Sets the ion mobility drift time unit.
Referenced by OpenMS::expandIMSpectrum(), and OpenMS::processDriftTimeStack().
void setFloatDataArrays | ( | const FloatDataArrays & | fda | ) |
Sets the float meta data arrays.
Referenced by OpenMS::expandIMSpectrum(), and OpenMS::processDriftTimeStack().
void setIntegerDataArrays | ( | const IntegerDataArrays & | ida | ) |
Sets the integer meta data arrays.
void setMSLevel | ( | UInt | ms_level | ) |
void setName | ( | const String & | name | ) |
Sets the name.
Referenced by OpenMS::expandIMSpectrum(), DTAFile::load(), XMassFile::load(), NucleicAcidSearchEngine::main_(), and PeakPickerIterative::pick().
void setRT | ( | double | rt | ) |
Sets the absolute retention time (in seconds)
Referenced by MascotGenericFile::getNextSpectrum_(), TwoDOptimization::getRegionEndpoints_(), MascotInfile::load(), XMassFile::load(), DTA2DFile::load(), SpectraMerger::mergeSpectra_(), TwoDOptimization::optimize(), and PeakPickerIterative::pick().
void setStringDataArrays | ( | const StringDataArrays & | sda | ) |
Sets the string meta data arrays.
void sortByIntensity | ( | bool | reverse = false | ) |
Lexicographically sorts the peaks by their intensity.
Sorts the peaks according to ascending intensity. Meta data arrays will be sorted accordingly.
Referenced by WindowMower::filterPeakSpectrumForTopNInSlidingWindow(), Scaler::filterSpectrum(), and NLargest::filterSpectrum().
void sortByPosition | ( | ) |
Lexicographically sorts the peaks by their position.
The spectrum is sorted with respect to position. Meta data arrays will be sorted accordingly.
Referenced by ComplementFilter::apply(), ComplementMarker::apply(), NeutralLossMarker::apply(), IsotopeMarker::apply(), NucleicAcidSearchEngine::deisotopeAndSingleChargeMSSpectrum_(), WindowMower::filterPeakSpectrumForTopNInJumpingWindow(), WindowMower::filterPeakSpectrumForTopNInSlidingWindow(), BernNorm::filterSpectrum(), SpectraMerger::mergeSpectra_(), PeakPickerIterative::pick(), NucleicAcidSearchEngine::preprocessSpectra_(), and LayerData::sortCurrentSpectrumByPosition().
void sortByPositionPresorted | ( | const std::vector< Chunk > & | chunks | ) |
Sort the spectrum, but uses the fact, that certain chunks are presorted.
chunks | a Chunk is an object that contains the start and end of a sublist of peaks in the spectrum, that is or isn't sorted yet (is_sorted member) |
|
overridevirtual |
Updates minimum and maximum position/intensity.
This method is usually implemented by calling clearRanges() and updateRanges_().
Implements RangeManager< 1 >.
|
protected |
Drift time.
|
protected |
Drift time unit.
|
protected |
Float data arrays.
|
protected |
Integer data arrays.
|
protected |
MS level.
|
protected |
Name.
|
protected |
Retention time.
|
protected |
String data arrays.