OpenMS
MascotXMLHandler.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, 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: Nico Pfeifer, Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
18 
19 #include <vector>
20 
21 namespace OpenMS
22 {
23  namespace Internal
24  {
28  class OPENMS_DLLAPI MascotXMLHandler :
29  public XMLHandler
30  {
31 public:
33  MascotXMLHandler(ProteinIdentification& protein_identification,
34  std::vector<PeptideIdentification>& identifications,
35  const String& filename,
36  std::map<String, std::vector<AASequence> >& peptides,
37  const SpectrumMetaDataLookup& lookup);
38 
40  ~MascotXMLHandler() override;
41 
42  // Docu in base class
43  void endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname) override;
44 
45  // Docu in base class
46  void startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const xercesc::Attributes& attributes) override;
47 
48  // Docu in base class
49  void characters(const XMLCh* const chars, const XMLSize_t /*length*/) override;
50 
52  static std::vector<String> splitModificationBySpecifiedAA(const String& mod);
53 
54 private:
55 
57  std::vector<PeptideIdentification>& id_data_;
69  std::map<String, std::vector<AASequence> >& modified_peptides_;
70 
75 
76  // list of modifications, which cannot be set as fixed and needs
77  // to be removed, because added from mascot as variable modification
78  std::vector<String> remove_fixed_mods_;
79 
82 
85  };
86 
87  } // namespace Internal
88 } // namespace OpenMS
89 
DateTime Class.
Definition: DateTime.h:33
Handler that is used for parsing MascotXML data.
Definition: MascotXMLHandler.h:30
String minor_version_
Definition: MascotXMLHandler.h:74
UInt actual_query_
Definition: MascotXMLHandler.h:65
PeptideEvidence actual_peptide_evidence_
Definition: MascotXMLHandler.h:60
String major_version_
Definition: MascotXMLHandler.h:73
static std::vector< String > splitModificationBySpecifiedAA(const String &mod)
Split modification search parameter if for more than one amino acid specified e.g....
std::map< String, std::vector< AASequence > > & modified_peptides_
Definition: MascotXMLHandler.h:69
PeptideHit actual_peptide_hit_
Definition: MascotXMLHandler.h:59
ProteinIdentification::SearchParameters search_parameters_
Definition: MascotXMLHandler.h:66
bool no_rt_error_
Error for missing RT information already reported?
Definition: MascotXMLHandler.h:84
String tag_
Definition: MascotXMLHandler.h:62
String date_time_string_
Definition: MascotXMLHandler.h:64
String actual_title_
Definition: MascotXMLHandler.h:68
StringList tags_open_
tracking the current XML tree
Definition: MascotXMLHandler.h:71
std::vector< PeptideIdentification > & id_data_
the identifications (storing the peptide hits)
Definition: MascotXMLHandler.h:57
ProteinHit actual_protein_hit_
Definition: MascotXMLHandler.h:58
MascotXMLHandler(ProteinIdentification &protein_identification, std::vector< PeptideIdentification > &identifications, const String &filename, std::map< String, std::vector< AASequence > > &peptides, const SpectrumMetaDataLookup &lookup)
Constructor.
void startElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname, const xercesc::Attributes &attributes) override
DateTime date_
Definition: MascotXMLHandler.h:63
UInt peptide_identification_index_
Definition: MascotXMLHandler.h:61
const SpectrumMetaDataLookup & lookup_
Helper object for looking up RT information.
Definition: MascotXMLHandler.h:81
void characters(const XMLCh *const chars, const XMLSize_t) override
String character_buffer_
filled by MascotXMLHandler::characters
Definition: MascotXMLHandler.h:72
~MascotXMLHandler() override
Destructor.
void endElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname) override
ProteinIdentification & protein_identification_
the protein identifications
Definition: MascotXMLHandler.h:56
std::vector< String > remove_fixed_mods_
Definition: MascotXMLHandler.h:78
String identifier_
Definition: MascotXMLHandler.h:67
Base class for XML handlers.
Definition: XMLHandler.h:300
Representation of a peptide evidence.
Definition: PeptideEvidence.h:25
Representation of a peptide hit.
Definition: PeptideHit.h:31
Representation of a protein hit.
Definition: ProteinHit.h:34
Representation of a protein identification run.
Definition: ProteinIdentification.h:50
Helper class for looking up spectrum meta data.
Definition: SpectrumMetaDataLookup.h:117
A more convenient string class.
Definition: String.h:34
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:44
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
Search parameters of the DB search.
Definition: ProteinIdentification.h:247