28 #include "boost/iostreams/positioning.hpp"
29 #include "boost/filesystem/path.hpp"
32 using namespace pwiz::util;
33 using namespace pwiz::analysis;
34 using namespace pwiz::data;
35 using namespace pwiz::data::peakdata;
36 using namespace pwiz::msdata;
38 namespace bfs = boost::filesystem;
54 fabs(a->retentionTime - b->retentionTime) <
rt_epsilon;
64 if (
os_) *
os_ <<
"testFeatureDetectorSimple() ... " << endl;
73 config.
cp = CalibrationParameters::thermo_FT();
79 MSDataFile msd((datadir /
"FeatureDetectorTest_Bombesin.mzML").
string());
82 fds.
detect(msd, output_features);
87 bombesin2_truth->mz = 810.4148;
88 bombesin2_truth->retentionTime = 1866;
90 FeatureField::iterator bombesin2_hopeful = find_if(output_features.begin(), output_features.end(),
mzrtEqual(bombesin2_truth));
93 unit_assert(bombesin2_hopeful != output_features.end());
96 if (
os_) *
os_ <<
"\n[FeatureDetectorSimple] Bombesin detected at charge state +2 ... " << endl << *bombesin2_hopeful << endl;
102 bombesin3_truth->mz = 540.6123;
103 bombesin3_truth->retentionTime = 1866;
105 FeatureField::iterator bombesin3_hopeful = find_if(output_features.begin(), output_features.end(),
mzrtEqual(bombesin3_truth));
108 unit_assert(bombesin3_hopeful != output_features.end());
111 if (
os_) *
os_ <<
"\n[FeatureDetectorSimple] Bombesin detected at charge state +3 ... " << endl << *bombesin3_hopeful << endl;
117 int main(
int argc,
char* argv[])
123 bfs::path datadir =
".";
125 for (
int i=1; i<argc; i++)
127 if (!strcmp(argv[i],
"-v"))
133 datadir = bfs::path(argv[i]).branch_path();