OpenMS
|
Representation of a mass spectrometry experiment on disk. More...
#include <OpenMS/KERNEL/OnDiscMSExperiment.h>
Public Member Functions | |
OnDiscMSExperiment ()=default | |
Constructor. More... | |
bool | openFile (const String &filename, bool skipMetaData=false) |
Open a specific file on disk. More... | |
OnDiscMSExperiment (const OnDiscMSExperiment &source) | |
Copy constructor. More... | |
bool | operator== (const OnDiscMSExperiment &rhs) const |
Equality operator. More... | |
bool | operator!= (const OnDiscMSExperiment &rhs) const |
Inequality operator. More... | |
bool | isSortedByRT () const |
Checks if all spectra are sorted with respect to ascending RT. More... | |
Size | size () const |
alias for getNrSpectra More... | |
bool | empty () const |
returns whether spectra are empty More... | |
Size | getNrSpectra () const |
get the total number of spectra available More... | |
Size | getNrChromatograms () const |
get the total number of chromatograms available More... | |
boost::shared_ptr< const ExperimentalSettings > | getExperimentalSettings () const |
returns the meta information of this experiment (const access) More... | |
boost::shared_ptr< PeakMap > | getMetaData () const |
MSSpectrum | operator[] (Size n) |
alias for getSpectrum More... | |
MSSpectrum | getSpectrum (Size id) |
returns a single spectrum More... | |
OpenMS::Interfaces::SpectrumPtr | getSpectrumById (Size id) |
returns a single spectrum More... | |
MSChromatogram | getChromatogram (Size id) |
returns a single chromatogram More... | |
MSChromatogram | getChromatogramByNativeId (const std::string &id) |
returns a single chromatogram More... | |
MSSpectrum | getSpectrumByNativeId (const std::string &id) |
returns a single spectrum More... | |
OpenMS::Interfaces::ChromatogramPtr | getChromatogramById (Size id) |
returns a single chromatogram More... | |
void | setSkipXMLChecks (bool skip) |
sets whether to skip some XML checks and be fast instead More... | |
Protected Attributes | |
String | filename_ |
The filename of the underlying data file. More... | |
Internal::IndexedMzMLHandler | indexed_mzml_file_ |
The index of the underlying data file. More... | |
boost::shared_ptr< PeakMap > | meta_ms_experiment_ |
The meta-data. More... | |
std::unordered_map< std::string, Size > | chromatograms_native_ids_ |
Mapping of chromatogram native ids to offsets. More... | |
std::unordered_map< std::string, Size > | spectra_native_ids_ |
Mapping of spectra native ids to offsets. More... | |
Private Types | |
typedef ChromatogramPeak | ChromatogramPeakT |
typedef Peak1D | PeakT |
Private Member Functions | |
OnDiscMSExperiment & | operator= (const OnDiscMSExperiment &) |
Private Assignment operator -> we cannot copy file streams in IndexedMzMLHandler. More... | |
void | loadMetaData_ (const String &filename) |
MSChromatogram | getMetaChromatogramById_ (const std::string &id) |
MSSpectrum | getMetaSpectrumById_ (const std::string &id) |
Representation of a mass spectrometry experiment on disk.
|
private |
|
default |
Constructor.
This initializes the object, use openFile to open a file.
|
inline |
Copy constructor.
|
inline |
returns whether spectra are empty
|
inline |
returns a single chromatogram
id | The index of the chromatogram |
OpenMS::Interfaces::ChromatogramPtr getChromatogramById | ( | Size | id | ) |
returns a single chromatogram
MSChromatogram getChromatogramByNativeId | ( | const std::string & | id | ) |
returns a single chromatogram
id | The native identifier of the chromatogram |
|
inline |
returns the meta information of this experiment (const access)
|
private |
|
inline |
|
private |
|
inline |
get the total number of chromatograms available
|
inline |
get the total number of spectra available
|
inline |
returns a single spectrum
id | The index of the spectrum |
|
inline |
returns a single spectrum
MSSpectrum getSpectrumByNativeId | ( | const std::string & | id | ) |
returns a single spectrum
id | The native identifier of the spectrum |
|
inline |
Checks if all spectra are sorted with respect to ascending RT.
Note that we cannot check whether all spectra are sorted (except if we were to load them all and check).
|
private |
bool openFile | ( | const String & | filename, |
bool | skipMetaData = false |
||
) |
Open a specific file on disk.
This tries to read the indexed mzML by parsing the index and then reading the meta information into memory.
|
inline |
Inequality operator.
References OpenMS::Internal::operator==().
|
private |
Private Assignment operator -> we cannot copy file streams in IndexedMzMLHandler.
|
inline |
Equality operator.
This only checks whether the underlying file is the same and the parsed meta-information is the same. Note that the file reader (e.g. the std::ifstream of the file) might be in a different state.
References OnDiscMSExperiment::filename_, and OnDiscMSExperiment::meta_ms_experiment_.
|
inline |
alias for getSpectrum
void setSkipXMLChecks | ( | bool | skip | ) |
sets whether to skip some XML checks and be fast instead
|
inline |
alias for getNrSpectra
|
protected |
Mapping of chromatogram native ids to offsets.
|
protected |
The filename of the underlying data file.
Referenced by OnDiscMSExperiment::operator==().
|
protected |
The index of the underlying data file.
|
protected |
The meta-data.
Referenced by OnDiscMSExperiment::operator==().
|
protected |
Mapping of spectra native ids to offsets.