OpenMS
UnimodXMLHandler.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Andreas Bertsch $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 
15 #include <vector>
16 
17 namespace OpenMS
18 {
19  namespace Internal
20  {
25  class OPENMS_DLLAPI UnimodXMLHandler :
26  public XMLHandler
27  {
28 public:
30  UnimodXMLHandler(std::vector<ResidueModification*>& mods, const String& filename);
31 
33  ~UnimodXMLHandler() override;
34 
35  // Docu in base class
36  void endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname) override;
37 
38  // Docu in base class
39  void startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const xercesc::Attributes& attributes) override;
40 
41  // Docu in base class
42  void characters(const XMLCh* const chars, const XMLSize_t /*length*/) override;
43 
44 private:
45 
47 
48  double avge_mass_;
49 
50  double mono_mass_;
51 
53 
54  std::vector<EmpiricalFormula> neutral_loss_diff_formula_;
55 
57  std::vector<std::vector<EmpiricalFormula>> neutral_loss_diff_formulas_;
58  std::vector<double> neutral_loss_mono_masses_;
59  std::vector<double> neutral_loss_avg_masses_;
60 
62 
63  std::vector<ResidueModification*>& modifications_;
64 
65  std::vector<char> sites_;
66 
67  std::vector<ResidueModification::TermSpecificity> term_specs_;
68  };
69 
70  } // namespace Internal
71 } // namespace OpenMS
Representation of an empirical formula.
Definition: EmpiricalFormula.h:59
Handler that is used for parsing XTandemXML data.
Definition: UnimodXMLHandler.h:27
~UnimodXMLHandler() override
Destructor.
UnimodXMLHandler(std::vector< ResidueModification * > &mods, const String &filename)
Default constructor.
std::vector< char > sites_
Definition: UnimodXMLHandler.h:65
std::vector< ResidueModification * > & modifications_
Definition: UnimodXMLHandler.h:63
ResidueModification * modification_
Definition: UnimodXMLHandler.h:61
std::vector< ResidueModification::TermSpecificity > term_specs_
Definition: UnimodXMLHandler.h:67
String tag_
Definition: UnimodXMLHandler.h:46
std::vector< double > neutral_loss_mono_masses_
Definition: UnimodXMLHandler.h:58
double mono_mass_
Definition: UnimodXMLHandler.h:50
std::vector< std::vector< EmpiricalFormula > > neutral_loss_diff_formulas_
Definition: UnimodXMLHandler.h:57
std::vector< double > neutral_loss_avg_masses_
Definition: UnimodXMLHandler.h:59
bool was_valid_peptide_modification_
Definition: UnimodXMLHandler.h:56
std::vector< EmpiricalFormula > neutral_loss_diff_formula_
Definition: UnimodXMLHandler.h:54
double avge_mass_
Definition: UnimodXMLHandler.h:48
void startElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname, const xercesc::Attributes &attributes) override
void characters(const XMLCh *const chars, const XMLSize_t) override
void endElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname) override
EmpiricalFormula diff_formula_
Definition: UnimodXMLHandler.h:52
Base class for XML handlers.
Definition: XMLHandler.h:302
Representation of a modification on an amino acid residue.
Definition: ResidueModification.h:53
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19