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 to hold the used analysis software for that file. More...
 
struct  DatabaseInput
 Struct to hold the information from the DatabaseInput xml tag. More...
 
struct  DBSequence
 Struct to hold the information from the DBSequence xml tag. More...
 
struct  ModificationParam
 Struct to hold the information from the ModificationParam xml tag. More...
 
struct  PeptideEvidence
 Struct to hold the PeptideEvidence information. More...
 
struct  SpectrumIdentification
 Struct to hold the information from the SpectrumIdentification xml tag. More...
 
struct  SpectrumIdentificationProtocol
 Struct to hold the information from the SpectrumIdentificationProtocol xml tag. More...
 

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 * xml_root_tag_ptr_
 
XMLCh * xml_cvparam_tag_ptr_
 
XMLCh * xml_name_attr_ptr_
 
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_t > si_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_
 
bool xl_ms_search_
 
std::map< String, Stringxl_id_donor_map_
 
std::map< String, Stringxl_id_acceptor_map_
 
std::map< String, SignedSizexl_donor_pos_map_
 
std::map< String, SignedSizexl_acceptor_pos_map_
 
std::map< String, doublexl_mass_map_
 
std::map< String, Stringxl_mod_map_
 

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::DOMElement *peptide)
 
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 parseSpectrumIdentificationItemSetXLMS (std::set< String >::const_iterator set_it, std::multimap< String, int > xl_val_map, xercesc::DOMElement *element_res, String spectrumID)
 
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() [1/4]

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() [2/4]

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.

◆ ~MzIdentMLDOMHandler()

virtual ~MzIdentMLDOMHandler ( )
virtual

Destructor.

◆ MzIdentMLDOMHandler() [3/4]

MzIdentMLDOMHandler ( )
private

◆ MzIdentMLDOMHandler() [4/4]

MzIdentMLDOMHandler ( const MzIdentMLDOMHandler rhs)
private

Member Function Documentation

◆ buildAnalysisCollection_()

void buildAnalysisCollection_ ( xercesc::DOMElement *  analysisCollectionElements)
protected

◆ buildAnalysisDataCollection_()

void buildAnalysisDataCollection_ ( xercesc::DOMElement *  analysisElements)
protected

◆ buildAnalysisProtocolCollection_()

void buildAnalysisProtocolCollection_ ( xercesc::DOMElement *  protocolElements)
protected

◆ buildAnalysisSoftwareList_()

void buildAnalysisSoftwareList_ ( xercesc::DOMElement *  analysisSoftwareElements)
protected

◆ buildCvList_()

void buildCvList_ ( xercesc::DOMElement *  cvElements)
protected

◆ buildEnclosedCV_()

void buildEnclosedCV_ ( xercesc::DOMElement *  parentElement,
String  encel,
String  acc,
String  name,
String  cvref 
)
protected

◆ buildInputDataCollection_()

void buildInputDataCollection_ ( xercesc::DOMElement *  inputElements)
protected

◆ buildSequenceCollection_()

void buildSequenceCollection_ ( xercesc::DOMElement *  sequenceCollectionElements)
protected

◆ findSearchParameters_()

static ProteinIdentification::SearchParameters findSearchParameters_ ( std::pair< CVTermList, std::map< String, DataValue > >  as_params)
staticprotected

◆ getChildWithName_()

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.

◆ operator=()

MzIdentMLDOMHandler& operator= ( const MzIdentMLDOMHandler rhs)
private

◆ parseAnalysisSoftwareList_()

void parseAnalysisSoftwareList_ ( xercesc::DOMNodeList *  analysisSoftwareElements)
protected

◆ parseCvParam_()

CVTerm parseCvParam_ ( xercesc::DOMElement *  param)
protected

◆ parseDBSequenceElements_()

void parseDBSequenceElements_ ( xercesc::DOMNodeList *  dbSequenceElements)
protected

◆ parseInputElements_()

void parseInputElements_ ( xercesc::DOMNodeList *  inputElements)
protected

◆ parseParamGroup_()

std::pair<CVTermList, std::map<String, DataValue> > parseParamGroup_ ( xercesc::DOMNodeList *  paramGroup)
protected

◆ parsePeptideElements_()

void parsePeptideElements_ ( xercesc::DOMNodeList *  peptideElements)
protected

◆ parsePeptideEvidenceElements_()

void parsePeptideEvidenceElements_ ( xercesc::DOMNodeList *  peptideEvidenceElements)
protected

◆ parsePeptideSiblings_()

AASequence parsePeptideSiblings_ ( xercesc::DOMElement *  peptide)
protected

◆ parseProteinAmbiguityGroupElement_()

void parseProteinAmbiguityGroupElement_ ( xercesc::DOMElement *  proteinAmbiguityGroupElement,
ProteinIdentification protein_identification 
)
protected

