OpenMS
Loading...
Searching...
No Matches
ProtXMLFile.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: Chris Bielow $
6// $Authors: $
7// --------------------------------------------------------------------------
8
9#pragma once
10
15
16#include <vector>
17
18namespace OpenMS
19{
41 class OPENMS_DLLAPI ProtXMLFile :
42 protected Internal::XMLHandler,
44 {
45public:
46
49
52
62 void load(const String & filename, ProteinIdentification & protein_ids, PeptideIdentification & peptide_ids);
63
72 void store(const String & filename, const ProteinIdentification & protein_ids, const PeptideIdentification & peptide_ids, const String & document_id = "");
73
74protected:
75
78
80 void endElement(const XMLCh * const /*uri*/, const XMLCh * const /*local_name*/, const XMLCh * const qname) override;
81
83 void startElement(const XMLCh * const /*uri*/, const XMLCh * const /*local_name*/, const XMLCh * const qname, const xercesc::Attributes & attributes) override;
84
86 void registerProtein_(const String & protein_name);
87
100 void matchModification_(const double mass, const String & origin, String & modification_description);
101
103
104
112
113
115 };
116
117} // namespace OpenMS
118
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
Represents a single spectrum match (candidate) for a specific tandem mass spectrum (MS/MS).
Definition PeptideHit.h:52
Represents the set of candidates (SpectrumMatches) identified for a single precursor spectrum.
Definition PeptideIdentification.h:64
Used to load (storing not supported, yet) ProtXML files.
Definition ProtXMLFile.h:44
void store(const String &filename, const ProteinIdentification &protein_ids, const PeptideIdentification &peptide_ids, const String &document_id="")
[not implemented yet!] Stores the data in an ProtXML file
ProteinIdentification::ProteinGroup ProteinGroup
A protein group (set of indices into ProteinIdentification)
Definition ProtXMLFile.h:48
ProtXMLFile()
Constructor.
PeptideHit * pep_hit_
Temporary peptide hit.
Definition ProtXMLFile.h:109
void registerProtein_(const String &protein_name)
Creates a new protein entry (if not already present) and appends it to the current group.
ProteinIdentification * prot_id_
Pointer to protein identification.
Definition ProtXMLFile.h:105
void matchModification_(const double mass, const String &origin, String &modification_description)
find modification name given a modified AA mass
void load(const String &filename, ProteinIdentification &protein_ids, PeptideIdentification &peptide_ids)
Loads the identifications of an ProtXML file without identifier.
PeptideIdentification * pep_id_
Pointer to peptide identification.
Definition ProtXMLFile.h:107
ProteinGroup protein_group_
protein group
Definition ProtXMLFile.h:111
void startElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname, const xercesc::Attributes &attributes) override
Docu in base class.
void endElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname) override
Docu in base class.
void resetMembers_()
reset members after reading/writing
Bundles multiple (e.g. indistinguishable) proteins in a group.
Definition ProteinIdentification.h:109
Representation of a protein identification run.
Definition ProteinIdentification.h:54
A more convenient string class.
Definition String.h:34
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19