OpenMS
PeakFileOptions Class Reference

Options for loading files containing peak data. More...

#include <OpenMS/FORMAT/OPTIONS/PeakFileOptions.h>

Collaboration diagram for PeakFileOptions:
[legend]

Public Member Functions

 PeakFileOptions ()
 Default constructor. More...
 
 PeakFileOptions (const PeakFileOptions &)
 Copy constructor. More...
 
PeakFileOptionsoperator= (const PeakFileOptions &)=default
 Copy assignment. More...
 
 ~PeakFileOptions ()
 Destructor. More...
 
Meta data and file format option
void setMetadataOnly (bool only)
 sets whether or not to load only meta data More...
 
bool getMetadataOnly () const
 returns whether or not to load only meta data More...
 
void setForceMQCompatability (bool forceMQ)
 [mzXML only!] Whether to write a scan-index and meta data to indicate a Thermo FTMS/ITMS instrument (required to have parameter control in MQ) More...
 
bool getForceMQCompatability () const
 [mzXML only!] Whether to write a scan-index and meta data to indicate a Thermo FTMS/ITMS instrument (required to have parameter control in MQ) More...
 
void setForceTPPCompatability (bool forceTPP)
 [mzML only!] Whether to skip writing the <isolationWindow> tag so that TPP finds the correct precursor m/z More...
 
bool getForceTPPCompatability () const
 [mzML only!] Whether to skip writing the <isolationWindow> tag so that TPP finds the correct precursor m/z More...
 
Supplemental data option
void setWriteSupplementalData (bool write)
 sets whether or not to write supplemental peak data in MzData files More...
 
bool getWriteSupplementalData () const
 returns whether or not to write supplemental peak data in MzData files More...
 
RT range option
void setRTRange (const DRange< 1 > &range)
 restricts the range of RT values for peaks to load More...
 
bool hasRTRange () const
 returns true if an RT range has been set More...
 
const DRange< 1 > & getRTRange () const
 returns the RT range More...
 
m/z range option
void setMZRange (const DRange< 1 > &range)
 restricts the range of MZ values for peaks to load More...
 
bool hasMZRange () const
 returns true if an MZ range has been set More...
 
const DRange< 1 > & getMZRange () const
 returns the MZ range More...
 
Intensity range option
void setIntensityRange (const DRange< 1 > &range)
 restricts the range of intensity values for peaks to load More...
 
bool hasIntensityRange () const
 returns true if an intensity range has been set More...
 
const DRange< 1 > & getIntensityRange () const
 returns the intensity range More...
 
MS levels option

With this option, MS level filters can be set.

Note
The original spectrum identifiers are stored as the nativeID of the spectrum.
void setMSLevels (const std::vector< Int > &levels)
 sets the desired MS levels for peaks to load More...
 
void addMSLevel (int level)
 adds a desired MS level for peaks to load More...
 
void clearMSLevels ()
 clears the MS levels More...
 
bool hasMSLevels () const
 returns true, if MS levels have been set More...
 
bool containsMSLevel (int level) const
 returns true, if MS level level has been set More...
 
const std::vector< Int > & getMSLevels () const
 returns the set MS levels More...
 
Compression options
Note
This option is ignored if the format does not support compression
void setCompression (bool compress)
 
bool getCompression () const
 returns true, if data should be compressed when writing More...
 
lazyload option

sets whether or not to always append the data to the given map (even if a consumer is given)

void setAlwaysAppendData (bool only)
 
bool getAlwaysAppendData () const
 returns whether or not to always append the data to the given map (even if a consumer is given) More...
 
void setFillData (bool only)
 sets whether to fill the actual data into the container (spectrum/chromatogram) More...
 
bool getFillData () const
 returns whether to fill the actual data into the container (spectrum/chromatogram) More...
 
void setSkipXMLChecks (bool only)
 sets whether to skip some XML checks and be fast instead More...
 
bool getSkipXMLChecks () const
 returns whether to skip some XML checks and be fast instead More...
 
sort peaks in spectra / chromatograms by position

sets whether or not to sort peaks in spectra

void setSortSpectraByMZ (bool sort)
 
bool getSortSpectraByMZ () const
 gets whether or not peaks in spectra should be sorted More...
 
void setSortChromatogramsByRT (bool sort)
 sets whether or not to sort peaks in chromatograms More...
 
bool getSortChromatogramsByRT () const
 gets whether or not peaks in chromatograms should be sorted More...
 
Precision options

Note that m/z and RT are controlled with the same flag (for spectra and chromatograms) while there is a separate flag for intensity.

