OpenMS
Loading...
Searching...
No Matches
MascotXMLHandler.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- 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
19
20#include <vector>
21
22namespace OpenMS
23{
24 namespace Internal
25 {
29 class OPENMS_DLLAPI MascotXMLHandler :
30 public XMLHandler
31 {
32public:
34 MascotXMLHandler(ProteinIdentification& protein_identification,
35 PeptideIdentificationList& identifications,
36 const std::string& filename,
37 std::map<std::string, std::vector<AASequence> >& peptides,
38 const SpectrumMetaDataLookup& lookup);
39
42
43 // Docu in base class
44 void onEndElement(const char16_t* qname) override;
45
46 // Docu in base class
47 void onStartElement(const char16_t* qname, const XMLAttributes& attributes) override;
48
49 // Docu in base class
50 void onCharacters(const char16_t* chars, Size /*length*/) override;
51
53 static std::vector<std::string> splitModificationBySpecifiedAA(const std::string& mod);
54
55private:
56
63 std::string tag_;
65 std::string date_time_string_;
68 std::string identifier_;
69 std::string actual_title_;
70 std::map<std::string, std::vector<AASequence> >& modified_peptides_;
71
73 std::string character_buffer_;
74 std::string major_version_;
75 std::string minor_version_;
76
77 // list of modifications, which cannot be set as fixed and needs
78 // to be removed, because added from mascot as variable modification
79 std::vector<std::string> remove_fixed_mods_;
80
83
86 };
87
88 } // namespace Internal
89} // namespace OpenMS
90
DateTime Class.
Definition DateTime.h:31
Handler that is used for parsing MascotXML data.
Definition MascotXMLHandler.h:31
UInt actual_query_
Definition MascotXMLHandler.h:66
PeptideEvidence actual_peptide_evidence_
Definition MascotXMLHandler.h:61
void onCharacters(const char16_t *chars, Size) override
Parsing method for character data.
std::string character_buffer_
filled by MascotXMLHandler::characters
Definition MascotXMLHandler.h:73
std::string actual_title_
Definition MascotXMLHandler.h:69
std::string identifier_
Definition MascotXMLHandler.h:68
PeptideHit actual_peptide_hit_
Definition MascotXMLHandler.h:60
ProteinIdentification::SearchParameters search_parameters_
Definition MascotXMLHandler.h:67
bool no_rt_error_
Error for missing RT information already reported?
Definition MascotXMLHandler.h:85
StringList tags_open_
tracking the current XML tree
Definition MascotXMLHandler.h:72
std::string tag_
Definition MascotXMLHandler.h:63
ProteinHit actual_protein_hit_
Definition MascotXMLHandler.h:59
PeptideIdentificationList & id_data_
the identifications (storing the peptide hits)
Definition MascotXMLHandler.h:58
std::vector< std::string > remove_fixed_mods_
Definition MascotXMLHandler.h:79
DateTime date_
Definition MascotXMLHandler.h:64
UInt peptide_identification_index_
Definition MascotXMLHandler.h:62
std::string minor_version_
Definition MascotXMLHandler.h:75
std::string major_version_
Definition MascotXMLHandler.h:74
const SpectrumMetaDataLookup & lookup_
Helper object for looking up RT information.
Definition MascotXMLHandler.h:82
std::string date_time_string_
Definition MascotXMLHandler.h:65
void onStartElement(const char16_t *qname, const XMLAttributes &attributes) override
Parsing method for opening tags.
~MascotXMLHandler() override
Destructor.
void onEndElement(const char16_t *qname) override
Parsing method for closing tags.
ProteinIdentification & protein_identification_
the protein identifications
Definition MascotXMLHandler.h:57
std::map< std::string, std::vector< AASequence > > & modified_peptides_
Definition MascotXMLHandler.h:70
static std::vector< std::string > splitModificationBySpecifiedAA(const std::string &mod)
Split modification search parameter if for more than one amino acid specified e.g....
MascotXMLHandler(ProteinIdentification &protein_identification, PeptideIdentificationList &identifications, const std::string &filename, std::map< std::string, std::vector< AASequence > > &peptides, const SpectrumMetaDataLookup &lookup)
Constructor.
Xerces-free, lightweight view over the attribute list of an XML element.
Definition XMLAttributes.h:32
Base class for XML handlers.
Definition XMLHandler.h:42
Representation of a peptide evidence.
Definition PeptideEvidence.h:28
Represents a single spectrum match (candidate) for a specific tandem mass spectrum (MS/MS).
Definition PeptideHit.h:52
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
Representation of a protein hit.
Definition ProteinHit.h:34
Representation of a protein identification run.
Definition ProteinIdentification.h:55
Helper class for looking up spectrum meta data.
Definition SpectrumMetaDataLookup.h:118
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< std::string > StringList
Vector of String.
Definition TypeAliases.h:39
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Search parameters of the DB search.
Definition ProteinIdentification.h:194