OpenMS
Loading...
Searching...
No Matches
OMSSAXMLFile.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: Andreas Bertsch $
7// --------------------------------------------------------------------------
8
9#pragma once
10
18
19#include <vector>
20
21namespace OpenMS
22{
23 class String;
24 class ModificationsDB;
25
34 class OPENMS_DLLAPI OMSSAXMLFile :
35 protected Internal::XMLHandler,
37 {
38public:
39
42
44 ~OMSSAXMLFile() override;
62 void load(const String& filename,
63 ProteinIdentification& protein_identification,
65 bool load_proteins = true,
66 bool load_empty_hits = true);
67
70
71protected:
72 // Docu in base class
73 void endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname) override;
74
75 // Docu in base class
76 void startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const xercesc::Attributes& attributes) override;
77
78 // Docu in base class
79 void characters(const XMLCh* const chars, const XMLSize_t /*length*/) override;
80
81private:
82
84
86
89
92
94
96
98
99 std::vector<PeptideEvidence> actual_peptide_evidences_;
100
102
104
106
109
112
114 std::vector<std::pair<UInt, String> > modifications_;
115
118
121
123 std::map<UInt, std::vector<const ResidueModification*> > mods_map_;
124
126 std::map<String, UInt> mods_to_num_;
127
130 };
131
132} // namespace OpenMS
133
char16_t XMLCh
Definition ClassTest.h:28
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition XMLFile.h:23
Base class for XML handlers.
Definition XMLHandler.h:328
Definition ModificationDefinitionsSet.h:34
Used to load OMSSAXML files.
Definition OMSSAXMLFile.h:37
std::vector< PeptideEvidence > actual_peptide_evidences_
Definition OMSSAXMLFile.h:99
PeptideEvidence actual_peptide_evidence_
Definition OMSSAXMLFile.h:97
void readMappingFile_()
reads the mapping file needed for modifications
ProteinIdentification actual_protein_id_
Definition OMSSAXMLFile.h:103
PeptideIdentification actual_peptide_id_
Definition OMSSAXMLFile.h:101
std::map< UInt, std::vector< const ResidueModification * > > mods_map_
modifications mapping file from OMSSA mod num to UniMod accession
Definition OMSSAXMLFile.h:123
PeptideHit actual_peptide_hit_
Definition OMSSAXMLFile.h:95
String tag_
Definition OMSSAXMLFile.h:105
ModificationDefinitionsSet mod_def_set_
modification definitions set of the search, needed to annotate fixed modifications
Definition OMSSAXMLFile.h:129
std::map< String, UInt > mods_to_num_
modification mapping reverse, from the modification to the mod_num
Definition OMSSAXMLFile.h:126
OMSSAXMLFile()
Default constructor.
OMSSAXMLFile(const OMSSAXMLFile &rhs)
ProteinHit actual_protein_hit_
Definition OMSSAXMLFile.h:93
bool load_empty_hits_
should empty peptide identifications be loaded or skipped?
Definition OMSSAXMLFile.h:120
void startElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname, const xercesc::Attributes &attributes) override
OMSSAXMLFile & operator=(const OMSSAXMLFile &rhs)
String actual_mod_type_
type of the modification
Definition OMSSAXMLFile.h:111
void setModificationDefinitionsSet(const ModificationDefinitionsSet &rhs)
sets the valid modifications
bool load_proteins_
should protein hits be read from the file?
Definition OMSSAXMLFile.h:117
void characters(const XMLCh *const chars, const XMLSize_t) override
std::vector< std::pair< UInt, String > > modifications_
modifications of the peptide defined by site and type
Definition OMSSAXMLFile.h:114
~OMSSAXMLFile() override
Destructor.
void endElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname) override
UInt actual_mod_site_
site of the actual modification (simple position in the peptide)
Definition OMSSAXMLFile.h:108
PeptideIdentificationList * peptide_identifications_
the identifications (storing the peptide hits)
Definition OMSSAXMLFile.h:91
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
Represents the set of candidates (SpectrumMatches) identified for a single precursor spectrum.
Definition PeptideIdentification.h:64
Representation of a protein hit.
Definition ProteinHit.h:35
Representation of a protein identification run.
Definition ProteinIdentification.h:54
A more convenient string class.
Definition String.h:34
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
void load(const String &filename, ProteinIdentification &protein_identification, PeptideIdentificationList &id_data, bool load_proteins=true, bool load_empty_hits=true)
loads data from a OMSSAXML file
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19