Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
OMSSAXMLFile.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-2013.
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: Andreas Bertsch $
32 // $Authors: Andreas Bertsch $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_FORMAT_OMSSAXMLFILE_H
36 #define OPENMS_FORMAT_OMSSAXMLFILE_H
37 
39 #include <OpenMS/FORMAT/XMLFile.h>
45 
46 #include <vector>
47 
48 namespace OpenMS
49 {
50  class String;
51  class ModificationsDB;
52 
61  class OPENMS_DLLAPI OMSSAXMLFile :
62  protected Internal::XMLHandler,
63  public Internal::XMLFile
64  {
65 public:
66 
68  OMSSAXMLFile();
69 
71  virtual ~OMSSAXMLFile();
88  void load(const String & filename, ProteinIdentification & protein_identification, std::vector<PeptideIdentification> & id_data, bool load_proteins = true);
89 
91  void setModificationDefinitionsSet(const ModificationDefinitionsSet & rhs);
92 
93 protected:
94  // Docu in base class
95  void endElement(const XMLCh * const /*uri*/, const XMLCh * const /*local_name*/, const XMLCh * const qname);
96 
97  // Docu in base class
98  void startElement(const XMLCh * const /*uri*/, const XMLCh * const /*local_name*/, const XMLCh * const qname, const xercesc::Attributes & attributes);
99 
100  // Docu in base class
101  void characters(const XMLCh * const chars, const XMLSize_t /*length*/);
102 
103 private:
104 
105  OMSSAXMLFile(const OMSSAXMLFile & rhs);
106 
107  OMSSAXMLFile & operator=(const OMSSAXMLFile & rhs);
108 
110  void readMappingFile_();
111 
113  std::vector<PeptideIdentification> * peptide_identifications_;
114 
116 
118 
120 
122 
124 
127 
130 
132  std::vector<std::pair<UInt, String> > modifications_;
133 
136 
139 
142 
145  };
146 
147 } // namespace OpenMS
148 
149 #endif // OPENMS_FORMAT_OMSSAXMLFILE_H
Representation of a protein identification run.
Definition: ProteinIdentification.h:61
Map< UInt, std::vector< ResidueModification > > mods_map_
modifications mapping file from OMSSA mod num to UniMod accession
Definition: OMSSAXMLFile.h:138
A more convenient string class.
Definition: String.h:56
PeptideIdentification actual_peptide_id_
Definition: OMSSAXMLFile.h:119
ProteinHit actual_protein_hit_
Definition: OMSSAXMLFile.h:115
Base class for XML handlers.
Definition: XMLHandler.h:89
String actual_mod_type_
type of the modification
Definition: OMSSAXMLFile.h:129
PeptideHit actual_peptide_hit_
Definition: OMSSAXMLFile.h:117
Representation of a peptide hit.
Definition: PeptideHit.h:54
Representation of a set of modification definitions.
Definition: ModificationDefinitionsSet.h:57
Map< String, UInt > mods_to_num_
modification mapping reverse, from the modification to the mod_num
Definition: OMSSAXMLFile.h:141
Used to load OMSSAXML files.
Definition: OMSSAXMLFile.h:61
Representation of a protein hit.
Definition: ProteinHit.h:54
String tag_
Definition: OMSSAXMLFile.h:123
std::vector< PeptideIdentification > * peptide_identifications_
the identifications (storing the peptide hits)
Definition: OMSSAXMLFile.h:113
ProteinIdentification actual_protein_id_
Definition: OMSSAXMLFile.h:121
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:51
UInt actual_mod_site_
site of the actual modification (simple position in the peptide)
Definition: OMSSAXMLFile.h:126
ModificationDefinitionsSet mod_def_set_
modification definitions set of the search, needed to annotate fixed modifications ...
Definition: OMSSAXMLFile.h:144
Map class based on the STL map (containing serveral convenience functions)
Definition: Map.h:50
std::vector< std::pair< UInt, String > > modifications_
modifications of the peptide defined by site and type
Definition: OMSSAXMLFile.h:132
bool load_proteins_
should protein hits be read from the file?
Definition: OMSSAXMLFile.h:135
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:63

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:18 using doxygen 1.8.5