MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / START_SECTION

Function START_SECTION

src/tests/class_tests/openms/source/SqMassFile_test.cpp:140–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138TOLERANCE_RELATIVE(1.0005)
139
140START_SECTION(void load(const String& filename, MapType& map))
141{
142 MSExperiment exp;
143 SqMassFile().load(OPENMS_GET_TEST_DATA_PATH("SqliteMassFile_1.sqMass"), exp);
144
145 MSExperiment exp2;
146 MzMLFile().load(OPENMS_GET_TEST_DATA_PATH("MzMLSqliteHandler_1.mzML"),exp2);
147
148 TEST_EQUAL(exp.getNrSpectra(), exp2.getSpectra().size())
149 TEST_EQUAL(exp.getNrChromatograms(), exp2.getChromatograms().size())
150 TEST_EQUAL(exp.getNrSpectra(), 2)
151 TEST_EQUAL(exp.getNrChromatograms(), 1)
152 TEST_EQUAL(exp.getSpectrum(0) == exp2.getSpectra()[0], false) // no exact duplicate
153
154 cout.precision(17);
155
156 // Logic of comparison: if the absolute difference criterion is fulfilled,
157 // the relative one does not matter. If the absolute difference is larger
158 // than allowed, the test does not fail if the relative difference is less
159 // than allowed.
160 // Note that the sample spectrum intensity has a very large range, from
161 // 0.00013 to 183 838 intensity and encoding both values with high accuracy
162 // is difficult.
163
164 cmpDataIntensity(exp, exp2, 1e-4, 1.001);
165 cmpDataMZ(exp, exp2, 1e-5, 1.000001); // less than 1ppm error for m/z
166 cmpDataRT(exp, exp2, 0.05, 1.000001); // max 0.05 seconds error in RT
167
168 // mapping of experimental settings ...
169 TEST_EQUAL(exp.getExperimentalSettings() == (OpenMS::ExperimentalSettings)exp2, true)
170 TEST_EQUAL(exp.getSqlRunID(), exp2.getSqlRunID())
171
172}
173END_SECTION
174
175// reset error tolerances to default values

Callers 1

Calls 15

MzMLFileClass · 0.85
TEST_EQUALFunction · 0.85
getChromatogramsMethod · 0.80
precisionMethod · 0.80
getSqlRunIDMethod · 0.80
setActivationMethodsMethod · 0.80
setActivationEnergyMethod · 0.80
setPrecursorsMethod · 0.80
getChromatogramMethod · 0.80
setProductsMethod · 0.80
getActivationEnergyMethod · 0.80
getPrecursorsMethod · 0.80

Tested by

no test coverage detected