Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
MzIdentMLDOMHandler Class Reference

XML DOM handler for MzIdentMLFile. More...

#include <OpenMS/FORMAT/HANDLERS/MzIdentMLDOMHandler.h>

Classes

struct  AnalysisSoftware
 
struct  DatabaseInput
 
struct  DBSequence
 
struct  ModificationParam
 
struct  PeptideEvidence
 
struct  SpectrumIdentification
 
struct  SpectrumIdentificationProtocol
 

Public Member Functions

void readMzIdentMLFile (const std::string &mzid_file)
 Provides the functionality of reading a mzid with a handler object. More...
 
void writeMzIdentMLFile (const std::string &mzid_file)
 Provides the functionality to write a mzid with a handler object. More...
 
Constructors and destructor
 MzIdentMLDOMHandler (const std::vector< ProteinIdentification > &pro_id, const std::vector< PeptideIdentification > &pep_id, const String &version, const ProgressLogger &logger)
 Constructor for a write-only handler for internal identification structures. More...
 
 MzIdentMLDOMHandler (std::vector< ProteinIdentification > &pro_id, std::vector< PeptideIdentification > &pep_id, const String &version, const ProgressLogger &logger)
 Constructor for a read-only handler for internal identification structures. More...
 
virtual ~MzIdentMLDOMHandler ()
 Destructor. More...
 

Protected Member Functions

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. More...
 
Helper functions to build a DOM tree from the internal id structures
void buildCvList_ (xercesc::DOMElement *cvElements)
 
void buildAnalysisSoftwareList_ (xercesc::DOMElement *analysisSoftwareElements)
 
void buildSequenceCollection_ (xercesc::DOMElement *sequenceCollectionElements)
 
void buildAnalysisCollection_ (xercesc::DOMElement *analysisCollectionElements)
 
void buildAnalysisProtocolCollection_ (xercesc::DOMElement *protocolElements)
 
void buildInputDataCollection_ (xercesc::DOMElement *inputElements)
 
void buildEnclosedCV_ (xercesc::DOMElement *parentElement, String encel, String acc, String name, String cvref)
 
void buildAnalysisDataCollection_ (xercesc::DOMElement *analysisElements)
 

Protected Attributes

const ProgressLoggerlogger_
 Progress logger. More...
 
ControlledVocabulary cv_
 Controlled vocabulary (psi-ms from OpenMS/share/OpenMS/CV/psi-ms.obo) More...
 
ControlledVocabulary unimod_
 Controlled vocabulary for modifications (unimod from OpenMS/share/OpenMS/CV/unimod.obo) More...
 
std::vector< ProteinIdentification > * pro_id_
 Internal +w Identification Item for proteins. More...
 
std::vector< PeptideIdentification > * pep_id_
 Internal +w Identification Item for peptides. More...
 
const std::vector< ProteinIdentification > * cpro_id_
 Internal -w Identification Item for proteins. More...
 
const std::vector< PeptideIdentification > * cpep_id_
 Internal -w Identification Item for peptides. More...
 
const String schema_version_
 Internal version keeping. More...
 

Private Member Functions

 MzIdentMLDOMHandler ()
 
 MzIdentMLDOMHandler (const MzIdentMLDOMHandler &rhs)
 
MzIdentMLDOMHandleroperator= (const MzIdentMLDOMHandler &rhs)
 

Private Attributes

XMLCh * TAG_root
 
XMLCh * TAG_CV
 
XMLCh * ATTR_name
 
xercesc::XercesDOMParser mzid_parser_
 
String search_engine_
 
String search_engine_version_
 
std::map< String, AnalysisSoftwareas_map_
 
std::map< String, Stringsr_map_
 
std::map< String, Stringsd_map_
 
std::map< String, DatabaseInputdb_map_
 
std::map< String, SpectrumIdentificationsi_map_
 
std::map< String, size_tsi_pro_map_
 
std::map< String, SpectrumIdentificationProtocolsp_map_
 
std::map< String, AASequencepep_map_
 
std::map< String, PeptideEvidencepe_ev_map_
 
std::map< String, Stringpv_db_map_
 
std::multimap< String, Stringp_pv_map_
 
std::map< String, DBSequencedb_sq_map_
 
std::list< std::list< String > > hit_pev_
 

