62 #include <boost/shared_ptr.hpp> 88 class ControlledVocabulary;
134 void endElement(
const XMLCh*
const ,
const XMLCh*
const ,
const XMLCh*
const qname)
override;
137 void startElement(
const XMLCh*
const ,
const XMLCh*
const ,
const XMLCh*
const qname,
const xercesc::Attributes& attributes)
override;
140 void characters(
const XMLCh*
const chars,
const XMLSize_t length)
override;
143 void writeTo(std::ostream& os)
override;
162 spectrum_data_.reserve(options_.getMaxDataPoolSize());
163 chromatogram_data_.reserve(options_.getMaxDataPoolSize());
177 spectra_counts = scan_count;
178 chromatogram_counts = chromatogram_count;
184 consumer_ = consumer;
202 std::vector<std::vector< ConstDataProcessingPtr > >& dps);
206 template <
typename ContainerT>
207 void writeContainerData(std::ostream& os,
const PeakFileOptions& pf_options_,
const ContainerT& container,
String array_type);
215 void populateSpectraWithData();
223 void populateChromatogramsWithData();
225 void addSpectrumMetaData_(
const std::vector<MzMLHandlerHelper::BinaryData>& input_data,
238 void populateSpectraWithData_(std::vector<MzMLHandlerHelper::BinaryData>& input_data,
249 void populateChromatogramsWithData_(std::vector<MzMLHandlerHelper::BinaryData>& input_data,
253 template <
typename DataType>
254 void writeBinaryDataArray(std::ostream& os,
const PeakFileOptions& pf_options_, std::vector<DataType> data_to_encode,
bool is32bit,
String array_type);
256 void writeHeader_(std::ostream& os,
const MapType& exp, std::vector<std::vector< ConstDataProcessingPtr > >& dps,
Internal::MzMLValidator& validator);
371 void fillChromatogramData_();
374 void handleCVParam_(
const String& parent_parent_tag,
const String& parent_tag,
const String& accession,
const String& name,
const String& value,
const String& unit_accession =
"");
392 void writeDataProcessing_(std::ostream& os,
const String&
id,
const std::vector< ConstDataProcessingPtr >& dps,
Internal::MzMLValidator& validator);
PeakFileOptions options_
Options that can be set for loading/storing.
Definition: MzMLHandler.h:264
Representation of a CV term.
Definition: ControlledVocabulary.h:60
std::vector< SpectrumData > spectrum_data_
Vector of spectrum data stored for later parallel processing.
Definition: MzMLHandler.h:311
A more convenient string class.
Definition: String.h:57
Precursor meta information.
Definition: Precursor.h:57
Class to encode and decode Base64.
Definition: Base64.h:67
ControlledVocabulary cv_
Controlled vocabulary (psi-ms from OpenMS/share/OpenMS/CV/psi-ms.obo)
Definition: MzMLHandler.h:358
Product meta information.
Definition: Product.h:48
The representation of a chromatogram.
Definition: MSChromatogram.h:54
bool rt_set_
Definition: MzMLHandler.h:355
Interfaces::IMSDataConsumer * consumer_
Consumer class to work on spectra.
Definition: MzMLHandler.h:344
Data necessary to generate a single spectrum.
Definition: MzMLHandler.h:302
Semantically validates MzXML files.
Definition: MzMLValidator.h:48
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Map< String, std::vector< DataProcessingPtr > > processing_
The data processing list: id => Instrument.
Definition: MzMLHandler.h:291
std::vector< BinaryData > data
Definition: MzMLHandler.h:322
Base class for XML handlers.
Definition: XMLHandler.h:148
Description of a file location, used to store the origin of (meta) data.
Definition: SourceFile.h:46
Binary data representation.
Definition: MzMLHandlerHelper.h:57
Description of the software used for processing.
Definition: Software.h:48
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
MSChromatogram ChromatogramType
Definition: MzDataHandler.h:62
std::vector< std::pair< std::string, long > > spectra_offsets
Definition: MzMLHandler.h:333
ChromatogramType chromatogram_
The current chromatogram.
Definition: MzMLHandler.h:271
Map< String, SourceFile > source_files_
The source files: id => SourceFile.
Definition: MzMLHandler.h:283
const ProgressLogger & logger_
Progress logger.
Definition: MzMLHandler.h:341
Map< String, Software > software_
The software list: id => Software.
Definition: MzMLHandler.h:287
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition: DataValue.h:56
Representation of a controlled vocabulary.
Definition: ControlledVocabulary.h:54
Size default_array_length
Definition: MzMLHandler.h:305
Size default_array_length_
The default number of peaks in the current spectrum.
Definition: MzMLHandler.h:275
Data necessary to generate a single chromatogram.
Definition: MzMLHandler.h:320
SpectrumType spectrum
Definition: MzMLHandler.h:306
Definition: MzMLHandler.h:113
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
MapType * exp_
map pointer for reading
Definition: MzMLHandler.h:259
bool skip_spectrum_
Definition: MzMLHandler.h:352
Base64 decoder_
Decoder/Encoder for Base64-data in MzML.
Definition: MzMLHandler.h:338
Map< String, Sample > samples_
The sample list: id => Sample.
Definition: MzMLHandler.h:285
MapType::ChromatogramPeakType ChromatogramPeakType
Chromatogram peak type.
Definition: MzMLHandler.h:192
String default_processing_
id of the default data processing (used when no processing is defined)
Definition: MzMLHandler.h:293
PeakFileOptions & getOptions()
Get the peak file options.
Definition: MzMLHandler.h:167
MSExperiment PeakMap
Two-dimensional map of raw data points or peaks.
Definition: StandardTypes.h:61
CVMappings mapping_
Definition: MzMLHandler.h:359
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
void setMSDataConsumer(Interfaces::IMSDataConsumer *consumer)
Set the IMSDataConsumer consumer which will consume the read data.
Definition: MzMLHandler.h:182
std::vector< BinaryData > data_
The spectrum data (or chromatogram data)
Definition: MzMLHandler.h:273
bool in_spectrum_list_
Flag that indicates that we're inside a spectrum (in contrast to a chromatogram)
Definition: MzMLHandler.h:277
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
void getCounts(Size &spectra_counts, Size &chromatogram_counts)
Get the spectra and chromatogram counts of a file.
Definition: MzMLHandler.h:175
std::vector< ChromatogramData > chromatogram_data_
Vector of chromatogram data stored for later parallel processing.
Definition: MzMLHandler.h:328
PeakMap MapType
XML handler for MzDataFile.
Definition: MzDataHandler.h:60
UInt scan_count
Counting spectra and chromatograms.
Definition: MzMLHandler.h:347
bool skip_chromatogram_
Flag that indicates whether this spectrum should be skipped (due to options)
Definition: MzMLHandler.h:351
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
The interface of a consumer of spectra and chromatograms.
Definition: IMSDataConsumer.h:67
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
UInt selected_ion_count_
Count of selected ions.
Definition: MzMLHandler.h:363
MapType::PeakType PeakType
Peak type.
Definition: MzMLHandler.h:190
void setOptions(const PeakFileOptions &opt)
Set the peak file options.
Definition: MzMLHandler.h:159
A 1-dimensional raw data point or peak for chromatograms.
Definition: ChromatogramPeak.h:54
std::vector< std::pair< std::string, long > > chromatograms_offsets
Definition: MzMLHandler.h:334
MzMLHandlerHelper::BinaryData BinaryData
Definition: MzMLHandler.h:198
Map< String, Instrument > instruments_
The data processing list: id => Instrument.
Definition: MzMLHandler.h:289
String current_id_
Id of the current list. Used for referencing param group, source file, sample, software, ...
Definition: MzMLHandler.h:279
std::vector< BinaryData > data
Definition: MzMLHandler.h:304
Representation of controlled vocabulary mapping rules (for PSI formats)
Definition: CVMappings.h:56
Options for loading files containing peak data.
Definition: PeakFileOptions.h:47
Map< String, std::vector< SemanticValidator::CVTerm > > ref_param_
The referencing param groups: id => array (accession, value)
Definition: MzMLHandler.h:281
MSSpectrum SpectrumType
Spectrum type.
Definition: MzMLHandler.h:194
bool skip_data
Definition: MzMLHandler.h:307
Map class based on the STL map (containing several convenience functions)
Definition: Map.h:50
const MapType * cexp_
map pointer for writing
Definition: MzMLHandler.h:261
MSChromatogram ChromatogramType
Spectrum type.
Definition: MzMLHandler.h:196
ChromatogramType chromatogram
Definition: MzMLHandler.h:324
UInt chromatogram_count
Definition: MzMLHandler.h:348
Size default_array_length
Definition: MzMLHandler.h:323
MSSpectrum SpectrumType
Definition: MzDataHandler.h:61