OpenMS  2.6.0
MascotXMLHandler.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Nico Pfeifer, Chris Bielow $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
45 
46 #include <vector>
47 
48 namespace OpenMS
49 {
50  namespace Internal
51  {
55  class OPENMS_DLLAPI MascotXMLHandler :
56  public XMLHandler
57  {
58 public:
60  MascotXMLHandler(ProteinIdentification& protein_identification,
61  std::vector<PeptideIdentification>& identifications,
62  const String& filename,
63  std::map<String, std::vector<AASequence> >& peptides,
64  const SpectrumMetaDataLookup& lookup);
65 
67  ~MascotXMLHandler() override;
68 
69  // Docu in base class
70  void endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname) override;
71 
72  // Docu in base class
73  void startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const xercesc::Attributes& attributes) override;
74 
75  // Docu in base class
76  void characters(const XMLCh* const chars, const XMLSize_t /*length*/) override;
77 
79  static std::vector<String> splitModificationBySpecifiedAA(String mod);
80 
81 private:
82 
84  std::vector<PeptideIdentification>& id_data_;
96  std::map<String, std::vector<AASequence> >& modified_peptides_;
97 
102 
103  // list of modifications, which cannot be set as fixed and needs
104  // to be removed, because added from mascot as variable modification
105  std::vector<String> remove_fixed_mods_;
106 
109 
112  };
113 
114  } // namespace Internal
115 } // namespace OpenMS
116 
OpenMS::Internal::MascotXMLHandler::protein_identification_
ProteinIdentification & protein_identification_
the protein identifications
Definition: MascotXMLHandler.h:83
OpenMS::Internal::MascotXMLHandler::character_buffer_
String character_buffer_
filled by MascotXMLHandler::characters
Definition: MascotXMLHandler.h:99
OpenMS::Internal::XMLHandler
Base class for XML handlers.
Definition: XMLHandler.h:151
OpenMS::Internal::MascotXMLHandler::remove_fixed_mods_
std::vector< String > remove_fixed_mods_
Definition: MascotXMLHandler.h:105
OpenMS::String
A more convenient string class.
Definition: String.h:59
PeptideEvidence.h
OpenMS::Internal::MascotXMLHandler::search_parameters_
ProteinIdentification::SearchParameters search_parameters_
Definition: MascotXMLHandler.h:93
OpenMS::ProteinHit
Representation of a protein hit.
Definition: ProteinHit.h:58
OpenMS::Internal::MascotXMLHandler::actual_title_
String actual_title_
Definition: MascotXMLHandler.h:95
OpenMS::Internal::MascotXMLHandler::tags_open_
StringList tags_open_
tracking the current XML tree
Definition: MascotXMLHandler.h:98
XMLHandler.h
Map.h
SpectrumMetaDataLookup.h
OpenMS::ProteinIdentification
Representation of a protein identification run.
Definition: ProteinIdentification.h:70
OpenMS::Internal::MascotXMLHandler
Handler that is used for parsing MascotXML data.
Definition: MascotXMLHandler.h:55
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::Internal::MascotXMLHandler::lookup_
const SpectrumMetaDataLookup & lookup_
Helper object for looking up RT information.
Definition: MascotXMLHandler.h:108
OpenMS::Internal::MascotXMLHandler::minor_version_
String minor_version_
Definition: MascotXMLHandler.h:101
OpenMS::Internal::MascotXMLHandler::identifier_
String identifier_
Definition: MascotXMLHandler.h:94
ProteinIdentification.h
OpenMS::Internal::MascotXMLHandler::actual_peptide_hit_
PeptideHit actual_peptide_hit_
Definition: MascotXMLHandler.h:86
OpenMS::PeptideEvidence
Representation of a peptide evidence.
Definition: PeptideEvidence.h:50
OpenMS::Internal::MascotXMLHandler::id_data_
std::vector< PeptideIdentification > & id_data_
the identifications (storing the peptide hits)
Definition: MascotXMLHandler.h:84
OpenMS::Internal::MascotXMLHandler::no_rt_error_
bool no_rt_error_
Error for missing RT information already reported?
Definition: MascotXMLHandler.h:111
OpenMS::StringList
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
OpenMS::Internal::MascotXMLHandler::actual_peptide_evidence_
PeptideEvidence actual_peptide_evidence_
Definition: MascotXMLHandler.h:87
OpenMS::Internal::MascotXMLHandler::actual_query_
UInt actual_query_
Definition: MascotXMLHandler.h:92
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
ModificationsDB.h
OpenMS::SpectrumMetaDataLookup
Helper class for looking up spectrum meta data.
Definition: SpectrumMetaDataLookup.h:142
OpenMS::Internal::MascotXMLHandler::date_
DateTime date_
Definition: MascotXMLHandler.h:90
AASequence.h
OpenMS::Internal::MascotXMLHandler::modified_peptides_
std::map< String, std::vector< AASequence > > & modified_peptides_
Definition: MascotXMLHandler.h:96
OpenMS::Internal::MascotXMLHandler::peptide_identification_index_
UInt peptide_identification_index_
Definition: MascotXMLHandler.h:88
OpenMS::Internal::MascotXMLHandler::date_time_string_
String date_time_string_
Definition: MascotXMLHandler.h:91
OpenMS::Internal::MascotXMLHandler::tag_
String tag_
Definition: MascotXMLHandler.h:89
PeptideIdentification.h
OpenMS::ProteinIdentification::SearchParameters
Search parameters of the DB search.
Definition: ProteinIdentification.h:258
OpenMS::Internal::MascotXMLHandler::major_version_
String major_version_
Definition: MascotXMLHandler.h:100
OpenMS::Internal::MascotXMLHandler::actual_protein_hit_
ProteinHit actual_protein_hit_
Definition: MascotXMLHandler.h:85
OpenMS::DateTime
DateTime Class.
Definition: DateTime.h:54
OpenMS::PeptideHit
Representation of a peptide hit.
Definition: PeptideHit.h:55