#ifndef ALIGNCANDINDELREADSIMPL_HH_ #define ALIGNCANDINDELREADSIMPL_HH_ /** * Project : CASAVA * Module : $RCSfile: AlignCandIndelReadsImpl.hh,v $ * @author : Bret D. Barnes * Copyright : Copyright (c) Illumina 2008, 2009. 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). * */ // c++ STL include #include // CASAVA Includes #include "variance/export.h" #include "variance/tagAligner.h" //using namespace casava::common; /** * @class AlignCandIndelReadsImpl * * @brief This implements stage 2 of the indel finder * * Takes a read (export), genome sequence, insert mean and standard * deviation and realigns the tag (export) to a fragement * of the genome using local alignmnet and updates the export * fields. * */ // un-comment this to get verbose output //#define DEBUG_IDF_IMPL class AlignCandIndelReadsImpl { public: /* AlignCandIndelReadsImpl( const double mc, const double mmc, const double ec, const double oc, const double ast) : _matchCost(mc), _misMatchCost(mmc), _gapExtendCost(ec), _gapOpenCost(oc) {} */ AlignCandIndelReadsImpl( const double mc, const double mmc, const double ec, const double oc, const double ast) : // Set alignment scoring varaibles _matchCost(mc), _misMatchCost(mmc), _gapExtendCost(ec), _gapOpenCost(oc), // Set alignment score threshold _alignScoreThresh(ast), // Initialize align, out-of-bound, un-aligned counts stats variables _aCnt(0), _oCnt(0), _uCnt(0), // Initialize number of perfect count stat variable _pCnt(0), // Intialize align, out-of-bound, un-aligned score-sums stats variables _aSum(0.0), _oSum(0.0), _uSum(0.0), align(mc,mmc,ec,oc) {} void operator()(Export& record, const std::string& refSeq, const unsigned refPos); std::string toString() const; private: // Alignment score parameters const double _matchCost; const double _misMatchCost; const double _gapExtendCost; const double _gapOpenCost; // Alignment score threshold variable const double _alignScoreThresh; // Align, out-of-bound, un-aligned counts stats varaibles unsigned int _aCnt; unsigned int _oCnt; unsigned int _uCnt; // Number of perfect count stat variable unsigned int _pCnt; // Align, out-of-bound, un-aligned score-sums stats varaibles double _aSum; double _oSum; double _uSum; // tagAligner TagAligner align; }; // ~class AlignCandIndelReadsImpl /** */ #endif /*ALIGNCANDINDELREADSIMPL_HH_*/ // End of file