// -*- 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 /// /// note coding convention for all ranges '_pos fields' is: /// XXX_begin_pos is zero-indexed position at the begining of the range /// XXX_end_pos is zero-index position 1 step after the end of the range /// #include "blt_common/blt_arg_parse.hh" #include "blt_common/blt_arg_validate.hh" #include "blt_util/blt_exception.hh" #include "blt_util/log.hh" #include "blt_util/sig_handler.hh" #include "common/Exceptions.hh" #include "starling/starling_info.hh" #include "starling/starling_run.hh" #include "starling/starling_shared.hh" #include #include #include #include namespace { const prog_info& pinfo(starling_info::get()); } static void try_main(int argc,char* argv[]){ arg_data ad(argc,argv,pinfo); if((argc==1) or ((argc==2) and ((ad.argstr[1] == "-h") or (ad.argstr[1] == "-help") or (ad.argstr[1] == "--help") or (ad.argstr[1] == "-")))) pinfo.usage(); initialize_blt_signals(pinfo.name(),ad.cmdline.c_str()); starling_options client_opt; bool is_min_qscore_set(false); bool is_min_sascore_set(false); bool is_min_pascore_set(false); bool is_bacon_call_thresh(false); bool is_bacon_second_call_thresh(false); bool is_bacon_het_snp_ratio_thresh(false); bool is_contigs_set(false); bool is_contig_reads_set(false); bool is_bsnp_ssd_no_mismatch(false); bool is_bsnp_ssd_one_mismatch(false); bool is_min_can_indel_set(false); bool is_min_can_indel_frac_set(false); bool is_min_small_can_indel_frac_set(false); bool is_max_can_indel_density_set(false); bool is_max_basecall_filter_fraction(false); bool is_max_vexp_iterations(false); bool is_max_indel_size(false); for(int i(0);iMAX_DIPLOID_THETA){ std::ostringstream oss; oss << "indel diploid heterozygosity exceeds maximum value of: " << MAX_DIPLOID_THETA; pinfo.usage(oss.str().c_str()); } if(not client_opt.is_ref_set){ pinfo.usage("a reference sequence must be specified"); } if(client_opt.is_genome_size and (client_opt.genome_size<1) ) { pinfo.usage("genome-size must be greater than 0"); } // // done sanity checking arguments // if(client_opt.report_range.is_begin_pos){ client_opt.report_range.begin_pos -= 1; } starling_run(client_opt,ad.cmdline.c_str()); } static void dump_cl(int argc, char* argv[], std::ostream& os) { os << "cmdline:"; for(int i(0);i