Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
MascotXMLHandler.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2015.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Nico Pfeifer $
32 // $Authors: Nico Pfeifer, Chris Bielow $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H
36 #define OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H
37 
44 
45 #include <vector>
46 #include <boost/regex.hpp>
47 
48 namespace OpenMS
49 {
50  namespace Internal
51  {
55  class OPENMS_DLLAPI MascotXMLHandler :
56  public XMLHandler
57  {
58 public:
59 
61 
63  MascotXMLHandler(ProteinIdentification& protein_identification,
64  std::vector<PeptideIdentification>& identifications,
65  const String& filename,
66  std::map<String, std::vector<AASequence> >& peptides,
67  const RTMapping& rt_mapping = RTMapping(),
68  const String& scan_regex = "");
69 
71  virtual ~MascotXMLHandler();
72 
73  // Docu in base class
74  virtual void endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname);
75 
76  // Docu in base class
77  virtual void startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const xercesc::Attributes& attributes);
78 
79  // Docu in base class
80  virtual void characters(const XMLCh* const chars, const XMLSize_t /*length*/);
81 
82  // Primary regex used to extract a scan number (for use by PepXMLFile)
83  static const String primary_scan_regex;
84 
85 private:
86 
88  std::vector<PeptideIdentification>& id_data_;
100  std::map<String, std::vector<AASequence> >& modified_peptides_;
101 
106 
107  const RTMapping& rt_mapping_;
108 
112  std::vector<boost::regex> scan_regex_;
113 
116  };
117 
118  } // namespace Internal
119 } // namespace OpenMS
120 
121 #endif // OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H
Representation of a protein identification run.
Definition: ProteinIdentification.h:61
A more convenient string class.
Definition: String.h:57
String date_time_string_
Definition: MascotXMLHandler.h:95
StringList tags_open_
tracking the current XML tree
Definition: MascotXMLHandler.h:102
String minor_version_
Definition: MascotXMLHandler.h:105
String actual_title_
Definition: MascotXMLHandler.h:99
Base class for XML handlers.
Definition: XMLHandler.h:99
ProteinIdentification & protein_identification_
the protein identifications
Definition: MascotXMLHandler.h:87
ProteinHit actual_protein_hit_
Definition: MascotXMLHandler.h:89
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Handler that is used for parsing MascotXML data.
Definition: MascotXMLHandler.h:55
Search parameters of the DB search.
Definition: ProteinIdentification.h:117
bool no_rt_error_
Error for missing RT information already reported?
Definition: MascotXMLHandler.h:115
String tag_
Definition: MascotXMLHandler.h:93
String major_version_
Definition: MascotXMLHandler.h:104
DateTime date_
Definition: MascotXMLHandler.h:94
PeptideEvidence actual_peptide_evidence_
Definition: MascotXMLHandler.h:91
Representation of a peptide hit.
Definition: PeptideHit.h:55
Representation of a peptide evidence.
Definition: PeptideEvidence.h:51
UInt actual_query_
Definition: MascotXMLHandler.h:96
std::vector< PeptideIdentification > & id_data_
the identifications (storing the peptide hits)
Definition: MascotXMLHandler.h:88
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:74
Representation of a protein hit.
Definition: ProteinHit.h:54
UInt peptide_identification_index_
Definition: MascotXMLHandler.h:92
std::vector< boost::regex > scan_regex_
List of possible Perl-style regular expressions used to extract the scan number (named group "SCAN") ...
Definition: MascotXMLHandler.h:112
DateTime Class.
Definition: DateTime.h:55
String identifier_
Definition: MascotXMLHandler.h:98
const RTMapping & rt_mapping_
Definition: MascotXMLHandler.h:107
PeptideHit actual_peptide_hit_
Definition: MascotXMLHandler.h:90
Map< Size, float > RTMapping
Definition: MascotXMLHandler.h:60
ProteinIdentification::SearchParameters search_parameters_
Definition: MascotXMLHandler.h:97
String character_buffer_
filled by MascotXMLHandler::characters
Definition: MascotXMLHandler.h:103
Map class based on the STL map (containing several convenience functions)
Definition: Map.h:51
static const String primary_scan_regex
Definition: MascotXMLHandler.h:83
std::map< String, std::vector< AASequence > > & modified_peptides_
Definition: MascotXMLHandler.h:100

OpenMS / TOPP release 2.0.0 Documentation generated on Sat May 16 2015 16:13:24 using doxygen 1.8.9.1