XML handler for MzMLFile. More...
#include <OpenMS/FORMAT/HANDLERS/MzMLHandler.h>
Classes | |
| struct | BinaryData |
| Spectrum representation. More... | |
Public Member Functions | |
| virtual void | endElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname) |
| Parsing method for closing tags. | |
| virtual void | startElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname, const xercesc::Attributes &attributes) |
| Parsing method for opening tags. | |
| virtual void | characters (const XMLCh *const chars, const XMLSize_t length) |
| Parsing method for character data. | |
| virtual void | writeTo (std::ostream &os) |
| Writes the contents to a stream. | |
| void | setOptions (const PeakFileOptions &opt) |
Constructors and destructor | |
| MzMLHandler (MapType &exp, const String &filename, const String &version, ProgressLogger &logger) | |
| Constructor for a read-only handler. | |
| MzMLHandler (const MapType &exp, const String &filename, const String &version, const ProgressLogger &logger) | |
| Constructor for a write-only handler. | |
| virtual | ~MzMLHandler () |
| Destructor. | |
Protected Types | |
| typedef MapType::PeakType | PeakType |
| Peak type. | |
| typedef MapType::ChromatogramPeakType | ChromatogramPeakType |
| Chromatogram peak type. | |
| typedef MSSpectrum< PeakType > | SpectrumType |
| Spectrum type. | |
| typedef MSChromatogram < ChromatogramPeakType > | ChromatogramType |
| Spectrum type. | |
Protected Member Functions | |
| void | fillData_ () |
| Fills the current spectrum with peaks and meta data. | |
| void | fillChromatogramData_ () |
| Fills the current chromatogram with data points and meta data. | |
| void | handleCVParam_ (const String &parent_parent_tag, const String &parent_tag, const String &accession, const String &name, const String &value, const String &unit_accession="") |
| Handles CV terms. | |
| void | handleUserParam_ (const String &parent_parent_tag, const String &parent_tag, const String &name, const String &type, const String &value) |
| Handles user terms. | |
| void | writeUserParam_ (std::ostream &os, const MetaInfoInterface &meta, UInt indent, String path, Internal::MzMLValidator &validator) const |
| Writes user terms. | |
| ControlledVocabulary::CVTerm | getChildWithName_ (const String &parent_accession, const String &name) const |
Looks up a child CV term of parent_accession with the name name. If no such term is found, an empty term is returned. | |
| void | writeSoftware_ (std::ostream &os, const String &id, const Software &software, Internal::MzMLValidator &validator) |
| Helper method that writes a software. | |
| void | writeSourceFile_ (std::ostream &os, const String &id, const SourceFile &software, Internal::MzMLValidator &validator) |
| Helper method that writes a source file. | |
| void | writeDataProcessing_ (std::ostream &os, const String &id, const std::vector< DataProcessing > &dps, Internal::MzMLValidator &validator) |
| Helper method that writes a data processing list. | |
| void | writePrecursor_ (std::ostream &os, const Precursor &precursor, Internal::MzMLValidator &validator) |
| Helper method that write precursor information from spectra and chromatograms. | |
| void | writeProduct_ (std::ostream &os, const Product &product, Internal::MzMLValidator &validator) |
| Helper method that write precursor information from spectra and chromatograms. | |
| String | writeCV_ (const ControlledVocabulary::CVTerm &c, const DataValue &metaValue) const |
| Helper method to write an CV based on a meta value. | |
| bool | validateCV_ (const ControlledVocabulary::CVTerm &c, const String &path, const Internal::MzMLValidator &validator) const |
| Helper method to validate if the given CV is allowed in the current location (path). | |
Protected Attributes | |
| MapType * | exp_ |
| map pointer for reading | |
| const MapType * | cexp_ |
| map pointer for writing | |
| PeakFileOptions | options_ |
| Options that can be set for loading/storing. | |
| Base64 | decoder_ |
| Decoder/Encoder for Base64-data in MzML. | |
| const ProgressLogger & | logger_ |
| Progress logger. | |
| bool | skip_spectrum_ |
| Flag that indicates whether this spectrum should be skipped (due to options). | |
| ControlledVocabulary | cv_ |
| Controlled vocabulary (psi-ms from OpenMS/share/OpenMS/CV/psi-ms.obo). | |
| CVMappings | mapping_ |
| UInt | selected_ion_count_ |
| Count of selected ions. | |
temporary data structures to hold parsed data | |
| SpectrumType | spec_ |
| The current spectrum. | |
| ChromatogramType | chromatogram_ |
| The current chromatogram. | |
| std::vector< BinaryData > | data_ |
| The spectrum data (or chromatogram data). | |
| Size | default_array_length_ |
| The default number of peaks in the current spectrum. | |
| bool | in_spectrum_list_ |
| Flag that indicates that we're inside a spectrum (in contrast to a chromatogram). | |
| String | current_id_ |
| Id of the current list. Used for referencing param group, source file, sample, software, ... | |
| Map< String, std::vector < SemanticValidator::CVTerm > > | ref_param_ |
| The referencing param groups: id => array (accession, value). | |
| Map< String, SourceFile > | source_files_ |
| The source files: id => SourceFile. | |
| Map< String, Sample > | samples_ |
| The sample list: id => Sample. | |
| Map< String, Software > | software_ |
| The software list: id => Software. | |
| Map< String, Instrument > | instruments_ |
| The data processing list: id => Instrument. | |
| Map< String, std::vector < DataProcessing > > | processing_ |
| The data processing list: id => Instrument. | |
| String | default_processing_ |
| id of the default data processing (used when no processing is defined) | |
XML handler for MzMLFile.
MapType has to be an MSExperiment or have the same interface.
typedef MapType::ChromatogramPeakType ChromatogramPeakType [protected] |
Chromatogram peak type.
typedef MSChromatogram<ChromatogramPeakType> ChromatogramType [protected] |
Spectrum type.
typedef MapType::PeakType PeakType [protected] |
Peak type.
typedef MSSpectrum<PeakType> SpectrumType [protected] |
Spectrum type.
| MzMLHandler | ( | MapType & | exp, | |
| const String & | filename, | |||
| const String & | version, | |||
| ProgressLogger & | logger | |||
| ) | [inline] |
Constructor for a read-only handler.
References MzMLHandler< MapType >::cv_, File::find(), ControlledVocabulary::loadFromOBO(), and MzMLHandler< MapType >::mapping_.
| MzMLHandler | ( | const MapType & | exp, | |
| const String & | filename, | |||
| const String & | version, | |||
| const ProgressLogger & | logger | |||
| ) | [inline] |
Constructor for a write-only handler.
References MzMLHandler< MapType >::cv_, File::find(), ControlledVocabulary::loadFromOBO(), and MzMLHandler< MapType >::mapping_.
| virtual ~MzMLHandler | ( | ) | [inline, virtual] |
Destructor.
| void characters | ( | const XMLCh *const | chars, | |
| const XMLSize_t | length | |||
| ) | [virtual] |
Parsing method for character data.
Reimplemented from XMLHandler.
References StringManager::convert(), MzMLHandler< MapType >::data_, XMLHandler::LOAD, XMLHandler::open_tags_, MzMLHandler< MapType >::skip_spectrum_, XMLHandler::sm_, String::trim(), and XMLHandler::warning().
| void endElement | ( | const XMLCh * | uri, | |
| const XMLCh * | localname, | |||
| const XMLCh *const | qname | |||
| ) | [virtual] |
Parsing method for closing tags.
Reimplemented from XMLHandler.
References MzMLHandler< MapType >::chromatogram_, StringManager::clear(), MzMLHandler< MapType >::current_id_, MzMLHandler< MapType >::data_, MzMLHandler< MapType >::default_array_length_, ProgressLogger::endProgress(), XMLHandler::equal_(), MzMLHandler< MapType >::exp_, MzMLHandler< MapType >::fillChromatogramData_(), MzMLHandler< MapType >::fillData_(), MzMLHandler< MapType >::in_spectrum_list_, MzMLHandler< MapType >::instruments_, MzMLHandler< MapType >::logger_, XMLHandler::open_tags_, MzMLHandler< MapType >::processing_, MzMLHandler< MapType >::ref_param_, MzMLHandler< MapType >::samples_, ProgressLogger::setProgress(), MzMLHandler< MapType >::skip_spectrum_, XMLHandler::sm_, MzMLHandler< MapType >::software_, MzMLHandler< MapType >::source_files_, and MzMLHandler< MapType >::spec_.
| void fillChromatogramData_ | ( | ) | [protected] |
Fills the current chromatogram with data points and meta data.
References Base64::BYTEORDER_LITTLEENDIAN, MzMLHandler< MapType >::chromatogram_, MzMLHandler< MapType >::data_, Base64::decode(), Base64::decodeIntegers(), MzMLHandler< MapType >::decoder_, Base64::decodeStrings(), MzMLHandler< MapType >::default_array_length_, MzMLHandler< MapType >::BinaryData::DT_FLOAT, MzMLHandler< MapType >::BinaryData::DT_INT, MzMLHandler< MapType >::BinaryData::DT_STRING, DRange< D >::encloses(), MSChromatogram< PeakT >::getFloatDataArrays(), MSChromatogram< PeakT >::getIntegerDataArrays(), PeakFileOptions::getIntensityRange(), ChromatogramSettings::getNativeID(), PeakFileOptions::getRTRange(), MSChromatogram< PeakT >::getStringDataArrays(), PeakFileOptions::hasIntensityRange(), PeakFileOptions::hasRTRange(), OpenMS::Constants::k, XMLHandler::LOAD, MzMLHandler< MapType >::options_, MzMLHandler< MapType >::BinaryData::PRE_32, MzMLHandler< MapType >::BinaryData::PRE_64, MetaInfoInterface::setMetaValue(), and XMLHandler::warning().
Referenced by MzMLHandler< MapType >::endElement().
| void fillData_ | ( | ) | [protected] |
Fills the current spectrum with peaks and meta data.
References Base64::BYTEORDER_LITTLEENDIAN, MzMLHandler< MapType >::data_, Base64::decode(), Base64::decodeIntegers(), MzMLHandler< MapType >::decoder_, Base64::decodeStrings(), MzMLHandler< MapType >::default_array_length_, MzMLHandler< MapType >::BinaryData::DT_FLOAT, MzMLHandler< MapType >::BinaryData::DT_INT, MzMLHandler< MapType >::BinaryData::DT_STRING, DRange< D >::encloses(), XMLHandler::fatalError(), MSSpectrum< PeakT >::getFloatDataArrays(), MSSpectrum< PeakT >::getIntegerDataArrays(), PeakFileOptions::getIntensityRange(), PeakFileOptions::getMZRange(), SpectrumSettings::getNativeID(), MSSpectrum< PeakT >::getStringDataArrays(), PeakFileOptions::hasIntensityRange(), PeakFileOptions::hasMZRange(), OpenMS::Constants::k, XMLHandler::LOAD, MzMLHandler< MapType >::options_, MzMLHandler< MapType >::BinaryData::PRE_32, MzMLHandler< MapType >::BinaryData::PRE_64, MetaInfoInterface::setMetaValue(), MzMLHandler< MapType >::spec_, and XMLHandler::warning().
Referenced by MzMLHandler< MapType >::endElement().
| ControlledVocabulary::CVTerm getChildWithName_ | ( | const String & | parent_accession, | |
| const String & | name | |||
| ) | const [protected] |
Looks up a child CV term of parent_accession with the name name. If no such term is found, an empty term is returned.
References MzMLHandler< MapType >::cv_, ControlledVocabulary::getAllChildTerms(), and ControlledVocabulary::getTerm().
Referenced by MzMLHandler< MapType >::writeSoftware_(), MzMLHandler< MapType >::writeSourceFile_(), and MzMLHandler< MapType >::writeTo().
| void handleCVParam_ | ( | const String & | parent_parent_tag, | |
| const String & | parent_tag, | |||
| const String & | accession, | |||
| const String & | name, | |||
| const String & | value, | |||
| const String & | unit_accession = "" | |||
| ) | [protected] |
Handles CV terms.
References InstrumentSettings::ABSORBTION, ChromatogramSettings::ABSORPTION_CHROMATOGRAM, SemanticValidator::CVTerm::accession, IonSource::AD, IonDetector::ADC, IonSource::AI, DataProcessing::ALIGNMENT, MassAnalyzer::ANALYZERNULL, IonSource::AP_MALDI, IonSource::APCI, IonSource::API, IonSource::APPI, IonDetector::ARRAYDETECTOR, XMLHandler::asDateTime_(), IonSource::ASI, IonSource::AUI, MassAnalyzer::AXIALEJECTIONLINEARIONTRAP, DataProcessing::BASELINE_REDUCTION, ChromatogramSettings::BASEPEAK_CHROMATOGRAM, IonSource::BATCH, Precursor::BIRD, DataProcessing::CALIBRATION, IonSource::CEI, IonDetector::CHANNELTRON, DataProcessing::CHARGE_CALCULATION, DataProcessing::CHARGE_DECONVOLUTION, IonSource::CHEMI, MzMLHandler< MapType >::chromatogram_, IonSource::CHROMATOGRAPHY, IonSource::CI, Precursor::CID, InstrumentSettings::CNG, InstrumentSettings::CNL, Instrument::COLLISION_QUADRUPOLE, PeakFileOptions::containsMSLevel(), IonSource::CONTINUOUSFLOWFASTATOMBOMBARDMENT, DataProcessing::CONVERSION_DTA, DataProcessing::CONVERSION_MZDATA, DataProcessing::CONVERSION_MZML, DataProcessing::CONVERSION_MZXML, IonDetector::CONVERSIONDYNODE, IonDetector::CONVERSIONDYNODEELECTRONMULTIPLIER, IonDetector::CONVERSIONDYNODEPHOTOMULTIPLIER, InstrumentSettings::CRM, MzMLHandler< MapType >::current_id_, MzMLHandler< MapType >::cv_, MassAnalyzer::CYCLOTRON, IonDetector::DALYDETECTOR, MzMLHandler< MapType >::data_, DataProcessing::DATA_PROCESSING, DataProcessing::DEISOTOPING, Instrument::DELAYED_EXTRACTION, IonSource::DI, IonSource::DIRECT, IonSource::DISSI, IonDetector::DYNODE, Precursor::ECD, IonSource::EI, Instrument::EINZEL_LENS, ChromatogramSettings::ELECTROMAGNETIC_RADIATION_CHROMATOGRAM, IonDetector::ELECTRONMULTIPLIER, IonDetector::ELECTRONMULTIPLIERTUBE, IonSource::ELECTROSPRAYINLET, InstrumentSettings::EMC, InstrumentSettings::EMISSION, ChromatogramSettings::EMISSION_CHROMATOGRAM, InstrumentSettings::EMR, Sample::EMULSION, DRange< D >::encloses(), MassAnalyzer::ESA, IonSource::ESI, Precursor::ETD, ControlledVocabulary::exists(), MzMLHandler< MapType >::exp_, IonSource::FA, IonSource::FAB, IonDetector::FARADAYCUP, IonSource::FD, IonSource::FIB, IonSource::FII, DataProcessing::FILTERING, Instrument::FIRST_STABILITY_REGION, IonSource::FLOWINJECTIONANALYSIS, IonDetector::FOCALPLANEARRAY, IonDetector::FOCALPLANECOLLECTOR, DataProcessing::FORMAT_CONVERSION, MassAnalyzer::FOURIERTRANSFORM, Instrument::FRINGING_FIELD, Sample::GAS, IonSource::GD_MS, SpectrumSettings::getAcquisitionInfo(), Precursor::getActivationMethods(), SpectrumSettings::getInstrumentSettings(), MSSpectrum< PeakT >::getMSLevel(), Precursor::getPossibleChargeStates(), ChromatogramSettings::getPrecursor(), SpectrumSettings::getPrecursors(), ChromatogramSettings::getProduct(), SpectrumSettings::getProducts(), MSSpectrum< PeakT >::getRT(), PeakFileOptions::getRTRange(), InstrumentSettings::getScanWindows(), ControlledVocabulary::getTerm(), ControlledVocabulary::CVTerm::getXRefTypeName(), PeakFileOptions::hasMSLevels(), String::hasPrefix(), PeakFileOptions::hasRTRange(), Precursor::HCID, ControlledVocabulary::CVTerm::id, Precursor::IMD, MzMLHandler< MapType >::in_spectrum_list_, IonDetector::INDUCTIVEDETECTOR, IonSource::INDUCTIVELYCOUPLEDPLASMA, IonSource::INFUSION, MzMLHandler< MapType >::instruments_, IonSource::IONMETHODNULL, IonDetector::IONTOPHOTONDETECTOR, ControlledVocabulary::isChildOf(), MassAnalyzer::IT, IonSource::JETSEPARATOR, Instrument::KINETIC_ENERGY_ANALYZER, Precursor::LCID, IonSource::LD, Sample::LIQUID, MassAnalyzer::LIT, XMLHandler::LOAD, IonSource::LSI, Instrument::MAGNETIC_DEFLECTION, IonSource::MALDI, ChromatogramSettings::MASS_CHROMATOGRAM, InstrumentSettings::MASSSPECTRUM, SourceFile::MD5, IonSource::MEMBRANE, IonSource::MEMBRANESEPARATOR, IonSource::MESI, IonDetector::MICROCHANNELPLATEDETECTOR, IonSource::MOVINGBELT, IonSource::MOVINGWIRE, IonSource::MPI, InstrumentSettings::MS1SPECTRUM, InstrumentSettings::MSNSPECTRUM, IonDetector::MULTICOLLECTOR, SemanticValidator::CVTerm::name, ControlledVocabulary::CVTerm::name, IonSource::NANOSPRAY, IonSource::NEGATIVE, IonSource::NESI, IonSource::NICI, ControlledVocabulary::CVTerm::NONE, DataProcessing::NORMALIZATION, IonSource::NRMS, ControlledVocabulary::CVTerm::obsolete, MassAnalyzer::OFF, MassAnalyzer::ON, IonSource::OPENSPLIT, MzMLHandler< MapType >::options_, MassAnalyzer::ORBITRAP, IonSource::PARTICLEBEAM, MassAnalyzer::PAULIONTRAP, IonSource::PD, Precursor::PD, DataProcessing::PEAK_PICKING, SpectrumSettings::PEAKS, IonSource::PEI, Precursor::PHD, IonDetector::PHOTODIODEARRAYDETECTOR, IonDetector::PHOTOMULTIPLIER, IonSource::PI, IonDetector::POINTCOLLECTOR, IonSource::POSITIVE, IonDetector::POSTACCELERATIONDETECTOR, Precursor::PQD, InstrumentSettings::PRECURSOR, DataProcessing::PRECURSOR_RECALCULATION, MzMLHandler< MapType >::processing_, Precursor::PSD, IonDetector::PULSECOUNTING, IonSource::PYMS, MassAnalyzer::QUADRUPOLE, MassAnalyzer::RADIALEJECTIONLINEARIONTRAP, SpectrumSettings::RAWDATA, MzMLHandler< MapType >::ref_param_, Instrument::REFLECTRON, IonSource::REMPI, IonSource::RESERVOIR, IonSource::SALDI, MzMLHandler< MapType >::samples_, MassAnalyzer::SECTOR, IonSource::SELDI, MzMLHandler< MapType >::selected_ion_count_, ChromatogramSettings::SELECTED_ION_CURRENT_CHROMATOGRAM, Instrument::SELECTED_ION_FLOW_TUBE, ChromatogramSettings::SELECTED_ION_MONITORING_CHROMATOGRAM, ChromatogramSettings::SELECTED_REACTION_MONITORING_CHROMATOGRAM, IonSource::SEND, IonSource::SEPTUM, DateTime::set(), Precursor::setActivationEnergy(), Precursor::setCharge(), ChromatogramSettings::setChromatogramType(), Peak1D::setIntensity(), Product::setIsolationWindowLowerOffset(), Precursor::setIsolationWindowLowerOffset(), Product::setIsolationWindowUpperOffset(), Precursor::setIsolationWindowUpperOffset(), MetaInfoInterface::setMetaValue(), AcquisitionInfo::setMethodOfCombination(), MSSpectrum< PeakT >::setMSLevel(), Product::setMZ(), Peak1D::setMZ(), MSChromatogram< PeakT >::setName(), InstrumentSettings::setPolarity(), MSSpectrum< PeakT >::setRT(), InstrumentSettings::setScanMode(), SpectrumSettings::setType(), DataValue::setUnit(), InstrumentSettings::setZoomScan(), SourceFile::SHA1, IonSource::SI, Precursor::SID, IonSource::SILI, InstrumentSettings::SIM, MzMLHandler< MapType >::skip_spectrum_, DataProcessing::SMOOTHING, MzMLHandler< MapType >::software_, IonSource::SOI, Sample::SOLID, Sample::SOLUTION, Precursor::SORI, MzMLHandler< MapType >::source_files_, MzMLHandler< MapType >::spec_, IonSource::SPI, InstrumentSettings::SRM, Instrument::STATIC_FIELD, IonSource::SUI, Sample::SUSPENSION, MassAnalyzer::SWIFT, IonDetector::TDC, InstrumentSettings::TDF, IonSource::THERMOSPRAYINLET, IonSource::TI, Instrument::TIME_LAG_FOCUSING, String::toDouble(), MassAnalyzer::TOF, String::toInt(), ChromatogramSettings::TOTAL_ION_CURRENT_CHROMATOGRAM, IonDetector::TRANSIENTRECORDER, String::trim(), IonDetector::TYPENULL, SemanticValidator::CVTerm::unit_accession, SpectrumSettings::UNKNOWN, SemanticValidator::CVTerm::value, IonSource::VI, XMLHandler::warning(), ControlledVocabulary::CVTerm::xref_type, ControlledVocabulary::CVTerm::XSD_DATE, ControlledVocabulary::CVTerm::XSD_DECIMAL, ControlledVocabulary::CVTerm::XSD_INTEGER, ControlledVocabulary::CVTerm::XSD_NEGATIVE_INTEGER, ControlledVocabulary::CVTerm::XSD_NON_NEGATIVE_INTEGER, ControlledVocabulary::CVTerm::XSD_NON_POSITIVE_INTEGER, ControlledVocabulary::CVTerm::XSD_POSITIVE_INTEGER, and ControlledVocabulary::CVTerm::XSD_STRING.
Referenced by MzMLHandler< MapType >::startElement().
| void handleUserParam_ | ( | const String & | parent_parent_tag, | |
| const String & | parent_tag, | |||
| const String & | name, | |||
| const String & | type, | |||
| const String & | value | |||
| ) | [protected] |
Handles user terms.
References MzMLHandler< MapType >::chromatogram_, MzMLHandler< MapType >::current_id_, MzMLHandler< MapType >::data_, MzMLHandler< MapType >::exp_, SpectrumSettings::getAcquisitionInfo(), SpectrumSettings::getInstrumentSettings(), ChromatogramSettings::getPrecursor(), SpectrumSettings::getPrecursors(), ChromatogramSettings::getProduct(), SpectrumSettings::getProducts(), InstrumentSettings::getScanWindows(), MzMLHandler< MapType >::in_spectrum_list_, MzMLHandler< MapType >::instruments_, XMLHandler::LOAD, MzMLHandler< MapType >::processing_, MzMLHandler< MapType >::samples_, MzMLHandler< MapType >::selected_ion_count_, MetaInfoInterface::setMetaValue(), MzMLHandler< MapType >::software_, MzMLHandler< MapType >::source_files_, MzMLHandler< MapType >::spec_, String::toDouble(), String::toInt(), and XMLHandler::warning().
Referenced by MzMLHandler< MapType >::startElement().
| void setOptions | ( | const PeakFileOptions & | opt | ) | [inline] |
References MzMLHandler< MapType >::options_.
Referenced by MzMLFile::load(), and MzMLFile::store().
| void startElement | ( | const XMLCh * | uri, | |
| const XMLCh * | localname, | |||
| const XMLCh *const | qname, | |||
| const xercesc::Attributes & | attrs | |||
| ) | [virtual] |
Parsing method for opening tags.
Reimplemented from XMLHandler.
References XMLHandler::asDateTime_(), XMLHandler::attributeAsInt_(), XMLHandler::attributeAsString_(), MzMLHandler< MapType >::chromatogram_, StringManager::convert(), MzMLHandler< MapType >::current_id_, MzMLHandler< MapType >::data_, MzMLHandler< MapType >::default_array_length_, MzMLHandler< MapType >::default_processing_, MzMLHandler< MapType >::exp_, XMLHandler::fatalError(), SpectrumSettings::getAcquisitionInfo(), SpectrumSettings::getInstrumentSettings(), PeakFileOptions::getMetadataOnly(), ChromatogramSettings::getPrecursor(), SpectrumSettings::getPrecursors(), SpectrumSettings::getProducts(), InstrumentSettings::getScanWindows(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), MzMLHandler< MapType >::in_spectrum_list_, MzMLHandler< MapType >::instruments_, XMLHandler::LOAD, LOG_ERROR, MzMLHandler< MapType >::logger_, XMLHandler::open_tags_, XMLHandler::optionalAttributeAsInt_(), XMLHandler::optionalAttributeAsString_(), MzMLHandler< MapType >::options_, MzMLHandler< MapType >::processing_, MzMLHandler< MapType >::ref_param_, MzMLHandler< MapType >::samples_, MzMLHandler< MapType >::selected_ion_count_, ChromatogramSettings::setDataProcessing(), SpectrumSettings::setDataProcessing(), Acquisition::setIdentifier(), MetaInfoInterface::setMetaValue(), ChromatogramSettings::setNativeID(), SpectrumSettings::setNativeID(), ChromatogramSettings::setPrecursor(), ChromatogramSettings::setProduct(), DataProcessing::setSoftware(), ChromatogramSettings::setSourceFile(), SpectrumSettings::setSourceFile(), MzMLHandler< MapType >::skip_spectrum_, XMLHandler::sm_, MzMLHandler< MapType >::software_, MzMLHandler< MapType >::source_files_, MzMLHandler< MapType >::spec_, ProgressLogger::startProgress(), String::toDouble(), String::toQString(), XMLHandler::version_, and XMLHandler::warning().
| bool validateCV_ | ( | const ControlledVocabulary::CVTerm & | c, | |
| const String & | path, | |||
| const Internal::MzMLValidator & | validator | |||
| ) | const [protected] |
Helper method to validate if the given CV is allowed in the current location (path).
References SemanticValidator::CVTerm::accession, SemanticValidator::CVTerm::has_unit_accession, SemanticValidator::CVTerm::has_unit_name, ControlledVocabulary::CVTerm::id, ControlledVocabulary::CVTerm::name, and SemanticValidator::CVTerm::name.
Referenced by MzMLHandler< MapType >::writeUserParam_().
| String writeCV_ | ( | const ControlledVocabulary::CVTerm & | c, | |
| const DataValue & | metaValue | |||
| ) | const [protected] |
Helper method to write an CV based on a meta value.
References MzMLHandler< MapType >::cv_, ControlledVocabulary::getTerm(), DataValue::getUnit(), DataValue::hasUnit(), ControlledVocabulary::CVTerm::id, DataValue::isEmpty(), ControlledVocabulary::CVTerm::name, String::prefix(), and String::substitute().
Referenced by MzMLHandler< MapType >::writeUserParam_().
| void writeDataProcessing_ | ( | std::ostream & | os, | |
| const String & | id, | |||
| const std::vector< DataProcessing > & | dps, | |||
| Internal::MzMLValidator & | validator | |||
| ) | [protected] |
Helper method that writes a data processing list.
References DataProcessing::ALIGNMENT, DataProcessing::BASELINE_REDUCTION, DataProcessing::CALIBRATION, DataProcessing::CHARGE_CALCULATION, DataProcessing::CHARGE_DECONVOLUTION, DataProcessing::CONVERSION_DTA, DataProcessing::CONVERSION_MZDATA, DataProcessing::CONVERSION_MZML, DataProcessing::CONVERSION_MZXML, DataProcessing::DATA_PROCESSING, DataProcessing::DEISOTOPING, DataProcessing::FILTERING, DataProcessing::FORMAT_CONVERSION, DataProcessing::NORMALIZATION, DataProcessing::PEAK_PICKING, DataProcessing::PRECURSOR_RECALCULATION, DataProcessing::SMOOTHING, and MzMLHandler< MapType >::writeUserParam_().
Referenced by MzMLHandler< MapType >::writeTo().
| void writePrecursor_ | ( | std::ostream & | os, | |
| const Precursor & | precursor, | |||
| Internal::MzMLValidator & | validator | |||
| ) | [protected] |
Helper method that write precursor information from spectra and chromatograms.
References Precursor::BIRD, Precursor::CID, Precursor::ECD, Precursor::ETD, Precursor::getActivationEnergy(), Precursor::getActivationMethods(), Precursor::getCharge(), Peak1D::getIntensity(), Precursor::getIsolationWindowLowerOffset(), Precursor::getIsolationWindowUpperOffset(), Peak1D::getMZ(), Precursor::getPossibleChargeStates(), Precursor::HCID, Precursor::IMD, Precursor::LCID, Precursor::PD, Precursor::PHD, Precursor::PQD, Precursor::PSD, Precursor::SID, Precursor::SORI, and MzMLHandler< MapType >::writeUserParam_().
Referenced by MzMLHandler< MapType >::writeTo().
| void writeProduct_ | ( | std::ostream & | os, | |
| const Product & | product, | |||
| Internal::MzMLValidator & | validator | |||
| ) | [protected] |
Helper method that write precursor information from spectra and chromatograms.
References Product::getIsolationWindowLowerOffset(), Product::getIsolationWindowUpperOffset(), Product::getMZ(), and MzMLHandler< MapType >::writeUserParam_().
Referenced by MzMLHandler< MapType >::writeTo().
| void writeSoftware_ | ( | std::ostream & | os, | |
| const String & | id, | |||
| const Software & | software, | |||
| Internal::MzMLValidator & | validator | |||
| ) | [protected] |
Helper method that writes a software.
References MzMLHandler< MapType >::getChildWithName_(), Software::getName(), Software::getVersion(), ControlledVocabulary::CVTerm::id, ControlledVocabulary::CVTerm::name, and MzMLHandler< MapType >::writeUserParam_().
Referenced by MzMLHandler< MapType >::writeTo().
| void writeSourceFile_ | ( | std::ostream & | os, | |
| const String & | id, | |||
| const SourceFile & | software, | |||
| Internal::MzMLValidator & | validator | |||
| ) | [protected] |
Helper method that writes a source file.
References SourceFile::getChecksum(), SourceFile::getChecksumType(), MzMLHandler< MapType >::getChildWithName_(), SourceFile::getFileType(), SourceFile::getNameOfFile(), SourceFile::getNativeIDType(), SourceFile::getPathToFile(), ControlledVocabulary::CVTerm::id, ControlledVocabulary::CVTerm::name, and MzMLHandler< MapType >::writeUserParam_().
Referenced by MzMLHandler< MapType >::writeTo().
| void writeTo | ( | std::ostream & | ) | [virtual] |
Writes the contents to a stream.
Reimplemented from XMLHandler.
References InstrumentSettings::ABSORBTION, IonDetector::ADC, IonDetector::ARRAYDETECTOR, Base64::BYTEORDER_LITTLEENDIAN, OpenMS::Constants::c, MzMLHandler< MapType >::cexp_, IonDetector::CHANNELTRON, InstrumentSettings::CNG, InstrumentSettings::CNL, IonDetector::CONVERSIONDYNODE, IonDetector::CONVERSIONDYNODEELECTRONMULTIPLIER, IonDetector::CONVERSIONDYNODEPHOTOMULTIPLIER, InstrumentSettings::CRM, MzMLHandler< MapType >::cv_, IonDetector::DALYDETECTOR, MzMLHandler< MapType >::decoder_, IonDetector::DYNODE, IonDetector::ELECTRONMULTIPLIER, IonDetector::ELECTRONMULTIPLIERTUBE, InstrumentSettings::EMC, InstrumentSettings::EMISSION, InstrumentSettings::EMR, Base64::encode(), Base64::encodeIntegers(), Base64::encodeStrings(), ProgressLogger::endProgress(), IonDetector::FARADAYCUP, IonDetector::FOCALPLANEARRAY, IonDetector::FOCALPLANECOLLECTOR, MassAnalyzer::getAccuracy(), SpectrumSettings::getAcquisitionInfo(), ContactPerson::getAddress(), MzMLHandler< MapType >::getChildWithName_(), ChromatogramSettings::getChromatogramType(), Sample::getComment(), PeakFileOptions::getCompression(), Sample::getConcentration(), ContactPerson::getContactInfo(), Instrument::getCustomizations(), SpectrumSettings::getDataProcessing(), ContactPerson::getEmail(), MassAnalyzer::getFinalMSExponent(), ContactPerson::getFirstName(), MSChromatogram< PeakT >::getFloatDataArrays(), MSSpectrum< PeakT >::getFloatDataArrays(), Acquisition::getIdentifier(), IonSource::getInletType(), ContactPerson::getInstitution(), SpectrumSettings::getInstrumentSettings(), MSChromatogram< PeakT >::getIntegerDataArrays(), MSSpectrum< PeakT >::getIntegerDataArrays(), PeakFileOptions::getIntensity32Bit(), Instrument::getIonDetectors(), IonSource::getIonizationMethod(), Instrument::getIonOptics(), Instrument::getIonSources(), ContactPerson::getLastName(), MassAnalyzer::getMagneticFieldStrength(), Sample::getMass(), Instrument::getMassAnalyzers(), AcquisitionInfo::getMethodOfCombination(), MSSpectrum< PeakT >::getMSLevel(), PeakFileOptions::getMz32Bit(), Instrument::getName(), Sample::getName(), ChromatogramSettings::getNativeID(), SpectrumSettings::getNativeID(), Sample::getNumber(), MassAnalyzer::getOrder(), IonSource::getOrder(), InstrumentSettings::getPolarity(), ChromatogramSettings::getPrecursor(), SpectrumSettings::getPrecursors(), ChromatogramSettings::getProduct(), SpectrumSettings::getProducts(), MassAnalyzer::getReflectronState(), MSSpectrum< PeakT >::getRT(), InstrumentSettings::getScanMode(), InstrumentSettings::getScanWindows(), SpectrumSettings::getSourceFile(), Sample::getState(), MSChromatogram< PeakT >::getStringDataArrays(), MSSpectrum< PeakT >::getStringDataArrays(), MassAnalyzer::getTOFTotalPathLength(), SpectrumSettings::getType(), MassAnalyzer::getType(), ContactPerson::getURL(), Sample::getVolume(), InstrumentSettings::getZoomScan(), Map< Key, T >::has(), ControlledVocabulary::CVTerm::id, IonDetector::INDUCTIVEDETECTOR, IonDetector::IONTOPHOTONDETECTOR, MzMLHandler< MapType >::logger_, MzMLHandler< MapType >::mapping_, InstrumentSettings::MASSSPECTRUM, IonDetector::MICROCHANNELPLATEDETECTOR, InstrumentSettings::MS1SPECTRUM, InstrumentSettings::MSNSPECTRUM, IonDetector::MULTICOLLECTOR, ControlledVocabulary::CVTerm::name, MzMLHandler< MapType >::options_, IonDetector::PHOTODIODEARRAYDETECTOR, IonDetector::PHOTOMULTIPLIER, IonDetector::POINTCOLLECTOR, IonDetector::POSTACCELERATIONDETECTOR, InstrumentSettings::PRECURSOR, IonDetector::PULSECOUNTING, ProgressLogger::setProgress(), InstrumentSettings::SIM, InstrumentSettings::SRM, ProgressLogger::startProgress(), XMLHandler::STORE, IonDetector::TDC, InstrumentSettings::TDF, IonDetector::TRANSIENTRECORDER, IonDetector::TYPENULL, InstrumentSettings::UNKNOWN, XMLHandler::version_, XMLHandler::warning(), MzMLHandler< MapType >::writeDataProcessing_(), MzMLHandler< MapType >::writePrecursor_(), MzMLHandler< MapType >::writeProduct_(), MzMLHandler< MapType >::writeSoftware_(), MzMLHandler< MapType >::writeSourceFile_(), and MzMLHandler< MapType >::writeUserParam_().
| void writeUserParam_ | ( | std::ostream & | os, | |
| const MetaInfoInterface & | meta, | |||
| UInt | indent, | |||
| String | path, | |||
| Internal::MzMLValidator & | validator | |||
| ) | const [protected] |
Writes user terms.
References OpenMS::Constants::c, MzMLHandler< MapType >::cv_, DataValue::EMPTY, MetaInfoInterface::getKeys(), MetaInfoInterface::getMetaValue(), ControlledVocabulary::getTermByName(), ControlledVocabulary::hasTermWithName(), String::substitute(), MzMLHandler< MapType >::validateCV_(), DataValue::valueType(), and MzMLHandler< MapType >::writeCV_().
Referenced by MzMLHandler< MapType >::writeDataProcessing_(), MzMLHandler< MapType >::writePrecursor_(), MzMLHandler< MapType >::writeProduct_(), MzMLHandler< MapType >::writeSoftware_(), MzMLHandler< MapType >::writeSourceFile_(), and MzMLHandler< MapType >::writeTo().
const MapType* cexp_ [protected] |
map pointer for writing
Referenced by MzMLHandler< MapType >::writeTo().
ChromatogramType chromatogram_ [protected] |
The current chromatogram.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::fillChromatogramData_(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
String current_id_ [protected] |
Id of the current list. Used for referencing param group, source file, sample, software, ...
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
ControlledVocabulary cv_ [protected] |
Controlled vocabulary (psi-ms from OpenMS/share/OpenMS/CV/psi-ms.obo).
Referenced by MzMLHandler< MapType >::getChildWithName_(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::MzMLHandler(), MzMLHandler< MapType >::writeCV_(), MzMLHandler< MapType >::writeTo(), and MzMLHandler< MapType >::writeUserParam_().
std::vector<BinaryData> data_ [protected] |
The spectrum data (or chromatogram data).
Referenced by MzMLHandler< MapType >::characters(), MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::fillChromatogramData_(), MzMLHandler< MapType >::fillData_(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
Decoder/Encoder for Base64-data in MzML.
Referenced by MzMLHandler< MapType >::fillChromatogramData_(), MzMLHandler< MapType >::fillData_(), and MzMLHandler< MapType >::writeTo().
Size default_array_length_ [protected] |
The default number of peaks in the current spectrum.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::fillChromatogramData_(), MzMLHandler< MapType >::fillData_(), and MzMLHandler< MapType >::startElement().
String default_processing_ [protected] |
id of the default data processing (used when no processing is defined)
Referenced by MzMLHandler< MapType >::startElement().
MapType* exp_ [protected] |
map pointer for reading
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
bool in_spectrum_list_ [protected] |
Flag that indicates that we're inside a spectrum (in contrast to a chromatogram).
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
Map<String, Instrument> instruments_ [protected] |
The data processing list: id => Instrument.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
const ProgressLogger& logger_ [protected] |
Progress logger.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::startElement(), and MzMLHandler< MapType >::writeTo().
CVMappings mapping_ [protected] |
Referenced by MzMLHandler< MapType >::MzMLHandler(), and MzMLHandler< MapType >::writeTo().
PeakFileOptions options_ [protected] |
Options that can be set for loading/storing.
Referenced by MzMLHandler< MapType >::fillChromatogramData_(), MzMLHandler< MapType >::fillData_(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::setOptions(), MzMLHandler< MapType >::startElement(), and MzMLHandler< MapType >::writeTo().
Map<String, std::vector<DataProcessing> > processing_ [protected] |
The data processing list: id => Instrument.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
Map<String, std::vector<SemanticValidator::CVTerm> > ref_param_ [protected] |
The referencing param groups: id => array (accession, value).
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), and MzMLHandler< MapType >::startElement().
The sample list: id => Sample.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
UInt selected_ion_count_ [protected] |
Count of selected ions.
Referenced by MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
bool skip_spectrum_ [protected] |
Flag that indicates whether this spectrum should be skipped (due to options).
Referenced by MzMLHandler< MapType >::characters(), MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), and MzMLHandler< MapType >::startElement().
The software list: id => Software.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
Map<String, SourceFile> source_files_ [protected] |
The source files: id => SourceFile.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
SpectrumType spec_ [protected] |
The current spectrum.
Referenced by MzMLHandler< MapType >::endElement(), MzMLHandler< MapType >::fillData_(), MzMLHandler< MapType >::handleCVParam_(), MzMLHandler< MapType >::handleUserParam_(), and MzMLHandler< MapType >::startElement().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:43:00 using doxygen 1.7.1 |