Note
This option is ignored if the format does not support multiple precisions
void setMz32Bit (bool mz_32_bit)
 
bool getMz32Bit () const
 
void setIntensity32Bit (bool int_32_bit)
 
bool getIntensity32Bit () const
 
bool getWriteIndex () const
 Whether to write an index at the end of the file (e.g. indexedmzML file format) More...
 
void setWriteIndex (bool write_index)
 Whether to write an index at the end of the file (e.g. indexedmzML file format) More...
 
MSNumpressCoder::NumpressConfig getNumpressConfigurationMassTime () const
 Set numpress configuration options for m/z or rt dimension. More...
 
void setNumpressConfigurationMassTime (MSNumpressCoder::NumpressConfig config)
 Get numpress configuration options for m/z or rt dimension. More...
 
MSNumpressCoder::NumpressConfig getNumpressConfigurationIntensity () const
 Set numpress configuration options for intensity dimension. More...
 
void setNumpressConfigurationIntensity (MSNumpressCoder::NumpressConfig config)
 Get numpress configuration options for intensity dimension. More...
 
MSNumpressCoder::NumpressConfig getNumpressConfigurationFloatDataArray () const
 Set numpress configuration options for float data arrays. More...
 
void setNumpressConfigurationFloatDataArray (MSNumpressCoder::NumpressConfig config)
 Get numpress configuration options for float data arrays. More...
 

Data pool size options

Some file readers and writers can process the data in parallel by reading in parts of the file and keeping it in memory and then process this partial data in parallel. This parameter specifies how many data points (spectra/chromatograms) should be read before parallel processing is initiated.

bool metadata_only_
 
bool force_maxquant_compatibility_
 for mzXML-writing only: set a fixed vendor (Thermo Scientific), mass analyzer (FTMS) More...
 
bool force_tpp_compatibility_
 for mzML-writing only: work around some bugs in TPP file parsers More...
 
bool write_supplemental_data_
 
bool has_rt_range_
 
bool has_mz_range_
 
bool has_intensity_range_
 
bool mz_32_bit_
 
bool int_32_bit_
 
DRange< 1 > rt_range_
 
DRange< 1 > mz_range_
 
DRange< 1 > intensity_range_
 
std::vector< Intms_levels_
 
bool zlib_compression_
 
bool always_append_data_
 
bool skip_xml_checks_
 
bool sort_spectra_by_mz_
 
bool sort_chromatograms_by_rt_
 
bool fill_data_
 
bool write_index_
 
MSNumpressCoder::NumpressConfig np_config_mz_
 
MSNumpressCoder::NumpressConfig np_config_int_
 
MSNumpressCoder::NumpressConfig np_config_fda_
 
Size maximal_data_pool_size_
 
bool precursor_mz_selected_ion_
 
Size getMaxDataPoolSize () const
 Get maximal size of the data pool. More...
 
void setMaxDataPoolSize (Size size)
 Set maximal size of the data pool. More...
 
bool getPrecursorMZSelectedIon () const
 [mzML only!] Whether to use the "selected ion m/z" value as the precursor m/z value (alternative: use the "isolation window target m/z" value) More...
 
void setPrecursorMZSelectedIon (bool choice)
 [mzML only!] Set whether to use the "selected ion m/z" value as the precursor m/z value (alternative: use the "isolation window target m/z" value) More...
 
bool hasFilters () const
 do these options skip spectra or chromatograms due to RT or MSLevel filters? More...
 

Detailed Description

Options for loading files containing peak data.

Constructor & Destructor Documentation

◆ PeakFileOptions() [1/2]

Default constructor.

◆ PeakFileOptions() [2/2]

Copy constructor.

◆ ~PeakFileOptions()

Destructor.

Member Function Documentation

◆ addMSLevel()

void addMSLevel ( int  level)

adds a desired MS level for peaks to load

Referenced by NucleicAcidSearchEngine::main_().

◆ clearMSLevels()

void clearMSLevels ( )

clears the MS levels

Referenced by NucleicAcidSearchEngine::main_().

◆ containsMSLevel()

bool containsMSLevel ( int  level) const

returns true, if MS level level has been set

◆ getAlwaysAppendData()

bool getAlwaysAppendData ( ) const

returns whether or not to always append the data to the given map (even if a consumer is given)

◆ getCompression()

bool getCompression ( ) const

returns true, if data should be compressed when writing

◆ getFillData()

bool getFillData ( ) const

returns whether to fill the actual data into the container (spectrum/chromatogram)

