ProteoWizard
Diff.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Darren Kessner <darren@proteowizard.org>
6//
7// Copyright 2007 Spielberg Family Center for Applied Proteomics
8// Cedars-Sinai Medical Center, Los Angeles, California 90048
9//
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13//
14// http://www.apache.org/licenses/LICENSE-2.0
15//
16// Unless required by applicable law or agreed to in writing, software
17// distributed under the License is distributed on an "AS IS" BASIS,
18// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19// See the License for the specific language governing permissions and
20// limitations under the License.
21//
22
23
24#ifndef _DIFF_HPP_
25#define _DIFF_HPP_
26
27
29#include "MSData.hpp"
30
31
32namespace pwiz { namespace msdata { struct DiffConfig; } }
33
34
35namespace pwiz {
36namespace data {
37namespace diff_impl {
38
39
40using namespace msdata;
41
42
44void diff(const SourceFile& a,
45 const SourceFile& b,
46 SourceFile& a_b,
47 SourceFile& b_a,
48 const DiffConfig& config);
49
51void diff(const FileDescription& a,
52 const FileDescription& b,
53 FileDescription& a_b,
54 FileDescription& b_a,
55 const DiffConfig& config);
56
58void diff(const Sample& a,
59 const Sample& b,
60 Sample& a_b,
61 Sample& b_a,
62 const DiffConfig& config);
63
65void diff(const Component& a,
66 const Component& b,
67 Component& a_b,
68 Component& b_a,
69 const DiffConfig& config);
70
72void diff(const ComponentList& a,
73 const ComponentList& b,
74 ComponentList& a_b,
75 ComponentList& b_a,
76 const DiffConfig& config);
77
79void diff(const Software& a,
80 const Software& b,
81 Software& a_b,
82 Software& b_a,
83 const DiffConfig& config);
84
90 const DiffConfig& config);
91
93void diff(const ProcessingMethod& a,
94 const ProcessingMethod& b,
97 const DiffConfig& config);
98
100void diff(const DataProcessing& a,
101 const DataProcessing& b,
102 DataProcessing& a_b,
103 DataProcessing& b_a,
104 const DiffConfig& config);
105
107void diff(const ScanSettings& a,
108 const ScanSettings& b,
109 ScanSettings& a_b,
110 ScanSettings& b_a,
111 const DiffConfig& config);
112
114void diff(const Precursor& a,
115 const Precursor& b,
116 Precursor& a_b,
117 Precursor& b_a,
118 const DiffConfig& config);
119
121void diff(const Product& a,
122 const Product& b,
123 Product& a_b,
124 Product& b_a,
125 const DiffConfig& config);
126
128void diff(const Scan& a,
129 const Scan& b,
130 Scan& a_b,
131 Scan& b_a,
132 const DiffConfig& config);
133
135void diff(const ScanList& a,
136 const ScanList& b,
137 ScanList& a_b,
138 ScanList& b_a,
139 const DiffConfig& config);
140
142void diff(const BinaryDataArray& a,
143 const BinaryDataArray& b,
144 BinaryDataArray& a_b,
145 BinaryDataArray& b_a,
146 const DiffConfig& config);
147
149void diff(const Spectrum& a,
150 const Spectrum& b,
151 Spectrum& a_b,
152 Spectrum& b_a,
153 const DiffConfig& config);
154
156void diff(const Chromatogram& a,
157 const Chromatogram& b,
158 Chromatogram& a_b,
159 Chromatogram& b_a,
160 const DiffConfig& config);
161
163void diff(const SpectrumList& a,
164 const SpectrumList& b,
167 const DiffConfig& config);
168
170void diff(const ChromatogramList& a,
171 const ChromatogramList& b,
174 const DiffConfig& config);
175
177void diff(const Run& a,
178 const Run& b,
179 Run& a_b,
180 Run& b_a,
181 const DiffConfig& config);
182
184void diff(const MSData& a,
185 const MSData& b,
186 MSData& a_b,
187 MSData& b_a,
188 const DiffConfig& config);
189
190
191} // namespace diff_impl
192} // namespace data
193} // namespace pwiz
194
195
196// this include must come after the above declarations or GCC won't see them
198
199
200namespace pwiz {
201namespace msdata {
202
203
204/// configuration struct for diffing MSData types
206{
207 /// ignore members of SpectrumIdentity and ChromatogramIdentity
209
210 /// ignore all file level metadata, and most scan level metadata,
211 /// i.e. verify scan binary data, plus important scan metadata:
212 /// - msLevel
213 /// - precursor.ionSelection
215
216 /// ignore arrays like mobility, charge state, noise, SNR, etc.
218
221
223
225 : pwiz::data::BaseDiffConfig(),
226 ignoreIdentity(false),
227 ignoreMetadata(false),
228 ignoreExtraBinaryDataArrays(false),
229 ignoreSpectra(false),
230 ignoreChromatograms(false),
231 ignoreDataProcessing(false)
232 {}
233};
234
235
237
238
239} // namespace msdata
240} // namespace pwiz
241
242
243#endif // _DIFF_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
void diff(const string &filename1, const string &filename2)
Interface for accessing chromatograms, which may be stored in memory or backed by a data file (RAW,...
Definition MSData.hpp:757
Interface for accessing spectra, which may be stored in memory or backed by a data file (RAW,...
Definition MSData.hpp:661
PWIZ_API_DECL void diff(const std::string &a, const std::string &b, std::string &a_b, std::string &b_a, const BaseDiffConfig &config)
std::ostream & operator<<(std::ostream &os, const Diff< object_type, config_type > &diff)
stream insertion of Diff results
Definition diff_std.hpp:200
Calculate diffs of objects in a ProteoWizard data model hierarchy.
Definition diff_std.hpp:143
Implementation of the SampleType from the mzIdentML schema.
The structure into which encoded binary data goes. Byte ordering is always little endian (Intel style...
Definition MSData.hpp:405
A single chromatogram.
Definition MSData.hpp:578
Simple writeable in-memory implementation of ChromatogramList.
Definition MSData.hpp:791
A component of an instrument corresponding to a source (i.e. ion source), an analyzer (i....
Definition MSData.hpp:132
List with the different components used in the mass spectrometer. At least one source,...
Definition MSData.hpp:157
Description of the way in which a particular software was used.
Definition MSData.hpp:274
configuration struct for diffing MSData types
Definition Diff.hpp:206
bool ignoreMetadata
ignore all file level metadata, and most scan level metadata, i.e.
Definition Diff.hpp:214
bool ignoreExtraBinaryDataArrays
ignore arrays like mobility, charge state, noise, SNR, etc.
Definition Diff.hpp:217
bool ignoreIdentity
ignore members of SpectrumIdentity and ChromatogramIdentity
Definition Diff.hpp:208
Information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
Definition MSData.hpp:85
Description of a particular hardware configuration of a mass spectrometer. Each configuration MUST ha...
Definition MSData.hpp:230
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition MSData.hpp:850
The method of precursor ion selection and activation.
Definition MSData.hpp:312
Description of the default peak processing method. This element describes the base method used in the...
Definition MSData.hpp:255
product ion information
Definition MSData.hpp:348
A run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
Definition MSData.hpp:810
Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile.
Definition MSData.hpp:370
List and descriptions of scans.
Definition MSData.hpp:396
Description of the acquisition settings of the instrument prior to the start of the run.
Definition MSData.hpp:207
A piece of software.
Definition MSData.hpp:180
The structure that captures the generation of a peak list (including the underlying acquisitions)
Definition MSData.hpp:506
Simple writeable in-memory implementation of SpectrumList.
Definition MSData.hpp:717