/** ** Copyright (c) 2010 Illumina, Inc. ** ** This software is covered by the "Illumina Genome Analyzer Software ** License Agreement" and the "Illumina Source Code License Agreement", ** and certain third party copyright/licenses, and any user of this ** source file is bound by the terms therein (see accompanying files ** Illumina_Genome_Analyzer_Software_License_Agreement.pdf and ** Illumina_Source_Code_License_Agreement.pdf and third party ** copyright/license notices). ** ** This file is part of the Consensus Assessment of Sequence And VAriation ** (CASAVA) software package. ** **/ #include #include #include #include using namespace std; #include "RegistryName.hh" #include "testPairStats.hh" #include "common/RelOrient.hh" #include "common/PairStats.hh" #include "common/Exceptions.hh" CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestPairStats, registryName("PairStats")); const boost::filesystem::path projDirPath = "."; using casava::common::RelOrient; //using casava::common::LanePairStats; using casava::common::PairStats; /*****************************************************************************/ void TestPairStats::setUp() { } /*****************************************************************************/ void TestPairStats::tearDown() { } /*****************************************************************************/ void TestPairStats::testConstructor() { try { PairStats pairStats(projDirPath); } catch(const casava::common::CasavaException &e) { std::cerr << e.getContext() << ": " << e.getMessage() << std::endl; CPPUNIT_ASSERT(false); } } /*****************************************************************************/ void TestPairStats::testLoad() { PairStats pairStats(projDirPath); const float numLowSds(5); const float numHighSds(3); pairStats.setNumSds(numLowSds, numHighSds); //const std::string laneKey("EAS51_210:1"); const std::string instrument = "EAS51"; const int run = 210; const int lane = 1; const std::string barcode = "ACGTTA"; //const unsigned int read1Len(pairStats.getReadLen(instrument, run, lane, barcode, 1)); //const unsigned int read2Len(pairStats.getReadLen(instrument, run, lane, barcode, 2)); //const unsigned int expectedRead1Len(100); //const unsigned int expectedRead2Len(100); // disabling un-maintained tests //CPPUNIT_ASSERT_EQUAL(expectedRead1Len, read1Len); //CPPUNIT_ASSERT_EQUAL(expectedRead2Len, read2Len); RelOrient relOrient; double minSize(0.0); double maxSize(0.0); pairStats.getBounds(instrument, run, lane, barcode, relOrient, minSize, maxSize); RelOrient expectedRelOrient("Rp"); //CPPUNIT_ASSERT(expectedRelOrient == relOrient); //CPPUNIT_ASSERT_EQUAL(double(236.0), minSize); //CPPUNIT_ASSERT_EQUAL(double(362.0), maxSize); } /*****************************************************************************/