◆ getForceMQCompatability()

bool getForceMQCompatability ( ) const

[mzXML only!] Whether to write a scan-index and meta data to indicate a Thermo FTMS/ITMS instrument (required to have parameter control in MQ)

◆ getForceTPPCompatability()

bool getForceTPPCompatability ( ) const

[mzML only!] Whether to skip writing the <isolationWindow> tag so that TPP finds the correct precursor m/z

◆ getIntensity32Bit()

bool getIntensity32Bit ( ) const

◆ getIntensityRange()

const DRange<1>& getIntensityRange ( ) const

returns the intensity range

Referenced by DTA2DFile::load().

◆ getMaxDataPoolSize()

Size getMaxDataPoolSize ( ) const

Get maximal size of the data pool.

◆ getMetadataOnly()

bool getMetadataOnly ( ) const

returns whether or not to load only meta data

◆ getMSLevels()

const std::vector<Int>& getMSLevels ( ) const

returns the set MS levels

◆ getMz32Bit()

bool getMz32Bit ( ) const

◆ getMZRange()

const DRange<1>& getMZRange ( ) const

returns the MZ range

Referenced by DTA2DFile::load().

◆ getNumpressConfigurationFloatDataArray()

MSNumpressCoder::NumpressConfig getNumpressConfigurationFloatDataArray ( ) const

Set numpress configuration options for float data arrays.

◆ getNumpressConfigurationIntensity()

MSNumpressCoder::NumpressConfig getNumpressConfigurationIntensity ( ) const

Set numpress configuration options for intensity dimension.

◆ getNumpressConfigurationMassTime()

MSNumpressCoder::NumpressConfig getNumpressConfigurationMassTime ( ) const

Set numpress configuration options for m/z or rt dimension.

◆ getPrecursorMZSelectedIon()

bool getPrecursorMZSelectedIon ( ) const

[mzML only!] Whether to use the "selected ion m/z" value as the precursor m/z value (alternative: use the "isolation window target m/z" value)

◆ getRTRange()

const DRange<1>& getRTRange ( ) const

returns the RT range

Referenced by DTA2DFile::load().

◆ getSkipXMLChecks()

bool getSkipXMLChecks ( ) const

returns whether to skip some XML checks and be fast instead

◆ getSortChromatogramsByRT()

bool getSortChromatogramsByRT ( ) const

gets whether or not peaks in chromatograms should be sorted

◆ getSortSpectraByMZ()

bool getSortSpectraByMZ ( ) const

gets whether or not peaks in spectra should be sorted

◆ getWriteIndex()

bool getWriteIndex ( ) const

Whether to write an index at the end of the file (e.g. indexedmzML file format)

◆ getWriteSupplementalData()

bool getWriteSupplementalData ( ) const

returns whether or not to write supplemental peak data in MzData files

◆ hasFilters()

bool hasFilters ( ) const

do these options skip spectra or chromatograms due to RT or MSLevel filters?

◆ hasIntensityRange()

bool hasIntensityRange ( ) const

returns true if an intensity range has been set

Referenced by DTA2DFile::load().

◆ hasMSLevels()

bool hasMSLevels ( ) const

returns true, if MS levels have been set

◆ hasMZRange()

bool hasMZRange ( ) const

returns true if an MZ range has been set

Referenced by DTA2DFile::load().

◆ hasRTRange()

bool hasRTRange ( ) const

returns true if an RT range has been set

Referenced by DTA2DFile::load().

◆ operator=()

PeakFileOptions& operator= ( const PeakFileOptions )
default

Copy assignment.

◆ setAlwaysAppendData()

void setAlwaysAppendData ( bool  only)

◆ setCompression()

void setCompression ( bool  compress)

◆ setFillData()

void setFillData ( bool  only)

sets whether to fill the actual data into the container (spectrum/chromatogram)

◆ setForceMQCompatability()

void setForceMQCompatability ( bool  forceMQ)

[mzXML only!] Whether to write a scan-index and meta data to indicate a Thermo FTMS/ITMS instrument (required to have parameter control in MQ)

◆ setForceTPPCompatability()

void setForceTPPCompatability ( bool  forceTPP)

[mzML only!] Whether to skip writing the <isolationWindow> tag so that TPP finds the correct precursor m/z

◆ setIntensity32Bit()

void setIntensity32Bit ( bool  int_32_bit)

◆ setIntensityRange()

void setIntensityRange ( const DRange< 1 > &  range)

restricts the range of intensity values for peaks to load

