| OpenMS 2.5.0

FileTypes.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-2020.
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: Timo Sachsenberg $
32 // $Authors: Andreas Bertsch, Marc Sturm, Stephan Aiche $
33 // --------------------------------------------------------------------------
34
35 #pragma once
36
37 #include <OpenMS/config.h>
38 #include <OpenMS/DATASTRUCTURES/String.h>
39
40 #include <string>
41 #include <map>
42
43 namespace OpenMS
44 {
53 struct OPENMS_DLLAPI FileTypes
54 {
55 //NOTE: if you change/add something here, do not forget to change FileTypes::initializeMap_
56
58 enum Type
59 {
60 UNKNOWN,
61 DTA,
62 DTA2D,
63 MZDATA,
64 MZXML,
65 FEATUREXML,
66 IDXML,
67 CONSENSUSXML,
68 MGF,
69 INI,
70 TOPPAS,
71 TRANSFORMATIONXML,
72 MZML,
73 CACHEDMZML,
74 MS2,
75 PEPXML,
76 PROTXML,
77 MZIDENTML,
78 MZQUANTML,
79 QCML,
80 GELML,
81 TRAML,
82 MSP,
83 OMSSAXML,
84 MASCOTXML,
85 PNG,
86 XMASS,
87 TSV,
88 MZTAB,
89 PEPLIST,
90 HARDKLOER,
91 KROENIK,
92 FASTA,
93 EDTA,
94 CSV,
95 TXT,
96 OBO,
97 HTML,
98 XML,
99 ANALYSISXML,
100 XSD,
101 PSQ,
102 MRM,
103 SQMASS,
104 PQP,
105 MS,
106 OSW,
107 PSMS,
108 PIN,
109 PARAMXML,
110 SPLIB,
111 NOVOR,
112 XQUESTXML,
113 SPECXML,
114 JSON,
115 RAW,
116 EXE,
117 SIZE_OF_TYPE
118 };
119
121 static String typeToName(Type type);
122
124 static String typeToMZML(Type type);
125
127 static Type nameToType(const String& name);
128
129 private:
131 static const std::map<Type, String> name_of_types_;
132
134 static const std::map<Type, String> name_of_MZMLtypes_;
135
137 static std::map<Type, String> initializeMap_();
138
140 static std::map<Type, String> initializeMZMLMap_();
141
142 };
143
144 } //namespace OpenMS
145
OpenMS::FileTypes::RAW
Thermo Raw File (.raw)
Definition: FileTypes.h:115
OpenMS::FileTypes::FASTA
FASTA file (.fasta)
Definition: FileTypes.h:92
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::FileTypes::MZQUANTML
mzQuantML (HUPO PSI AnalysisXML followup format) (.mzq)
Definition: FileTypes.h:78
OpenMS::FileTypes::INI
OpenMS parameters file (.ini)
Definition: FileTypes.h:69
OpenMS::FileTypes::TXT
any text format, which has only loose definition of what it actually contains – thus it is usually h...
Definition: FileTypes.h:95
OpenMS::FileTypes::TSV
any TSV file, for example msInspect file or OpenSWATH transition file (see TransitionTSVFile) ...
Definition: FileTypes.h:87
OpenMS::FileTypes::PEPXML
TPP pepXML file (.pepXML)
Definition: FileTypes.h:75
OpenMS::FileTypes::XQUESTXML
xQuest XML file format for protein-protein cross-link identifications (.xquest.xml) ...
Definition: FileTypes.h:112
OpenMS::FileTypes::DTA
DTA file (.dta)
Definition: FileTypes.h:61
OpenMS::FileTypes::OBO
Controlled Vocabulary format.
Definition: FileTypes.h:96
OpenMS::FileTypes::FEATUREXML
OpenMS feature file (.featureXML)
Definition: FileTypes.h:65
OpenMS::FileTypes::TOPPAS
OpenMS parameters file with workflow information (.toppas)
Definition: FileTypes.h:70
OpenMS::FileTypes::CONSENSUSXML
OpenMS consensus map format (.consensusXML)
Definition: FileTypes.h:67
OpenMS::FileTypes::IDXML
OpenMS identification format (.idXML)
Definition: FileTypes.h:66
OpenMS::FileTypes::CACHEDMZML
CachedMzML file (.cachedmzML)
Definition: FileTypes.h:73
OpenMS::FileTypes::EDTA
enhanced comma separated files (RT, m/z, Intensity, [meta])
Definition: FileTypes.h:93
OpenMS::FileTypes::PSQ
NCBI binary blast db.
Definition: FileTypes.h:101
OpenMS::FileTypes::ANALYSISXML
analysisXML format
Definition: FileTypes.h:99
OpenMS::FileTypes::CSV
general comma separated files format (might also be tab or space separated!!!), data should be regula...
Definition: FileTypes.h:94
OpenMS::FileTypes::SPECXML
xQuest XML file format for matched spectra for spectra visualization in the xQuest results manager (...
Definition: FileTypes.h:113
OpenMS::FileTypes::PARAMXML
internal format for writing and reading parameters (also used as part of CTD)
Definition: FileTypes.h:109
OpenMS::FileTypes::PQP
OpenSWATH Peptide Query Parameter (PQP) SQLite DB, see TransitionPQPFile.
Definition: FileTypes.h:104
OpenMS::FileTypes::TRANSFORMATIONXML
Transformation description file (.trafoXML)
Definition: FileTypes.h:71
OpenMS::FileTypes::EXE
Executable (.exe)
Definition: FileTypes.h:116
String.h
OpenMS::FileTypes::PNG
Portable Network Graphics (.png)
Definition: FileTypes.h:85
OpenMS::FileTypes::PSMS
Percolator tab-delimited output (PSM level)
Definition: FileTypes.h:107
OpenMS::FileTypes::MRM
SpectraST MRM List.
Definition: FileTypes.h:102
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::FileTypes::SQMASS
SqLite format for mass and chromatograms, see SqMassFile.
Definition: FileTypes.h:103
OpenMS::FileTypes::SPLIB
SpectraST binary spectral library file (sptxt is the equivalent text-based format, similar to the MSP format)
Definition: FileTypes.h:110
OpenMS::FileTypes::HTML
any HTML format
Definition: FileTypes.h:97
OpenMS::FileTypes::MZXML
MzXML file (.mzXML)
Definition: FileTypes.h:64
OpenMS::FileTypes::TRAML
TraML (HUPO PSI format) for transitions (.traML)
Definition: FileTypes.h:81
OpenMS::FileTypes
Centralizes the file types recognized by FileHandler.
Definition: FileTypes.h:53
OpenMS::FileTypes::name_of_MZMLtypes_
static const std::map< Type, String > name_of_MZMLtypes_
Maps the FileType::Type to the preferred mzML CV name.
Definition: FileTypes.h:134
OpenMS::FileTypes::MZTAB
mzTab file (.mzTab)
Definition: FileTypes.h:88
OpenMS::FileTypes::NOVOR
Novor custom parameter file.
Definition: FileTypes.h:111
OpenMS::FileTypes::QCML
qcML (will undergo standardisation maybe) (.qcml)
Definition: FileTypes.h:79
OpenMS::FileTypes::MGF
Mascot Generic Format (.mgf)
Definition: FileTypes.h:68
OpenMS::FileTypes::XML
any XML format
Definition: FileTypes.h:98
OpenMS::FileTypes::XMASS
XMass Analysis file (fid)
Definition: FileTypes.h:86
OpenMS::FileTypes::MZIDENTML
mzIdentML (HUPO PSI AnalysisXML followup format) (.mzid)
Definition: FileTypes.h:77
OpenMS::FileTypes::KROENIK
kroenik file (.kroenik)
Definition: FileTypes.h:91
OpenMS::FileTypes::XSD
XSD schema format.
Definition: FileTypes.h:100
OpenMS::FileTypes::Type
Type
Actual file types enum.
Definition: FileTypes.h:58
OpenMS::FileTypes::MSP
NIST spectra library file format (.msp)
Definition: FileTypes.h:82
OpenMS::FileTypes::JSON
JavaScript Object Notation file (.json)
Definition: FileTypes.h:114
OpenMS::FileTypes::GELML
GelML (HUPO PSI format) (.gelML)
Definition: FileTypes.h:80
OpenMS::FileTypes::PROTXML
TPP protXML file (.protXML)
Definition: FileTypes.h:76
OpenMS::FileTypes::OSW
OpenSWATH OpenSWATH report (OSW) SQLite DB.
Definition: FileTypes.h:106
OpenMS::FileTypes::DTA2D
DTA2D file (.dta2d)
Definition: FileTypes.h:62
OpenMS::FileTypes::UNKNOWN
Unknown file extension.
Definition: FileTypes.h:60
OpenMS::FileTypes::MZML
MzML file (.mzML)
Definition: FileTypes.h:72
OpenMS::FileTypes::PIN
Percolator tab-delimited input (PSM level)
Definition: FileTypes.h:108
OpenMS::FileTypes::name_of_types_
static const std::map< Type, String > name_of_types_
Maps the FileType::Type to the preferred extension.
Definition: FileTypes.h:131
OpenMS::FileTypes::OMSSAXML
OMSSA XML file format for peptide identifications (.xml)
Definition: FileTypes.h:83
OpenMS::FileTypes::HARDKLOER
hardkloer file (.hardkloer)
Definition: FileTypes.h:90
OpenMS::FileTypes::MS2
MS2 file (.ms2)
Definition: FileTypes.h:74
OpenMS::FileTypes::MS
SIRIUS file format (.ms)
Definition: FileTypes.h:105
OpenMS::FileTypes::MZDATA
MzData file (.mzData)
Definition: FileTypes.h:63
OpenMS::FileTypes::MASCOTXML
Mascot XML file format for peptide identifications (.xml)
Definition: FileTypes.h:84
OpenMS::FileTypes::PEPLIST
specArray file (.peplist)
Definition: FileTypes.h:89