◆ parseProteinDetectionHypothesisElement_()

void parseProteinDetectionHypothesisElement_ ( xercesc::DOMElement *  proteinDetectionHypothesisElement,
ProteinIdentification protein_identification 
)
protected

◆ parseProteinDetectionListElements_()

void parseProteinDetectionListElements_ ( xercesc::DOMNodeList *  proteinDetectionListElements)
protected

◆ parseSpectrumIdentificationElements_()

void parseSpectrumIdentificationElements_ ( xercesc::DOMNodeList *  spectrumIdentificationElements)
protected

◆ parseSpectrumIdentificationItemElement_()

void parseSpectrumIdentificationItemElement_ ( xercesc::DOMElement *  spectrumIdentificationItemElement,
PeptideIdentification spectrum_identification,
String spectrumIdentificationList_ref 
)
protected

◆ parseSpectrumIdentificationItemSetXLMS()

void parseSpectrumIdentificationItemSetXLMS ( std::set< String >::const_iterator  set_it,
std::multimap< String, int >  xl_val_map,
xercesc::DOMElement *  element_res,
String  spectrumID 
)
protected

◆ parseSpectrumIdentificationListElements_()

void parseSpectrumIdentificationListElements_ ( xercesc::DOMNodeList *  spectrumIdentificationListElements)
protected

◆ parseSpectrumIdentificationProtocolElements_()

void parseSpectrumIdentificationProtocolElements_ ( xercesc::DOMNodeList *  spectrumIdentificationProtocolElements)
protected

◆ parseUserParam_()

std::pair<String, DataValue> parseUserParam_ ( xercesc::DOMElement *  param)
protected

◆ readMzIdentMLFile()

void readMzIdentMLFile ( const std::string &  mzid_file)

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

◆ writeMzIdentMLFile()

void writeMzIdentMLFile ( const std::string &  mzid_file)

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

Member Data Documentation

◆ as_map_

std::map<String, AnalysisSoftware> as_map_
private

◆ cpep_id_

const std::vector<PeptideIdentification>* cpep_id_
protected

Internal -w Identification Item for peptides.

◆ cpro_id_

const std::vector<ProteinIdentification>* cpro_id_
protected

Internal -w Identification Item for proteins.

◆ cv_

ControlledVocabulary cv_
protected

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

◆ db_map_

std::map<String, DatabaseInput> db_map_
private

◆ db_sq_map_

std::map<String, DBSequence> db_sq_map_
private

◆ hit_pev_

std::list<std::list<String> > hit_pev_
private

◆ logger_

const ProgressLogger& logger_
protected

Progress logger.

◆ mzid_parser_

xercesc::XercesDOMParser mzid_parser_
private

◆ p_pv_map_

std::multimap<String, String> p_pv_map_
private

◆ pe_ev_map_

std::map<String, PeptideEvidence> pe_ev_map_
private

◆ pep_id_

std::vector<PeptideIdentification>* pep_id_
protected

Internal +w Identification Item for peptides.

◆ pep_map_

std::map<String, AASequence> pep_map_
private

◆ pro_id_

std::vector<ProteinIdentification>* pro_id_
protected

Internal +w Identification Item for proteins.

◆ pv_db_map_

std::map<String, String> pv_db_map_
private

◆ schema_version_

const String schema_version_
protected

Internal version keeping.

◆ sd_map_

std::map<String, String> sd_map_
private

◆ search_engine_

String search_engine_
private

◆ search_engine_version_

String search_engine_version_
private

◆ si_map_

std::map<String, SpectrumIdentification> si_map_
private

◆ si_pro_map_

std::map<String, size_t> si_pro_map_
private

◆ sp_map_

std::map<String, SpectrumIdentificationProtocol> sp_map_
private

◆ sr_map_

std::map<String, String> sr_map_
private

◆ unimod_

ControlledVocabulary unimod_
protected

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

◆ xl_acceptor_pos_map_

std::map<String, SignedSize> xl_acceptor_pos_map_
private

◆ xl_donor_pos_map_

std::map<String, SignedSize> xl_donor_pos_map_
private

◆ xl_id_acceptor_map_

std::map<String, String> xl_id_acceptor_map_
private

◆ xl_id_donor_map_

std::map<String, String> xl_id_donor_map_
private

◆ xl_mass_map_

std::map<String, double> xl_mass_map_
private

◆ xl_mod_map_

std::map<String, String> xl_mod_map_
private

◆ xl_ms_search_

bool xl_ms_search_
private

◆ xml_cvparam_tag_ptr_

XMLCh* xml_cvparam_tag_ptr_
private

◆ xml_name_attr_ptr_

XMLCh* xml_name_attr_ptr_
private

◆ xml_root_tag_ptr_

XMLCh* xml_root_tag_ptr_
private

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:14 using doxygen 1.8.13