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

Function START_SECTION

src/tests/class_tests/openms/source/SwathFile_test.cpp:102–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100START_SECTION(([EXTRA]virtual ~SwathFile()))
101 delete swath_file_ptr;
102END_SECTION
103
104// fast
105START_SECTION(std::vector< OpenSwath::SwathMap > loadMzML(String file, String tmp, boost::shared_ptr<ExperimentalSettings>& exp_meta, String readoptions="normal") )
106{
107 Size nr_swathes = 6;
108 storeSwathFile("swathFile_1.tmp", nr_swathes);
109 boost::shared_ptr<ExperimentalSettings> meta = boost::shared_ptr<ExperimentalSettings>(new ExperimentalSettings());
110 std::vector< OpenSwath::SwathMap > maps = SwathFile().loadMzML("swathFile_1.tmp", "./", meta);
111
112 TEST_EQUAL(maps.size(), nr_swathes+1)
113 TEST_EQUAL(maps[0].ms1, true)
114 for (Size i = 0; i< nr_swathes; i++)
115 {
116 TEST_EQUAL(maps[i+1].ms1, false)
117 TEST_EQUAL(maps[i+1].sptr->getNrSpectra(), 1)
118 TEST_EQUAL(maps[i+1].sptr->getSpectrumById(0)->getMZArray()->data.size(), 1)
119 TEST_REAL_SIMILAR(maps[i+1].sptr->getSpectrumById(0)->getMZArray()->data[0], 101.0+i)
120 TEST_REAL_SIMILAR(maps[i+1].sptr->getSpectrumById(0)->getIntensityArray()->data[0], 201.0+i)
121 TEST_REAL_SIMILAR(maps[i+1].lower, 400+i*25.0)
122 TEST_REAL_SIMILAR(maps[i+1].upper, 425+i*25.0)
123 }
124}
125END_SECTION
126
127// medium (2x slower than normal mzML)

Callers 1

SwathFile_test.cppFile · 0.70

Calls 13

storeSwathFileFunction · 0.85
TEST_EQUALFunction · 0.85
storeSplitSwathFileFunction · 0.85
sortFunction · 0.85
loadMzMLMethod · 0.80
loadSplitMethod · 0.80
StringClass · 0.50
sizeMethod · 0.45
getNrSpectraMethod · 0.45
getSpectrumByIdMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected