ProteoWizard
|
#include "Diff.hpp"
#include "TextWriter.hpp"
#include "examples.hpp"
#include "pwiz/utility/misc/unit.hpp"
#include "pwiz/utility/misc/Std.hpp"
#include <cstring>
Go to the source code of this file.
Classes | |
struct | MSDataWithSettableVersion |
Functions | |
void | testFileContent () |
void | testSourceFile () |
void | testFileDescription () |
void | testSample () |
void | testComponent () |
void | testSource () |
void | testComponentList () |
void | testSoftware () |
void | testInstrumentConfiguration () |
void | testProcessingMethod () |
void | testDataProcessing () |
void | testScanSettings () |
void | testPrecursor () |
void | testProduct () |
void | testScan () |
void | testScanList () |
void | testBinaryDataArray () |
void | testSpectrum () |
void | testChromatogram () |
void | testSpectrumList () |
void | testChromatogramList () |
void | testRun () |
void | testMSData () |
void | testBinaryDataOnly () |
template<typename list_type > | |
double | getMaxPrecisionDiff (const list_type &list) |
void | testMaxPrecisionDiff () |
void | testMSDiffUpdate () |
void | test () |
int | main (int argc, char *argv[]) |
Variables | |
ostream * | os_ = 0 |
static const char * | userParamName_MaxBinaryDataArrayDifference_ = "Maximum binary data array difference" |
void testFileContent | ( | ) |
Definition at line 41 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, diff(), os_, unit_assert, and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testSourceFile | ( | ) |
Definition at line 66 of file DiffTest.cpp.
References diff(), pwiz::identdata::SourceFile::location, os_, unit_assert, and pwiz::data::ParamContainer::userParams.
void testFileDescription | ( | ) |
Definition at line 84 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, pwiz::msdata::FileDescription::contacts, pwiz::data::ParamContainer::cvParams, diff(), pwiz::msdata::FileDescription::fileContent, MS_contact_name, MS_Thermo_RAW_file, os_, pwiz::msdata::FileDescription::sourceFilePtrs, unit_assert, and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testSample | ( | ) |
Definition at line 138 of file DiffTest.cpp.
References diff(), MS_peak_intensity, os_, unit_assert, and pwiz::data::ParamContainer::userParams.
void testComponent | ( | ) |
Definition at line 156 of file DiffTest.cpp.
References diff(), pwiz::msdata::Component::order, os_, unit_assert, and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testSource | ( | ) |
Definition at line 175 of file DiffTest.cpp.
References diff(), pwiz::msdata::Component::order, os_, unit_assert, and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testComponentList | ( | ) |
Definition at line 194 of file DiffTest.cpp.
References pwiz::msdata::ComponentType_Analyzer, pwiz::msdata::ComponentType_Detector, pwiz::msdata::ComponentType_Source, diff(), os_, and unit_assert.
Referenced by test().
void testSoftware | ( | ) |
Definition at line 227 of file DiffTest.cpp.
References diff(), pwiz::msdata::Software::id, MS_ionization_type, os_, pwiz::data::ParamContainer::set(), unit_assert, and pwiz::msdata::Software::version.
void testInstrumentConfiguration | ( | ) |
Definition at line 249 of file DiffTest.cpp.
References pwiz::msdata::InstrumentConfiguration::componentList, pwiz::data::ParamContainer::cvParams, pwiz::msdata::ComponentList::detector(), diff(), pwiz::msdata::InstrumentConfiguration::id, MS_electron_multiplier, MS_instrument_serial_number, MS_LCQ_Deca, MS_nanoelectrospray, MS_quadrupole_ion_trap, MS_reflectron_off, pwiz::msdata::Component::order, os_, pwiz::data::ParamContainer::set(), pwiz::msdata::InstrumentConfiguration::softwarePtr, pwiz::msdata::ComponentList::source(), and unit_assert.
Referenced by test().
void testProcessingMethod | ( | ) |
Definition at line 281 of file DiffTest.cpp.
References diff(), pwiz::msdata::ProcessingMethod::order, os_, pwiz::msdata::ProcessingMethod::softwarePtr, unit_assert, and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testDataProcessing | ( | ) |
Definition at line 311 of file DiffTest.cpp.
References diff(), pwiz::msdata::DataProcessing::id, os_, pwiz::msdata::DataProcessing::processingMethods, pwiz::msdata::ProcessingMethod::softwarePtr, unit_assert, and pwiz::data::ParamContainer::userParams.
Referenced by test().
void testScanSettings | ( | ) |
Definition at line 349 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, diff(), pwiz::msdata::ScanSettings::id, os_, pwiz::msdata::ScanSettings::sourceFilePtrs, pwiz::msdata::ScanSettings::targets, and unit_assert.
Referenced by test().
void testPrecursor | ( | ) |
Definition at line 375 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::msdata::Precursor::activation, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, pwiz::data::ParamContainer::cvParam(), pwiz::data::ParamContainer::cvParams, diff(), pwiz::msdata::Precursor::isolationWindow, MS_ionization_type, MS_m_z, MS_reflectron_off, MS_reflectron_on, os_, pwiz::msdata::Precursor::selectedIons, pwiz::data::ParamContainer::set(), pwiz::msdata::Precursor::spectrumID, unit_assert, pwiz::data::ParamContainer::userParams, and pwiz::data::CVParam::valueAs().
Referenced by test().
void testProduct | ( | ) |
Definition at line 407 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, pwiz::data::ParamContainer::cvParams, diff(), pwiz::msdata::Product::isolationWindow, MS_ionization_type, MS_m_z, os_, pwiz::data::ParamContainer::set(), and unit_assert.
Referenced by test().
void testScan | ( | ) |
Definition at line 430 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, pwiz::data::ParamContainer::cvParams, diff(), pwiz::msdata::Scan::instrumentConfigurationPtr, MS_ionization_type, MS_m_z, os_, pwiz::msdata::Scan::scanWindows, and unit_assert.
void testScanList | ( | ) |
Definition at line 456 of file DiffTest.cpp.
References pwiz::data::ParamContainer::cvParams, diff(), MS_filter_string, MS_reflectron_on, MS_scan_start_time, os_, pwiz::msdata::ScanList::scans, pwiz::data::ParamContainer::set(), unit_assert, and UO_minute.
Referenced by test().
void testBinaryDataArray | ( | ) |
Definition at line 487 of file DiffTest.cpp.
References pwiz::msdata::BinaryDataArray::data, pwiz::msdata::BinaryDataArray::dataProcessingPtr, diff(), e(), os_, pwiz::data::BaseDiffConfig::precision, and unit_assert.
Referenced by test(), and testBinaryDataArray().
void testSpectrum | ( | ) |
Definition at line 521 of file DiffTest.cpp.
References pwiz::msdata::Spectrum::binaryDataArrayPtrs, pwiz::msdata::Spectrum::dataProcessingPtr, pwiz::msdata::Spectrum::defaultArrayLength, diff(), e(), pwiz::msdata::SpectrumIdentity::id, pwiz::msdata::SpectrumIdentity::index, MS_filter_string, MS_ionization_type, MS_m_z, MS_scan_start_time, os_, pwiz::data::BaseDiffConfig::precision, pwiz::msdata::Spectrum::precursors, pwiz::msdata::Spectrum::products, pwiz::msdata::Spectrum::scanList, pwiz::msdata::ScanList::scans, pwiz::msdata::Spectrum::sourceFilePtr, unit_assert, and UO_minute.
void testChromatogram | ( | ) |
Definition at line 600 of file DiffTest.cpp.
References pwiz::msdata::Chromatogram::binaryDataArrayPtrs, pwiz::msdata::Chromatogram::dataProcessingPtr, diff(), e(), pwiz::msdata::ChromatogramIdentity::id, pwiz::msdata::ChromatogramIdentity::index, os_, pwiz::data::BaseDiffConfig::precision, and unit_assert.
Referenced by test().
void testSpectrumList | ( | ) |
Definition at line 637 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, diff(), pwiz::msdata::SpectrumListSimple::dp, e(), os_, pwiz::data::BaseDiffConfig::precision, pwiz::msdata::SpectrumListSimple::spectra, and unit_assert.
Referenced by test().
void testChromatogramList | ( | ) |
Definition at line 725 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, pwiz::msdata::ChromatogramListSimple::chromatograms, diff(), pwiz::msdata::ChromatogramListSimple::dp, e(), os_, pwiz::data::BaseDiffConfig::precision, and unit_assert.
Referenced by test().
void testRun | ( | ) |
Definition at line 828 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, pwiz::msdata::Run::chromatogramListPtr, pwiz::msdata::Run::defaultInstrumentConfigurationPtr, pwiz::msdata::Run::defaultSourceFilePtr, diff(), pwiz::msdata::Run::id, os_, pwiz::msdata::Run::samplePtr, pwiz::msdata::Run::spectrumListPtr, pwiz::msdata::Run::startTimeStamp, and unit_assert.
Referenced by test().
void testMSData | ( | ) |
Definition at line 888 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::msdata::MSData::accession, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, pwiz::data::ParamContainer::cvParams, pwiz::msdata::MSData::cvs, pwiz::msdata::MSData::dataProcessingPtrs, diff(), pwiz::msdata::FileDescription::empty(), pwiz::msdata::Run::empty(), pwiz::msdata::FileDescription::fileContent, pwiz::msdata::MSData::fileDescription, pwiz::msdata::Run::id, pwiz::msdata::MSData::id, pwiz::msdata::MSData::instrumentConfigurationPtrs, MS_reflectron_on, os_, pwiz::msdata::MSData::paramGroupPtrs, pwiz::msdata::MSData::run, pwiz::msdata::MSData::samplePtrs, pwiz::msdata::MSData::scanSettingsPtrs, pwiz::msdata::MSData::softwarePtrs, unit_assert, and MSDataWithSettableVersion::version().
Referenced by test().
void testBinaryDataOnly | ( | ) |
Definition at line 951 of file DiffTest.cpp.
References pwiz::msdata::Run::chromatogramListPtr, pwiz::identdata::examples::initializeTiny(), os_, pwiz::msdata::MSData::run, pwiz::msdata::Precursor::selectedIons, pwiz::msdata::Run::spectrumListPtr, and unit_assert.
Referenced by test().
double getMaxPrecisionDiff | ( | const list_type & | list | ) |
Definition at line 1032 of file DiffTest.cpp.
References userParamName_MaxBinaryDataArrayDifference_.
Referenced by testMaxPrecisionDiff().
void testMaxPrecisionDiff | ( | ) |
Definition at line 1042 of file DiffTest.cpp.
References pwiz::data::Diff< object_type, config_type, object_result_type >::a_b, pwiz::data::Diff< object_type, config_type, object_result_type >::b_a, pwiz::msdata::Run::chromatogramListPtr, diff(), e(), epsilon, getMaxPrecisionDiff(), boost::lexical_cast(), os_, pwiz::data::BaseDiffConfig::precision, pwiz::msdata::Run::spectrumListPtr, unit_assert, unit_assert_equal, pwiz::data::ParamContainer::userParam(), pwiz::data::ParamContainer::userParams, and pwiz::data::UserParam::value.
Referenced by test().
void testMSDiffUpdate | ( | ) |
Definition at line 1261 of file DiffTest.cpp.
References pwiz::msdata::Run::chromatogramListPtr, pwiz::msdata::Run::id, pwiz::msdata::MSData::id, pwiz::identdata::examples::initializeTiny(), os_, pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, and unit_assert.
Referenced by test().
void test | ( | ) |
Definition at line 1309 of file DiffTest.cpp.
References testBinaryDataArray(), testBinaryDataOnly(), testChromatogram(), testChromatogramList(), testComponent(), testComponentList(), testDataProcessing(), testFileContent(), testFileDescription(), testInstrumentConfiguration(), testMaxPrecisionDiff(), testMSData(), testMSDiffUpdate(), testPrecursor(), testProcessingMethod(), testProduct(), testRun(), testSample(), testScan(), testScanList(), testScanSettings(), testSoftware(), testSource(), testSourceFile(), testSpectrum, and testSpectrumList().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 1340 of file DiffTest.cpp.
References e(), os_, test(), TEST_EPILOG, TEST_FAILED, and TEST_PROLOG_EX.
ostream* os_ = 0 |
Definition at line 38 of file DiffTest.cpp.
|
static |
Definition at line 1028 of file DiffTest.cpp.
Referenced by getMaxPrecisionDiff().