Helper functions to build the internal id structures from the DOM tree

std::pair< CVTermList, std::map< String, DataValue > > parseParamGroup_ (xercesc::DOMNodeList *paramGroup)
 
CVTerm parseCvParam_ (xercesc::DOMElement *param)
 
std::pair< String, DataValueparseUserParam_ (xercesc::DOMElement *param)
 
void parseAnalysisSoftwareList_ (xercesc::DOMNodeList *analysisSoftwareElements)
 
void parseDBSequenceElements_ (xercesc::DOMNodeList *dbSequenceElements)
 
void parsePeptideElements_ (xercesc::DOMNodeList *peptideElements)
 
AASequence parsePeptideSiblings_ (xercesc::DOMNodeList *peptideSiblings)
 
void parsePeptideEvidenceElements_ (xercesc::DOMNodeList *peptideEvidenceElements)
 
void parseSpectrumIdentificationElements_ (xercesc::DOMNodeList *spectrumIdentificationElements)
 
void parseSpectrumIdentificationProtocolElements_ (xercesc::DOMNodeList *spectrumIdentificationProtocolElements)
 
void parseInputElements_ (xercesc::DOMNodeList *inputElements)
 
void parseSpectrumIdentificationListElements_ (xercesc::DOMNodeList *spectrumIdentificationListElements)
 
void parseSpectrumIdentificationItemElement_ (xercesc::DOMElement *spectrumIdentificationItemElement, PeptideIdentification &spectrum_identification, String &spectrumIdentificationList_ref)
 
void parseProteinDetectionHypothesisElement_ (xercesc::DOMElement *proteinDetectionHypothesisElement, ProteinIdentification &protein_identification)
 
void parseProteinAmbiguityGroupElement_ (xercesc::DOMElement *proteinAmbiguityGroupElement, ProteinIdentification &protein_identification)
 
void parseProteinDetectionListElements_ (xercesc::DOMNodeList *proteinDetectionListElements)
 
static ProteinIdentification::SearchParameters findSearchParameters_ (std::pair< CVTermList, std::map< String, DataValue > > as_params)
 

Detailed Description

XML DOM handler for MzIdentMLFile.

In read-mode, this class will parse an MzIdentML XML file and append the input identifications to the provided PeptideIdentifications and ProteinIdentifications.

Note
Do not use this class. It is only needed in MzIdentMLFile.
DOM and STREAM handler for MzIdentML have the same interface for legacy id structures.
Only upon destruction of this class it can be guaranteed that all data has been appended to the appropriate containers. Do not try to access the data before that.

Constructor & Destructor Documentation

MzIdentMLDOMHandler ( const std::vector< ProteinIdentification > &  pro_id,
const std::vector< PeptideIdentification > &  pep_id,
const String version,
const ProgressLogger logger 
)

Constructor for a write-only handler for internal identification structures.

MzIdentMLDOMHandler ( std::vector< ProteinIdentification > &  pro_id,
std::vector< PeptideIdentification > &  pep_id,
const String version,
const ProgressLogger logger 
)

Constructor for a read-only handler for internal identification structures.

virtual ~MzIdentMLDOMHandler ( )
virtual

Destructor.

MzIdentMLDOMHandler ( )
private
MzIdentMLDOMHandler ( const MzIdentMLDOMHandler rhs)
private

Member Function Documentation

void buildAnalysisCollection_ ( xercesc::DOMElement *  analysisCollectionElements)
protected
void buildAnalysisDataCollection_ ( xercesc::DOMElement *  analysisElements)
protected
void buildAnalysisProtocolCollection_ ( xercesc::DOMElement *  protocolElements)
protected
void buildAnalysisSoftwareList_ ( xercesc::DOMElement *  analysisSoftwareElements)
protected
void buildCvList_ ( xercesc::DOMElement *  cvElements)
protected
void buildEnclosedCV_ ( xercesc::DOMElement *  parentElement,
String  encel,
String  acc,
String  name,
String  cvref 
)
protected
void buildInputDataCollection_ ( xercesc::DOMElement *  inputElements)
protected
void buildSequenceCollection_ ( xercesc::DOMElement *  sequenceCollectionElements)
protected
static ProteinIdentification::SearchParameters findSearchParameters_ ( std::pair< CVTermList, std::map< String, DataValue > >  as_params)
staticprotected
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.

