/** * Project : CASAVA * Module : $RCSfile: AnomReadGroup.hh,v $ * @author : Tony Cox (rearranged by Richard Shaw) * Copyright : Copyright (c) Illumina 2010. All rights reserved. * ** 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). * */ /*****************************************************************************/ #ifndef ANOM_READ_GROUP_HH #define ANOM_READ_GROUP_HH /*****************************************************************************/ #include "variance/SingletonEvent.hh" #include "variance/AnomalousRead.hh" #include "variance/StatWidget.hh" /*****************************************************************************/ namespace ca { namespace variance_detection { /*****************************************************************************/ struct AnomReadGroup : public std::set { AnomReadGroup(); AnomReadGroup(AnomalousRead::Type anomReadType); void print(const unsigned int minGroupSize, unsigned int& numGroups, ostream& outstr); AnomalousRead::Type anomReadType_; StatWidget positionStats_; StatWidget minStats_; StatWidget maxStats_; }; // ~struct AnomReadGroup: public set /*****************************************************************************/ class SortAnomReadGroup { public: // TC 27.8.9 - modify to ensure forward strand groups get // put before reverse strand groups if the position is the same bool operator()(const AnomReadGroup& p1, const AnomReadGroup& p2) { return ( (p1.positionStats_.getMean()(p1.positionStats_.getMean() -p2.positionStats_.getMean())==0) && (p1.size()!=0) && (p2.size()!=0) && ((*p1.begin())->alignment_.getMatch().getStrand() == Match::Forward) && ((*p2.begin())->alignment_.getMatch().getStrand() == Match::Reverse))); } // ~operator() }; // ~ class SortAnomReadGroup /*****************************************************************************/ } // namespace variance_detection } // namespace ca /*****************************************************************************/ #endif // ! ANOM_READ_GROUP_HH /*****************************************************************************/