// // 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 "SamMD/stdafx.h" #include "SamMD/fastaReader.h" #include "SamMD/samReader.h" #include "SamMD/samMDlib.h" #include "SamMD/log.h" #include "SamMD/utils.h" const string Version="0.8.1"; const string ApplicationName="samMD"; const string description = " calculates the export match descriptor and adds this to the optional SAM field 'XD'"; const string parameters = " [ --help ] | [ --version ] | "; ////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { if (argc==2) { string arg2(argv[1]); if (arg2=="--version") { Log::Info( ApplicationName+" Version " + Version); return 0; } if (arg2=="--help") { Log::Info(""); Log::Info(ApplicationName + description); Log::Info(""); Log::Info("Usage: " + ApplicationName + parameters); Log::Info(""); return 0; } } if(argc!=3) { Log::Info(""); Log::Info(ApplicationName + description); Log::Info(""); Log::Info("Usage: " + ApplicationName + parameters); Log::Info(""); return 0; } Log::Initialize(); string samFileName(argv[1]); string fastaFileNames(argv[2]); SamMD SamMD(samFileName, fastaFileNames); if(SamMD.CreateMatchDescriptors()) { Log::Info(""); Log::Info("Success."); } else { Log::Info(""); Log::Info("Failed."); } return 0; }