// -*- mode: c++; indent-tabs-mode: nil; -*- // // Copyright 2009 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). // // /// \file /// \author Chris Saunders /// #ifndef __DIPLOID_INDEL_HH #define __DIPLOID_INDEL_HH #include "blt_util/qscore.hh" #include "boost/utility.hpp" namespace DIINDEL { enum index_t { NOINDEL, HET, HOM, SIZE }; inline const char* label(const unsigned idx){ switch(idx){ case NOINDEL: return "ref"; case HET: return "het"; case HOM: return "hom"; default: return "xxx"; } } } struct diploid_indel : private boost::noncopyable { diploid_indel() : is_indel(false), max_gt(0), max2_gt(0) { static const double p(1./static_cast(DIINDEL::SIZE)); static const int qp(error_prob_to_qphred((1.-p))); indel_qphred=qp; max_gt_qphred=qp; for(unsigned i(0);i