File adapter for DTA files. More...
#include <OpenMS/FORMAT/DTAFile.h>
Public Member Functions | |
| DTAFile () | |
| Default constructor. More... | |
| virtual | ~DTAFile () |
| Destructor. More... | |
| template<typename SpectrumType > | |
| void | load (const String &filename, SpectrumType &spectrum) |
| Loads a DTA file to a spectrum. More... | |
| template<typename SpectrumType > | |
| void | store (const String &filename, const SpectrumType &spectrum) const |
| Stores a spectrum in a DTA file. More... | |
File adapter for DTA files.
The first line contains the singly protonated peptide mass (MH+) and the peptide charge state separated by a space. Subsequent lines contain space separated pairs of fragment ion m/z and intensity values.
From precusor mass and charge state the mass-charge-ratio is calculated and stored in the spectrum as precursor mass.
| DTAFile | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
inline |
Loads a DTA file to a spectrum.
The content of the file is stored in spectrum. spectrum has to be a MSSpectrum or have the same interface.
| Exception::FileNotFound | is thrown if the file could not be opened |
| Exception::ParseError | is thrown if an error occurs during parsing |
References File::basename(), String::has(), OpenMS::Constants::PROTON_MASS_U, Precursor::setCharge(), Peak1D::setMZ(), String::split(), and String::trim().
Referenced by FileHandler::loadExperiment().
|
inline |
Stores a spectrum in a DTA file.
The content of spectrum is stored in a file. spectrum has to be a MSSpectrum or have the same interface.
| Exception::UnableToCreateFile | is thrown if the file could not be created |
References Precursor::getCharge(), and Peak1D::getMZ().
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:30 using doxygen 1.8.5 |