Helper for mzML file format.
More...
#include <OpenMS/FORMAT/HANDLERS/MzMLHandlerHelper.h>
|
static String | getCompressionTerm_ (const PeakFileOptions &opt, MSNumpressCoder::NumpressConfig np_compression, const String &indent="", bool use_numpress=false) |
| Returns the appropriate compression term given the PeakFileOptions and the NumpressConfig. More...
|
|
static void | writeFooter_ (std::ostream &os, const PeakFileOptions &options, const std::vector< std::pair< std::string, Int64 > > &spectra_offsets, const std::vector< std::pair< std::string, Int64 > > &chromatograms_offsets) |
| Write the indexed mzML footer the appropriate compression term given the PeakFileOptions and the NumpressConfig. More...
|
|
static void | decodeBase64Arrays (std::vector< BinaryData > &data_, const bool skipXMLCheck=false) |
| Decode Base64 arrays and write into data_ array. More...
|
|
static void | computeDataProperties_ (const std::vector< BinaryData > &data_, bool &precision_64, SignedSize &index, const String &index_name) |
| Identify a data array from a list. More...
|
|
static bool | handleBinaryDataArrayCVParam (std::vector< BinaryData > &data_, const String &accession, const String &value, const String &name, const String &unit_accession) |
| Handle a given CV parameter found in a binaryDataArray tag. More...
|
|
Helper for mzML file format.
This class provides common structures and re-useable helper functions for parsing the mzML format. These are mainly used by MzMLHandler and MzMLSpectrumDecoder.
◆ computeDataProperties_()
static void computeDataProperties_ |
( |
const std::vector< BinaryData > & |
data_, |
|
|
bool & |
precision_64, |
|
|
SignedSize & |
index, |
|
|
const String & |
index_name |
|
) |
| |
|
static |
Identify a data array from a list.
Given a specific array name, find it in the provided list and return its index and precision.
- Parameters
-
data_ | The list of data arrays |
precision_64 | Whether the identified array has 64 bit precision |
index | The index of the identified array |
index_name | The name of the array to be identified |
◆ decodeBase64Arrays()
static void decodeBase64Arrays |
( |
std::vector< BinaryData > & |
data_, |
|
|
const bool |
skipXMLCheck = false |
|
) |
| |
|
static |
Decode Base64 arrays and write into data_ array.
- Parameters
-
data_ | The input and output |
skipXMLCheck | whether to skip cleaning the Base64 arrays and remove whitespaces |
◆ getCompressionTerm_()
Returns the appropriate compression term given the PeakFileOptions and the NumpressConfig.
◆ handleBinaryDataArrayCVParam()
static bool handleBinaryDataArrayCVParam |
( |
std::vector< BinaryData > & |
data_, |
|
|
const String & |
accession, |
|
|
const String & |
value, |
|
|
const String & |
name, |
|
|
const String & |
unit_accession |
|
) |
| |
|
static |
Handle a given CV parameter found in a binaryDataArray tag.
Given a CV parameter, properly set the members of the last entry of data_, this will properly handle all terms describing precision, compression, name of the data and units.
- Parameters
-
data_ | The list of data arrays, whose last entry will be changed |
accession | The CV accession |
value | The CV value |
name | The CV name |
unit_accession | The CV unit accession (if a unit tag is present) |
◆ warning()
static void warning |
( |
int |
mode, |
|
|
const String & |
msg, |
|
|
UInt |
line = 0 , |
|
|
UInt |
column = 0 |
|
) |
| |
|
staticprivate |
Also display some warning message when appropriate (see XMLHandler)
◆ writeFooter_()
static void writeFooter_ |
( |
std::ostream & |
os, |
|
|
const PeakFileOptions & |
options, |
|
|
const std::vector< std::pair< std::string, Int64 > > & |
spectra_offsets, |
|
|
const std::vector< std::pair< std::string, Int64 > > & |
chromatograms_offsets |
|
) |
| |
|
static |
Write the indexed mzML footer the appropriate compression term given the PeakFileOptions and the NumpressConfig.
- Parameters
-
os | The output stream |
options | The PeakFileOptions used for writing |
spectra_offsets | Binary offsets of <spectrum> tags |
chromatograms_offsets | Binary offsets of <chromatogram> tags |