// // 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 Ivan Mikoulitch /// #include "SamMD2Export/stdafx.h" #include "SamMD2Export/sam2Export.h" #include "SamMD2Export/utils.h" const string ApplicationName = "samMD2Export"; const string ApplicationVersion="version 0.8.1"; const string ParameterHelp = "--help"; const string ParameterVersion = "--version"; const string ParameterPrefix = "--reference_prefix=prefix"; const string ParameterSuffix = "--reference_suffix=suffix"; const string ReferencePrefix = "--reference_prefix"; const string ReferenceSuffix = "--reference_suffix"; ////////////////////////////////////////////////////////////////////// void PrintVersion() { cout << ApplicationName << " " << ApplicationVersion << endl; } ////////////////////////////////////////////////////////////////////// void PrintUsage() { cout << endl; cout << ApplicationName << " converts SAM files to export files. Each SAM record must contain the export" << endl; cout << "match descriptor in the optional 'XD' field to be converted to an export record." << endl; cout << endl; cout << "Usage: " << ApplicationName << " ["<< ParameterHelp <<"] | [" << ParameterVersion << "] | [" << ParameterPrefix << "] [" << ParameterSuffix << "] path_to_sam_file" << endl; cout << endl; cout << "Options:" << endl; cout << " " << ParameterHelp << " Show help info."<0) prefix=prefix1; if (prefix2.size()>0) prefix=prefix2; if (suffix1.size()>0) suffix=suffix1; if (suffix2.size()>0) suffix=suffix2; PrintVersion(); Sam2Export sam2Export(sam_file_name, prefix, suffix); if(sam2Export.CreateExportFile()) { cout << endl << "Success." << endl; } // else // { // cout << endl << "Failed." << endl; // } return 0; }