An class that uses on-disk caching to read and write spectra and chromatograms. More...
#include <OpenMS/ANALYSIS/OPENSWATH/CachedmzML.h>
Public Types | |
| typedef MSExperiment< Peak1D > | MapType |
| typedef MSSpectrum< Peak1D > | SpectrumType |
| typedef MSChromatogram < ChromatogramPeak > | ChromatogramType |
| typedef double | DatumSingleton |
| typedef std::vector < DatumSingleton > | Datavector |
Public Member Functions | |
| void | createMemdumpIndex (String filename) |
| Create an index on the location of all the spectra and chromatograms. | |
| void | writeMetadata (MapType exp, String out_meta) |
| Write only the meta data of an MSExperiment. | |
Constructors and Destructor | |
| CachedmzML () | |
| Default constructor. | |
| ~CachedmzML () | |
| Default destructor. | |
| CachedmzML & | operator= (const CachedmzML &rhs) |
| Assignment operator. | |
Read / Write an MSExperiment | |
| void | writeMemdump (MapType &exp, String out) |
| Write complete spectra as a dump to the disk. | |
| void | readMemdump (MapType &exp_reading, String filename) const |
| Read all spectra from a dump from the disk. | |
Read a single MSSpectrum | |
| void | readSingleSpectrum (MSSpectrum< Peak1D > &spectrum, const String &filename, const Size &idx) const |
| Read a single spectrum from the given filename. | |
| void | readSingleSpectrum (MSSpectrum< Peak1D > &spectrum, std::ifstream &ifs, const Size &idx) const |
Access to the binary indices | |
| const std::vector< Size > & | getSpectraIndex () const |
| const std::vector< Size > & | getChromatogramIndex () const |
Static Public Member Functions | |
| static void | readSpectrumFast (OpenSwath::BinaryDataArrayPtr data1, OpenSwath::BinaryDataArrayPtr data2, std::ifstream &ifs, int ms_level, double rt) |
| fast access without copying | |
| static void | readChromatogramFast (OpenSwath::BinaryDataArrayPtr data1, OpenSwath::BinaryDataArrayPtr data2, std::ifstream &ifs) |
| fast access without copying | |
Private Member Functions | |
| void | readSpectrum_ (Datavector &data1, Datavector &data2, std::ifstream &ifs, int &ms_level, double &rt) const |
| void | readChromatogram_ (Datavector &data1, Datavector &data2, std::ifstream &ifs) const |
| void | readSpectrum_ (SpectrumType &spectrum, std::ifstream &ifs) const |
| void | readChromatogram_ (ChromatogramType &chromatogram, std::ifstream &ifs) const |
| void | writeSpectrum_ (SpectrumType &spectrum, std::ofstream &ofs) |
| void | writeChromatogram_ (const ChromatogramType &chromatogram, std::ofstream &ofs) |
Private Attributes | |
| int | int_field_ |
| double | dbl_field_ |
| std::vector< Size > | spectra_index_ |
| std::vector< Size > | chrom_index_ |
An class that uses on-disk caching to read and write spectra and chromatograms.
This class implements the OpenSWATH Spectrum Access interface (ISpectrumAccess) using the CachedmzML class which is able to read and write a cached mzML file.
| typedef std::vector<DatumSingleton> Datavector |
| typedef double DatumSingleton |
| typedef MSExperiment<Peak1D> MapType |
| typedef MSSpectrum<Peak1D> SpectrumType |
| CachedmzML | ( | ) | [inline] |
Default constructor.
| ~CachedmzML | ( | ) | [inline] |
Default destructor.
| void createMemdumpIndex | ( | String | filename | ) | [inline] |
Create an index on the location of all the spectra and chromatograms.
References MAGIC_NUMBER.
| const std::vector<Size>& getChromatogramIndex | ( | ) | const [inline] |
| const std::vector<Size>& getSpectraIndex | ( | ) | const [inline] |
| CachedmzML& operator= | ( | const CachedmzML & | rhs | ) | [inline] |
Assignment operator.
References CachedmzML::chrom_index_, and CachedmzML::spectra_index_.
| void readChromatogram_ | ( | Datavector & | data1, | |
| Datavector & | data2, | |||
| std::ifstream & | ifs | |||
| ) | const [inline, private] |
| void readChromatogram_ | ( | ChromatogramType & | chromatogram, | |
| std::ifstream & | ifs | |||
| ) | const [inline, private] |
References ChromatogramPeak::setIntensity(), and ChromatogramPeak::setRT().
| static void readChromatogramFast | ( | OpenSwath::BinaryDataArrayPtr | data1, | |
| OpenSwath::BinaryDataArrayPtr | data2, | |||
| std::ifstream & | ifs | |||
| ) | [inline, static] |
fast access without copying
Read all spectra from a dump from the disk.
References MAGIC_NUMBER, and MSExperiment< PeakT, ChromatogramPeakT >::setChromatograms().
| void readSingleSpectrum | ( | MSSpectrum< Peak1D > & | spectrum, | |
| const String & | filename, | |||
| const Size & | idx | |||
| ) | const [inline] |
Read a single spectrum from the given filename.
| void readSingleSpectrum | ( | MSSpectrum< Peak1D > & | spectrum, | |
| std::ifstream & | ifs, | |||
| const Size & | idx | |||
| ) | const [inline] |
| void readSpectrum_ | ( | Datavector & | data1, | |
| Datavector & | data2, | |||
| std::ifstream & | ifs, | |||
| int & | ms_level, | |||
| double & | rt | |||
| ) | const [inline, private] |
| void readSpectrum_ | ( | SpectrumType & | spectrum, | |
| std::ifstream & | ifs | |||
| ) | const [inline, private] |
| static void readSpectrumFast | ( | OpenSwath::BinaryDataArrayPtr | data1, | |
| OpenSwath::BinaryDataArrayPtr | data2, | |||
| std::ifstream & | ifs, | |||
| int | ms_level, | |||
| double | rt | |||
| ) | [inline, static] |
fast access without copying
| void writeChromatogram_ | ( | const ChromatogramType & | chromatogram, | |
| std::ofstream & | ofs | |||
| ) | [inline, private] |
Write complete spectra as a dump to the disk.
References MSExperiment< PeakT, ChromatogramPeakT >::getChromatograms().
Write only the meta data of an MSExperiment.
References MSExperiment< PeakT, ChromatogramPeakT >::clear(), MSExperiment< PeakT, ChromatogramPeakT >::getChromatograms(), MSExperiment< PeakT, ChromatogramPeakT >::setChromatograms(), and MzMLFile::store().
| void writeSpectrum_ | ( | SpectrumType & | spectrum, | |
| std::ofstream & | ofs | |||
| ) | [inline, private] |
References MSSpectrum< PeakT >::getMSLevel(), and MSSpectrum< PeakT >::getRT().
std::vector<Size> chrom_index_ [private] |
Referenced by CachedmzML::operator=().
double dbl_field_ [private] |
int int_field_ [private] |
std::vector<Size> spectra_index_ [private] |
Referenced by CachedmzML::operator=().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1 |