MzIdentMLDOMHandler& operator= ( const MzIdentMLDOMHandler rhs)
private
void parseAnalysisSoftwareList_ ( xercesc::DOMNodeList *  analysisSoftwareElements)
protected
CVTerm parseCvParam_ ( xercesc::DOMElement *  param)
protected
void parseDBSequenceElements_ ( xercesc::DOMNodeList *  dbSequenceElements)
protected
void parseInputElements_ ( xercesc::DOMNodeList *  inputElements)
protected
std::pair<CVTermList, std::map<String, DataValue> > parseParamGroup_ ( xercesc::DOMNodeList *  paramGroup)
protected
void parsePeptideElements_ ( xercesc::DOMNodeList *  peptideElements)
protected
void parsePeptideEvidenceElements_ ( xercesc::DOMNodeList *  peptideEvidenceElements)
protected
AASequence parsePeptideSiblings_ ( xercesc::DOMNodeList *  peptideSiblings)
protected
void parseProteinAmbiguityGroupElement_ ( xercesc::DOMElement *  proteinAmbiguityGroupElement,
ProteinIdentification protein_identification 
)
protected
void parseProteinDetectionHypothesisElement_ ( xercesc::DOMElement *  proteinDetectionHypothesisElement,
ProteinIdentification protein_identification 
)
protected
void parseProteinDetectionListElements_ ( xercesc::DOMNodeList *  proteinDetectionListElements)
protected
void parseSpectrumIdentificationElements_ ( xercesc::DOMNodeList *  spectrumIdentificationElements)
protected
void parseSpectrumIdentificationItemElement_ ( xercesc::DOMElement *  spectrumIdentificationItemElement,
PeptideIdentification spectrum_identification,
String spectrumIdentificationList_ref 
)
protected
void parseSpectrumIdentificationListElements_ ( xercesc::DOMNodeList *  spectrumIdentificationListElements)
protected
void parseSpectrumIdentificationProtocolElements_ ( xercesc::DOMNodeList *  spectrumIdentificationProtocolElements)
protected
std::pair<String, DataValue> parseUserParam_ ( xercesc::DOMElement *  param)
protected
void readMzIdentMLFile ( const std::string &  mzid_file)

Provides the functionality of reading a mzid with a handler object.

void writeMzIdentMLFile ( const std::string &  mzid_file)

Provides the functionality to write a mzid with a handler object.

Member Data Documentation

std::map<String, AnalysisSoftware> as_map_
private
XMLCh* ATTR_name
private
const std::vector<PeptideIdentification>* cpep_id_
protected

Internal -w Identification Item for peptides.

const std::vector<ProteinIdentification>* cpro_id_
protected

Internal -w Identification Item for proteins.

ControlledVocabulary cv_
protected

Controlled vocabulary (psi-ms from OpenMS/share/OpenMS/CV/psi-ms.obo)

std::map<String, DatabaseInput> db_map_
private
std::map<String, DBSequence> db_sq_map_
private
std::list<std::list<String> > hit_pev_
private
const ProgressLogger& logger_
protected

Progress logger.

xercesc::XercesDOMParser mzid_parser_
private
std::multimap<String, String> p_pv_map_
private
std::map<String, PeptideEvidence> pe_ev_map_
private
std::vector<PeptideIdentification>* pep_id_
protected

Internal +w Identification Item for peptides.

std::map<String, AASequence> pep_map_
private
std::vector<ProteinIdentification>* pro_id_
protected

Internal +w Identification Item for proteins.

std::map<String, String> pv_db_map_
private
const String schema_version_
protected

Internal version keeping.

std::map<String, String> sd_map_
private
String search_engine_
private
String search_engine_version_
private
std::map<String, SpectrumIdentification> si_map_
private
std::map<String, size_t> si_pro_map_
private
std::map<String, SpectrumIdentificationProtocol> sp_map_
private
std::map<String, String> sr_map_
private
XMLCh* TAG_CV
private
XMLCh* TAG_root
private
ControlledVocabulary unimod_
protected

Controlled vocabulary for modifications (unimod from OpenMS/share/OpenMS/CV/unimod.obo)


OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 12:49:31 using doxygen 1.8.11