// -*- 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 /// #include "alignment_util.hh" #include "starling_read_util.hh" #include "starling/starling_shared.hh" #include #include void get_read_key_from_export_line(const export_line_parser& exl, std::string& key){ // note that this has been changed to the slower numerical version to // guarantee that matching reads will be identified as such even after GROUPER // removes leading zeros // std::ostringstream oss; oss << exl.machine() << '_' << exl.run_number() << ':' << exl.lane() << ':' << exl.tile() << ':' << exl.x_coordinate() << ':' << exl.y_coordinate(); key = oss.str(); } pos_t get_alignment_buffer_pos(const alignment& al){ const pos_t lead(apath_read_lead_size(al.path)); return al.pos-lead; } struct ddata { ddata(const unsigned read_size, const unsigned flank_size) : is_totaled(false), fs(flank_size), fs2(fs*2), delta_size(std::max(1+fs2,read_size)-fs2) { for(unsigned i(0);i= read_end)) continue; // allow for read end trimming const pos_t ref_pos(ref_head_pos+static_cast(j)); if(read_seq.get_char(read_pos) != ref_seq.get_char(ref_pos)){ is_mismatch[read_pos]=true; dd.inc(read_pos,1); } } read_head_pos += ps.length; ref_head_pos += ps.length; } else { assert(0); } } // set mismatch filter value: const int max_pass(static_cast(client_opt.max_win_mismatch)); for(unsigned i(0);i