File adapter for MzXML 2.1 files. More...
#include <OpenMS/FORMAT/MzXMLFile.h>
Public Member Functions | |
MzXMLFile () | |
Default constructor. More... | |
~MzXMLFile () | |
Destructor. More... | |
PeakFileOptions & | getOptions () |
Mutable access to the options for loading/storing. More... | |
const PeakFileOptions & | getOptions () const |
Non-mutable access to the options for loading/storing. More... | |
void | setOptions (const PeakFileOptions &) |
set options for loading/storing More... | |
template<typename MapType > | |
void | load (const String &filename, MapType &map) |
Loads a map from a MzXML file. More... | |
template<typename MapType > | |
void | store (const String &filename, const MapType &map) const |
Stores a map in a MzXML file. More... | |
template<typename MapType > | |
void | transform (const String &filename_in, Interfaces::IMSDataConsumer< MapType > *consumer, bool skip_full_count=false) |
Transforms a map while loading using the supplied MSDataConsumer. More... | |
template<typename MapType > | |
void | transform (const String &filename_in, Interfaces::IMSDataConsumer< MapType > *consumer, MapType &map, bool skip_full_count=false) |
Transforms a map while loading using the supplied MSDataConsumer. More... | |
![]() | |
XMLFile () | |
Default constructor. More... | |
XMLFile (const String &schema_location, const String &version) | |
Constructor that sets the schema location. More... | |
virtual | ~XMLFile () |
Destructor. More... | |
bool | isValid (const String &filename, std::ostream &os) |
Checks if a file validates against the XML schema. More... | |
const String & | getVersion () const |
return the version of the schema More... | |
![]() | |
ProgressLogger () | |
Constructor. More... | |
~ProgressLogger () | |
Destructor. More... | |
ProgressLogger (const ProgressLogger &other) | |
Copy constructor. More... | |
ProgressLogger & | operator= (const ProgressLogger &other) |
Assignment Operator. More... | |
void | setLogType (LogType type) const |
Sets the progress log that should be used. The default type is NONE! More... | |
LogType | getLogType () const |
Returns the type of progress log being used. More... | |
void | startProgress (SignedSize begin, SignedSize end, const String &label) const |
Initializes the progress display. More... | |
void | setProgress (SignedSize value) const |
Sets the current progress. More... | |
void | endProgress () const |
Ends the progress display. More... | |
Protected Member Functions | |
template<typename MapType > | |
void | transformFirstPass_ (const String &filename_in, Interfaces::IMSDataConsumer< MapType > *consumer, bool skip_full_count) |
Perform first pass through the file and retrieve the meta-data to initialize the consumer. More... | |
![]() | |
void | parse_ (const String &filename, XMLHandler *handler) |
Parses the XML file given by filename using the handler given by handler . More... | |
void | save_ (const String &filename, XMLHandler *handler) const |
Stores the contents of the XML handler given by handler in the file given by filename . More... | |
void | enforceEncoding_ (const String &encoding) |
Private Attributes | |
PeakFileOptions | options_ |
Additional Inherited Members | |
![]() | |
enum | LogType { CMD, GUI, NONE } |
Possible log types. More... | |
![]() | |
static String | logTypeToFactoryName_ (LogType type) |
Return the name of the factory product used for this log type. More... | |
![]() | |
String | schema_location_ |
XML schema file location. More... | |
String | schema_version_ |
Version string. More... | |
String | enforced_encoding_ |
Encoding string that replaces the encoding (system dependent or specified in the XML). Disabled if empty. Used as a workaround for XTandem output xml. More... | |
![]() | |
LogType | type_ |
time_t | last_invoke_ |
ProgressLoggerImpl * | current_logger_ |
![]() | |
static int | recursion_depth_ |
File adapter for MzXML 2.1 files.
MzXMLFile | ( | ) |
Default constructor.
~MzXMLFile | ( | ) |
Destructor.
PeakFileOptions& getOptions | ( | ) |
Mutable access to the options for loading/storing.
Referenced by FileHandler::loadExperiment(), SwathFile::loadMzXML(), and FileHandler::storeExperiment().
const PeakFileOptions& getOptions | ( | ) | const |
Non-mutable access to the options for loading/storing.
Loads a map from a MzXML file.
map
has to be a MSExperiment 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 MSExperiment< PeakT, ChromatogramPeakT >::reset(), DocumentIdentifier::setLoadedFilePath(), DocumentIdentifier::setLoadedFileType(), and MzXMLHandler< MapType >::setOptions().
Referenced by FileHandler::loadExperiment(), and SwathFile::loadMzXML().
void setOptions | ( | const PeakFileOptions & | ) |
set options for loading/storing
Stores a map in a MzXML file.
map
has to be a MSExperiment or have the same interface.
Exception::UnableToCreateFile | is thrown if the file could not be created |
Referenced by FileHandler::storeExperiment().
|
inline |
Transforms a map while loading using the supplied MSDataConsumer.
The result will not be stored directly but is available through the events triggered by the parser and caught by the provided IMSDataConsumer object.
This function should be used if processing and storage of the result can be performed directly in the provided IMSDataConsumer object.
filename_in | Filename of input mzML file to transform |
consumer | Consumer class to operate on the input filename (implementing a transformation) |
skip_full_count | Whether to skip computing the correct number of spectra and chromatograms in the input file |
References MzXMLHandler< MapType >::setMSDataConsumer(), and MzXMLHandler< MapType >::setOptions().
Referenced by SwathFile::loadMzXML().
|
inline |
Transforms a map while loading using the supplied MSDataConsumer.
The result will be stored in the provided map.
This function should be used if a specific pre-processing should be applied to the data before storing them in a map (e.g. if data-reduction should be applied to the data before loading all data into memory).
filename_in | Filename of input mzXML file to transform |
consumer | Consumer class to operate on the input filename (implementing a transformation) |
map | Map to store the resulting spectra and chromatograms |
skip_full_count | Whether to skip computing the correct number of spectra and chromatograms in the input file |
References PeakFileOptions::setAlwaysAppendData(), MzXMLHandler< MapType >::setMSDataConsumer(), and MzXMLHandler< MapType >::setOptions().
|
inlineprotected |
Perform first pass through the file and retrieve the meta-data to initialize the consumer.
References MzXMLHandler< MapType >::getScanCount(), IMSDataConsumer< MapType >::setExpectedSize(), IMSDataConsumer< MapType >::setExperimentalSettings(), PeakFileOptions::setMetadataOnly(), MzXMLHandler< MapType >::setOptions(), and PeakFileOptions::setSizeOnly().
|
private |
OpenMS / TOPP release 2.0.0 | Documentation generated on Fri May 29 2015 17:20:41 using doxygen 1.8.9.1 |