// -*- 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 __SNP_POS_INFO_HH #define __SNP_POS_INFO_HH #include "blt_util/qscore.hh" #include "blt_util/seq_util.hh" #include "stdint.h" #include #include //#define BC_DEBUG struct base_call { base_call(const uint8_t init_base_id, const uint8_t init_qscore, const bool init_ifs, #ifdef BC_DEBUG const unsigned init_read_pos, const unsigned init_read_pos, #else const unsigned, const unsigned, #endif const bool init_is_call_filter, const bool init_is_neighbor_mismatch) : qscore(init_qscore), #ifdef BC_DEBUG read_pos(init_read_pos), read_size(init_read_size), #endif base_id(init_base_id), is_fwd_strand(init_ifs), is_neighbor_mismatch(init_is_neighbor_mismatch), is_call_filter(init_is_call_filter) {} double error_prob() const { return qphred_to_error_prob(static_cast(qscore)); } uint16_t qscore:8; uint16_t base_id:4; uint16_t is_fwd_strand:1; uint16_t is_neighbor_mismatch:1; uint16_t is_call_filter:1; // filtered from snp-calling #ifdef BC_DEBUG uint16_t read_pos; // zero-indexed cycle number uint16_t read_size; #endif }; std::ostream& operator<<(std::ostream& os,const base_call& bc); struct snp_pos_info { snp_pos_info() { clear(); } void clear() { ref_base='N'; calls.clear(); is_n_ref_warn=false; } char ref_base; // always fwd-strand base bool is_n_ref_warn; std::vector calls; }; std::ostream& operator<<(std::ostream& os,const snp_pos_info& pci); #endif