ProteoWizard
|
#include "IO.hpp"
#include "Diff.hpp"
#include "References.hpp"
#include "pwiz/utility/misc/unit.hpp"
#include "pwiz/utility/misc/Std.hpp"
Go to the source code of this file.
Classes | |
class | TestIterationListener |
class | TestIterationListener_WithCancel |
Variables | |
ostream * | os_ = 0 |
const char * | bdaWithExternalMetadata |
void testObject | ( | const object_type & | a | ) |
Definition at line 42 of file IOTest.cpp.
References diff(), os_, pwiz::identdata::IO::read(), unit_assert, and pwiz::identdata::IO::write().
void testObjectWithMSData | ( | const object_type & | a, |
const MSData & | msd | ||
) |
Definition at line 68 of file IOTest.cpp.
References diff(), os_, pwiz::identdata::IO::read(), unit_assert, and pwiz::identdata::IO::write().
Referenced by testScan(), and testScanList().
void testObject_SpectrumList | ( | const SpectrumList & | a | ) |
Definition at line 93 of file IOTest.cpp.
References diff(), os_, pwiz::identdata::IO::read(), unit_assert, and pwiz::identdata::IO::write().
Referenced by testSpectrumList().
void testObject_ChromatogramList | ( | const ChromatogramList & | a | ) |
Definition at line 120 of file IOTest.cpp.
References diff(), os_, pwiz::identdata::IO::read(), unit_assert, and pwiz::identdata::IO::write().
Referenced by testChromatogramList().
void testCV | ( | ) |
Definition at line 146 of file IOTest.cpp.
References pwiz::cv::CV::fullName, pwiz::cv::CV::id, testObject(), pwiz::cv::CV::URI, and pwiz::cv::CV::version.
void testUserParam | ( | ) |
Definition at line 158 of file IOTest.cpp.
References pwiz::data::UserParam::name, testObject(), pwiz::data::UserParam::type, pwiz::data::UserParam::units, UO_minute, and pwiz::data::UserParam::value.
Referenced by test().
void testCVParam | ( | ) |
Definition at line 170 of file IOTest.cpp.
References MS_m_z, MS_selected_ion_m_z, testObject(), and UO_second.
Referenced by test().
void testParamGroup | ( | ) |
Definition at line 180 of file IOTest.cpp.
References pwiz::data::ParamContainer::cvParams, MS_ionization_type, MS_m_z, MS_selected_ion_m_z, pwiz::data::ParamContainer::paramGroupPtrs, testObject(), and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testNamedParamContainer | ( | ) |
Definition at line 192 of file IOTest.cpp.
References MS_ionization_type, MS_m_z, MS_selected_ion_m_z, and testObject().
void testSourceFile | ( | ) |
Definition at line 203 of file IOTest.cpp.
References pwiz::data::ParamContainer::cvParams, MS_ionization_type, MS_m_z, MS_selected_ion_m_z, pwiz::data::ParamContainer::paramGroupPtrs, testObject(), and pwiz::data::ParamContainer::userParams.
void testFileDescription | ( | ) |
Definition at line 214 of file IOTest.cpp.
References pwiz::msdata::FileDescription::contacts, pwiz::data::ParamContainer::cvParams, pwiz::msdata::FileDescription::fileContent, MS_contact_name, MS_MSn_spectrum, MS_SHA_1, MS_Thermo_RAW_format, pwiz::msdata::FileDescription::sourceFilePtrs, and testObject().
Referenced by test().
void testSample | ( | ) |
Definition at line 232 of file IOTest.cpp.
References pwiz::data::ParamContainer::cvParams, MS_ionization_type, MS_m_z, MS_selected_ion_m_z, pwiz::data::ParamContainer::paramGroupPtrs, testObject(), and pwiz::data::ParamContainer::userParams.
void testComponent | ( | ) |
Definition at line 243 of file IOTest.cpp.
References pwiz::msdata::ComponentType_Source, pwiz::data::ParamContainer::cvParams, MS_ionization_type, MS_m_z, MS_selected_ion_m_z, pwiz::data::ParamContainer::paramGroupPtrs, testObject(), and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testComponentList | ( | ) |
Definition at line 254 of file IOTest.cpp.
References MS_electron_multiplier, MS_nanoelectrospray, MS_quadrupole_ion_trap, and testObject().
Referenced by test().
void testSoftware | ( | ) |
Definition at line 264 of file IOTest.cpp.
References pwiz::msdata::Software::id, MS_ionization_type, pwiz::data::ParamContainer::set(), testObject(), and pwiz::msdata::Software::version.
Referenced by test().
void testInstrumentConfiguration | ( | ) |
Definition at line 274 of file IOTest.cpp.
References pwiz::msdata::InstrumentConfiguration::componentList, pwiz::data::ParamContainer::cvParams, pwiz::msdata::InstrumentConfiguration::id, MS_electron_multiplier, MS_instrument_serial_number, MS_LCQ_Deca, MS_nanoelectrospray, MS_quadrupole_ion_trap, pwiz::msdata::InstrumentConfiguration::softwarePtr, and testObject().
Referenced by test().
void testProcessingMethod | ( | ) |
Definition at line 288 of file IOTest.cpp.
References pwiz::data::ParamContainer::cvParams, MS_charge_deconvolution, MS_deisotoping, MS_peak_picking, pwiz::msdata::ProcessingMethod::order, pwiz::msdata::ProcessingMethod::softwarePtr, and testObject().
Referenced by test().
void testDataProcessing | ( | ) |
Definition at line 300 of file IOTest.cpp.
References pwiz::data::ParamContainer::cvParams, pwiz::msdata::DataProcessing::id, MS_charge_deconvolution, MS_deisotoping, MS_peak_picking, pwiz::msdata::ProcessingMethod::order, pwiz::msdata::DataProcessing::processingMethods, pwiz::msdata::ProcessingMethod::softwarePtr, testObject(), and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testScanSettings | ( | ) |
Definition at line 324 of file IOTest.cpp.
References pwiz::msdata::ScanSettings::id, MS_selected_ion_m_z, pwiz::data::ParamContainer::set(), pwiz::msdata::ScanSettings::sourceFilePtrs, pwiz::msdata::ScanSettings::targets, testObject(), and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testPrecursor | ( | ) |
Definition at line 345 of file IOTest.cpp.
References pwiz::msdata::Precursor::activation, pwiz::msdata::Precursor::isolationWindow, MS_charge_state, MS_collision_energy, MS_collision_induced_dissociation, MS_isolation_window_lower_offset, MS_isolation_window_target_m_z, MS_isolation_window_upper_offset, MS_m_z, MS_selected_ion_m_z, pwiz::msdata::Precursor::selectedIons, pwiz::data::ParamContainer::set(), pwiz::msdata::Precursor::spectrumID, and testObject().
Referenced by test().
void testProduct | ( | ) |
Definition at line 366 of file IOTest.cpp.
References pwiz::msdata::Product::isolationWindow, MS_isolation_window_lower_offset, MS_isolation_window_target_m_z, MS_isolation_window_upper_offset, MS_m_z, pwiz::data::ParamContainer::set(), and testObject().
Referenced by test().
void testScan | ( | ) |
Definition at line 378 of file IOTest.cpp.
References pwiz::data::ParamContainer::cvParams, pwiz::msdata::Scan::instrumentConfigurationPtr, MS_filter_string, MS_m_z, MS_scan_start_time, pwiz::data::ParamContainer::paramGroupPtrs, pwiz::msdata::Scan::scanWindows, testObjectWithMSData(), and UO_minute.
Referenced by test().
void testScanList | ( | ) |
Definition at line 393 of file IOTest.cpp.
References pwiz::data::ParamContainer::cvParams, MS_reflectron_off, MS_reflectron_on, MS_sum_of_spectra, pwiz::msdata::ScanList::scans, and testObjectWithMSData().
Referenced by test().
void testBinaryDataArray | ( | const BinaryDataEncoder::Config & | config | ) |
Definition at line 412 of file IOTest.cpp.
References pwiz::msdata::BinaryDataArray::data, pwiz::msdata::BinaryDataArray::dataProcessingPtr, diff(), os_, pwiz::identdata::IO::read(), unit_assert, and pwiz::identdata::IO::write().
Referenced by test(), and testBinaryDataArray().
void testBinaryDataArray | ( | ) |
Definition at line 441 of file IOTest.cpp.
References pwiz::msdata::BinaryDataEncoder::Config::byteOrder, pwiz::msdata::BinaryDataEncoder::Config::precision, and testBinaryDataArray().
void testBinaryDataArrayExternalMetadata | ( | ) |
Definition at line 466 of file IOTest.cpp.
References bdaWithExternalMetadata, pwiz::msdata::BinaryDataArray::data, MS_64_bit_float, MS_m_z_array, MS_no_compression, pwiz::msdata::MSData::paramGroupPtrs, pwiz::identdata::IO::read(), and unit_assert.
Referenced by test().
void testSpectrum | ( | ) |
Definition at line 491 of file IOTest.cpp.
References pwiz::msdata::Spectrum::binaryDataArrayPtrs, pwiz::data::ParamContainer::cvParams, pwiz::msdata::Spectrum::dataProcessingPtr, pwiz::msdata::Spectrum::defaultArrayLength, diff(), pwiz::msdata::SpectrumIdentity::id, pwiz::msdata::SpectrumIdentity::index, MS_charge_state, MS_collision_energy, MS_collision_induced_dissociation, MS_filter_string, MS_intensity_array, MS_ionization_type, MS_m_z, MS_m_z_array, MS_MSn_spectrum, MS_reflectron_on, MS_scan_start_time, MS_selected_ion_m_z, os_, pwiz::msdata::Spectrum::precursors, pwiz::msdata::Spectrum::products, pwiz::identdata::IO::read(), ReadBinaryData, pwiz::msdata::Spectrum::scanList, pwiz::msdata::ScanList::scans, pwiz::data::ParamContainer::set(), pwiz::msdata::SpectrumIdentity::sourceFilePosition, pwiz::msdata::Spectrum::sourceFilePtr, unit_assert, UO_electronvolt, and pwiz::identdata::IO::write().
Referenced by test().
void testChromatogram | ( | ) |
Definition at line 569 of file IOTest.cpp.
References pwiz::msdata::Chromatogram::binaryDataArrayPtrs, pwiz::data::ParamContainer::cvParams, pwiz::msdata::Chromatogram::dataProcessingPtr, pwiz::msdata::Chromatogram::defaultArrayLength, diff(), pwiz::msdata::ChromatogramIdentity::id, pwiz::msdata::ChromatogramIdentity::index, MS_intensity_array, MS_time_array, MS_total_ion_current_chromatogram, os_, pwiz::identdata::IO::read(), ReadBinaryData, pwiz::msdata::ChromatogramIdentity::sourceFilePosition, unit_assert, and pwiz::identdata::IO::write().
Referenced by test().
void testSpectrumList | ( | ) |
Definition at line 623 of file IOTest.cpp.
References pwiz::msdata::SpectrumListSimple::dp, pwiz::msdata::SpectrumListSimple::spectra, and testObject_SpectrumList().
Referenced by test().
void testSpectrumListWithPositions | ( | ) |
Definition at line 647 of file IOTest.cpp.
References os_, pwiz::msdata::SpectrumListSimple::spectra, unit_assert, and pwiz::identdata::IO::write().
Referenced by test().
void testSpectrumListWriteProgress | ( | ) |
Definition at line 722 of file IOTest.cpp.
References pwiz::util::IterationListenerRegistry::addListener(), TestIterationListener::indices(), TestIterationListener_WithCancel::indices(), boost::lexical_cast(), os_, pwiz::msdata::SpectrumListSimple::spectra, unit_assert, and pwiz::identdata::IO::write().
Referenced by test().
void testChromatogramList | ( | ) |
Definition at line 788 of file IOTest.cpp.
References pwiz::msdata::ChromatogramListSimple::chromatograms, pwiz::msdata::ChromatogramListSimple::dp, and testObject_ChromatogramList().
Referenced by test().
void testChromatogramListWithPositions | ( | ) |
Definition at line 810 of file IOTest.cpp.
References pwiz::msdata::ChromatogramListSimple::chromatograms, os_, unit_assert, and pwiz::identdata::IO::write().
Referenced by test().
void testRun | ( | ) |
Definition at line 847 of file IOTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::msdata::Run::chromatogramListPtr, pwiz::msdata::Run::defaultInstrumentConfigurationPtr, pwiz::msdata::Run::defaultSourceFilePtr, diff(), pwiz::msdata::Run::id, IgnoreSpectrumList, os_, pwiz::identdata::IO::read(), pwiz::msdata::Run::samplePtr, pwiz::msdata::Run::spectrumListPtr, pwiz::msdata::Run::startTimeStamp, unit_assert, and pwiz::identdata::IO::write().
Referenced by test().
void initializeTestData | ( | MSData & | msd | ) |
Definition at line 944 of file IOTest.cpp.
References pwiz::msdata::MSData::accession, pwiz::msdata::Precursor::activation, pwiz::msdata::Spectrum::binaryDataArrayPtrs, pwiz::msdata::Chromatogram::binaryDataArrayPtrs, pwiz::msdata::Run::chromatogramListPtr, pwiz::msdata::FileDescription::contacts, pwiz::cv::cv(), pwiz::data::ParamContainer::cvParams, pwiz::msdata::MSData::cvs, pwiz::msdata::MSData::dataProcessingPtrs, pwiz::msdata::Spectrum::defaultArrayLength, pwiz::msdata::Chromatogram::defaultArrayLength, pwiz::msdata::Run::defaultInstrumentConfigurationPtr, pwiz::msdata::Run::defaultSourceFilePtr, pwiz::msdata::FileDescription::fileContent, pwiz::msdata::MSData::fileDescription, pwiz::cv::CV::fullName, pwiz::msdata::SpectrumIdentity::id, pwiz::msdata::ChromatogramIdentity::id, pwiz::msdata::Run::id, pwiz::msdata::MSData::id, pwiz::cv::CV::id, pwiz::msdata::SpectrumIdentity::index, pwiz::msdata::ChromatogramIdentity::index, pwiz::msdata::Scan::instrumentConfigurationPtr, pwiz::msdata::MSData::instrumentConfigurationPtrs, MS_base_peak_intensity, MS_base_peak_m_z, MS_Bioworks, MS_centroid_spectrum, MS_charge_deconvolution, MS_charge_state, MS_collision_energy, MS_collision_induced_dissociation, MS_contact_address, MS_contact_email, MS_contact_name, MS_contact_URL, MS_Conversion_to_mzML, MS_deisotoping, MS_electron_multiplier, MS_filter_string, MS_highest_observed_m_z, MS_instrument_serial_number, MS_intensity_array, MS_LCQ_Deca, MS_lowest_observed_m_z, MS_m_z, MS_m_z_array, MS_ms_level, MS_MSn_spectrum, MS_nanoelectrospray, MS_peak_picking, MS_positive_scan, MS_pwiz, MS_quadrupole_ion_trap, MS_scan_start_time, MS_scan_window_lower_limit, MS_scan_window_upper_limit, MS_selected_ion_m_z, MS_SHA_1, MS_Thermo_RAW_format, MS_time_array, MS_total_ion_current, MS_total_ion_current_chromatogram, MS_Xcalibur, pwiz::msdata::ProcessingMethod::order, pwiz::data::ParamContainer::paramGroupPtrs, pwiz::msdata::MSData::paramGroupPtrs, pwiz::msdata::Spectrum::precursors, pwiz::msdata::MSData::run, pwiz::msdata::Run::samplePtr, pwiz::msdata::MSData::samplePtrs, pwiz::msdata::Spectrum::scanList, pwiz::msdata::ScanList::scans, pwiz::msdata::MSData::scanSettingsPtrs, pwiz::msdata::Scan::scanWindows, pwiz::msdata::Precursor::selectedIons, pwiz::data::ParamContainer::set(), pwiz::msdata::ProcessingMethod::softwarePtr, pwiz::msdata::MSData::softwarePtrs, pwiz::msdata::FileDescription::sourceFilePtrs, pwiz::msdata::Precursor::spectrumID, pwiz::msdata::Run::spectrumListPtr, pwiz::msdata::Run::startTimeStamp, UO_electronvolt, UO_minute, pwiz::cv::CV::URI, pwiz::data::ParamContainer::userParams, and pwiz::cv::CV::version.
Referenced by testMSData().
void testMSData | ( | ) |
Definition at line 1211 of file IOTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::msdata::Run::chromatogramListPtr, diff(), initializeTestData(), os_, pwiz::identdata::IO::read(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, and pwiz::identdata::IO::write().
Referenced by test().
void test | ( | ) |
Definition at line 1261 of file IOTest.cpp.
References testBinaryDataArray(), testBinaryDataArrayExternalMetadata(), testChromatogram(), testChromatogramList(), testChromatogramListWithPositions(), testComponent(), testComponentList(), testCV(), testCVParam(), testDataProcessing(), testFileDescription(), testInstrumentConfiguration(), testMSData(), testParamGroup(), testPrecursor(), testProcessingMethod(), testProduct(), testRun(), testSample(), testScan(), testScanList(), testScanSettings(), testSoftware(), testSourceFile(), testSpectrum(), testSpectrumList(), testSpectrumListWithPositions(), testSpectrumListWriteProgress(), and testUserParam().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 1302 of file IOTest.cpp.
References os_, test(), TEST_EPILOG, TEST_FAILED, and TEST_PROLOG_EX.
ostream* os_ = 0 |
Definition at line 38 of file IOTest.cpp.
const char* bdaWithExternalMetadata |
Definition at line 459 of file IOTest.cpp.
Referenced by testBinaryDataArrayExternalMetadata().