Referenced by TOPPFLASHDeconv::main_().

◆ setMaxDataPoolSize()

void setMaxDataPoolSize ( Size  size)

Set maximal size of the data pool.

◆ setMetadataOnly()

void setMetadataOnly ( bool  only)

sets whether or not to load only meta data

Referenced by TOPPViewBase::metadataFileDialog().

◆ setMSLevels()

void setMSLevels ( const std::vector< Int > &  levels)

sets the desired MS levels for peaks to load

◆ setMz32Bit()

void setMz32Bit ( bool  mz_32_bit)

◆ setMZRange()

void setMZRange ( const DRange< 1 > &  range)

restricts the range of MZ values for peaks to load

Referenced by TOPPFLASHDeconv::main_().

◆ setNumpressConfigurationFloatDataArray()

void setNumpressConfigurationFloatDataArray ( MSNumpressCoder::NumpressConfig  config)

Get numpress configuration options for float data arrays.

◆ setNumpressConfigurationIntensity()

void setNumpressConfigurationIntensity ( MSNumpressCoder::NumpressConfig  config)

Get numpress configuration options for intensity dimension.

Referenced by TOPPOpenSwathBase::prepareChromOutput().

◆ setNumpressConfigurationMassTime()

void setNumpressConfigurationMassTime ( MSNumpressCoder::NumpressConfig  config)

Get numpress configuration options for m/z or rt dimension.

Referenced by TOPPOpenSwathBase::prepareChromOutput().

◆ setPrecursorMZSelectedIon()

void setPrecursorMZSelectedIon ( bool  choice)

[mzML only!] Set whether to use the "selected ion m/z" value as the precursor m/z value (alternative: use the "isolation window target m/z" value)

◆ setRTRange()

void setRTRange ( const DRange< 1 > &  range)

restricts the range of RT values for peaks to load

Referenced by TOPPFLASHDeconv::main_().

◆ setSkipXMLChecks()

void setSkipXMLChecks ( bool  only)

sets whether to skip some XML checks and be fast instead

◆ setSortChromatogramsByRT()

void setSortChromatogramsByRT ( bool  sort)

sets whether or not to sort peaks in chromatograms

◆ setSortSpectraByMZ()

void setSortSpectraByMZ ( bool  sort)

◆ setWriteIndex()

void setWriteIndex ( bool  write_index)

Whether to write an index at the end of the file (e.g. indexedmzML file format)

Referenced by TOPPOpenSwathBase::prepareChromOutput().

◆ setWriteSupplementalData()

void setWriteSupplementalData ( bool  write)

sets whether or not to write supplemental peak data in MzData files

Member Data Documentation

◆ always_append_data_

bool always_append_data_
private

◆ fill_data_

bool fill_data_
private

◆ force_maxquant_compatibility_

bool force_maxquant_compatibility_
private

for mzXML-writing only: set a fixed vendor (Thermo Scientific), mass analyzer (FTMS)

◆ force_tpp_compatibility_

bool force_tpp_compatibility_
private

for mzML-writing only: work around some bugs in TPP file parsers

◆ has_intensity_range_

bool has_intensity_range_
private

◆ has_mz_range_

bool has_mz_range_
private

◆ has_rt_range_

bool has_rt_range_
private

◆ int_32_bit_

bool int_32_bit_
private

◆ intensity_range_

DRange<1> intensity_range_
private

◆ maximal_data_pool_size_

Size maximal_data_pool_size_
private

◆ metadata_only_

bool metadata_only_
private

◆ ms_levels_

std::vector<Int> ms_levels_
private

◆ mz_32_bit_

bool mz_32_bit_
private

◆ mz_range_

DRange<1> mz_range_
private

◆ np_config_fda_

MSNumpressCoder::NumpressConfig np_config_fda_
private

◆ np_config_int_

MSNumpressCoder::NumpressConfig np_config_int_
private

◆ np_config_mz_

MSNumpressCoder::NumpressConfig np_config_mz_
private

◆ precursor_mz_selected_ion_

bool precursor_mz_selected_ion_
private

◆ rt_range_

DRange<1> rt_range_
private

◆ skip_xml_checks_

bool skip_xml_checks_
private

◆ sort_chromatograms_by_rt_

bool sort_chromatograms_by_rt_
private

◆ sort_spectra_by_mz_

bool sort_spectra_by_mz_
private

◆ write_index_

bool write_index_
private

◆ write_supplemental_data_

bool write_supplemental_data_
private

◆ zlib_compression_

bool zlib_compression_
private