29 #include "boost/foreach_field.hpp" 40 void test(
const string& filepath,
const ReaderList& readerList,
int& testCount)
43 const double EPSILON = 1e-4;
44 ostringstream failedTests;
52 if (bal::ends_with(filepath,
"ImsSynth_Chrom.d"))
75 else if (bal::ends_with(filepath,
"HDMSe_Short_noLM.raw"))
92 else if (bal::ends_with(filepath,
"MSe_Short.raw"))
97 else if (bal::ends_with(filepath,
"HDMSe_Short_noLM.mzML"))
108 throw runtime_error(
"Unhandled test file: " + filepath);
110 if (!failedTests.str().empty())
111 throw runtime_error(failedTests.str());
117 void parseArgs(
const vector<string>& args, vector<string>& rawpaths)
119 for (
size_t i = 1; i < args.size(); ++i)
121 if (args[i] ==
"-v")
os_ = &cout;
122 else if (bal::starts_with(args[i],
"--"))
continue;
123 else rawpaths.push_back(args[i]);
128 int main(
int argc,
char* argv[])
134 vector<string> args(argv, argv+argc);
135 vector<string> rawpaths;
141 for (
const string& filepath : rawpaths)
143 test(filepath, readerList, testCount);
const int EXPECTED_TEST_COUNT
SpectrumList implementation that provides access to vendor-specific ion mobility functions.
a virtual container of integers, accessible via an iterator interface, stored as union of intervals ...
virtual IonMobilityUnits getIonMobilityUnits() const
Reader container (composite pattern).
#define unit_assert_equal_to_stream(x, y, epsilon, os)
virtual double ionMobilityToCCS(double ionMobility, double mz, int charge) const
returns collisional cross-section associated with the ion mobility (units depend on IonMobilityEquipm...
default ReaderList, extended to include vendor readers
virtual bool canConvertIonMobilityAndCCS(IonMobilityUnits units) const
returns true if file in question contains necessary information for CCS/IonMobility handling (as with...
#define unit_assert_operator_equal(expected, actual)
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
boost::shared_ptr< SpectrumList > SpectrumListPtr
MSData object plus file I/O.
int main(int argc, char *argv[])
void test(const string &filepath, const ReaderList &readerList, int &testCount)
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
#define unit_assert_to_stream(x, os)
#define TEST_PROLOG(argc, argv)
#define unit_assert_operator_equal_to_stream(expected, actual, os)
SpectrumList filter, for creating Spectrum sub-lists.
void parseArgs(const vector< string > &args, vector< string > &rawpaths)
virtual double ccsToIonMobility(double ccs, double mz, int charge) const
returns the ion mobility (units depend on IonMobilityEquipment) associated with the given collisional...