OpenMS
PepXMLFileMascot.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 $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 #include <OpenMS/FORMAT/XMLFile.h>
16 
17 #include <vector>
18 
19 namespace OpenMS
20 {
28  class OPENMS_DLLAPI PepXMLFileMascot :
29  protected Internal::XMLHandler,
30  public Internal::XMLFile
31  {
32 public:
33 
36 
43  void load(const String & filename, std::map<String, std::vector<AASequence> > & peptides);
44 
45 protected:
46 
47  // Docu in base class
48  void endElement(const XMLCh * const /*uri*/, const XMLCh * const /*local_name*/, const XMLCh * const qname) override;
49 
50  // Docu in base class
51  void startElement(const XMLCh * const /*uri*/, const XMLCh * const /*local_name*/, const XMLCh * const qname, const xercesc::Attributes & attributes) override;
52 
53  void matchModification_(double mass, String & modification_description);
54 
56 
57 
61 
64 
66  std::vector<std::pair<String, UInt> > actual_modifications_;
67 
69  std::map<String, std::vector<AASequence> > * peptides_;
70 
72  std::vector<AASequence> actual_aa_sequences_;
73 
75  std::vector<String> fixed_modifications_;
76 
78  std::vector<std::pair<String, double> > variable_modifications_;
80  };
81 
82 } // namespace OpenMS
83 
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:302
Used to load Mascot PepXML files.
Definition: PepXMLFileMascot.h:31
std::map< String, std::vector< AASequence > > * peptides_
The peptides together with the spectrum title.
Definition: PepXMLFileMascot.h:69
String actual_sequence_
The sequence of the actual peptide hit.
Definition: PepXMLFileMascot.h:63
String actual_title_
Pointer to fill in protein identifications.
Definition: PepXMLFileMascot.h:60
void matchModification_(double mass, String &modification_description)
void load(const String &filename, std::map< String, std::vector< AASequence > > &peptides)
Loads peptide sequences with modifications out of a PepXML file.
std::vector< std::pair< String, UInt > > actual_modifications_
The modifications of the actual peptide hit (position is 1-based)
Definition: PepXMLFileMascot.h:66
void startElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname, const xercesc::Attributes &attributes) override
PepXMLFileMascot()
Constructor.
std::vector< String > fixed_modifications_
stores the fixed residue modifications
Definition: PepXMLFileMascot.h:75
void endElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname) override
std::vector< std::pair< String, double > > variable_modifications_
stores the variable residue modifications
Definition: PepXMLFileMascot.h:78
std::vector< AASequence > actual_aa_sequences_
stores the actual peptide sequences
Definition: PepXMLFileMascot.h:72
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19