// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ---------------------------------------------------------------------------
// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// Integrates a number of BamTools functionalities into a single executable.
// ***************************************************************************
// ---------------------------------------------------------------------------
// Integrates a number of BamTools functionalities into a single executable.
// ***************************************************************************
#include "bamtools_convert.h"
#include "bamtools_count.h"
#include "bamtools_coverage.h"
#include "bamtools_convert.h"
#include "bamtools_count.h"
#include "bamtools_coverage.h"
#include "bamtools_index.h"
#include "bamtools_merge.h"
#include "bamtools_random.h"
#include "bamtools_index.h"
#include "bamtools_merge.h"
#include "bamtools_random.h"
#include "bamtools_sort.h"
#include "bamtools_split.h"
#include "bamtools_stats.h"
#include "bamtools_sort.h"
#include "bamtools_split.h"
#include "bamtools_stats.h"
static const string INDEX = "index";
static const string MERGE = "merge";
static const string RANDOM = "random";
static const string INDEX = "index";
static const string MERGE = "merge";
static const string RANDOM = "random";
static const string SORT = "sort";
static const string SPLIT = "split";
static const string STATS = "stats";
static const string SORT = "sort";
static const string SPLIT = "split";
static const string STATS = "stats";
if ( arg == INDEX ) return new IndexTool;
if ( arg == MERGE ) return new MergeTool;
if ( arg == RANDOM ) return new RandomTool;
if ( arg == INDEX ) return new IndexTool;
if ( arg == MERGE ) return new MergeTool;
if ( arg == RANDOM ) return new RandomTool;
if ( arg == SORT ) return new SortTool;
if ( arg == SPLIT ) return new SplitTool;
if ( arg == STATS ) return new StatsTool;
if ( arg == SORT ) return new SortTool;
if ( arg == SPLIT ) return new SplitTool;
if ( arg == STATS ) return new StatsTool;
cerr << "\tindex Generates index for BAM file" << endl;
cerr << "\tmerge Merge multiple BAM files into single file" << endl;
cerr << "\trandom Select random alignments from existing BAM file(s)" << endl;
cerr << "\tindex Generates index for BAM file" << endl;
cerr << "\tmerge Merge multiple BAM files into single file" << endl;
cerr << "\trandom Select random alignments from existing BAM file(s)" << endl;
cerr << "\tsort Sorts the BAM file according to some criteria" << endl;
cerr << "\tsplit Splits a BAM file on user-specified property, creating a new BAM output file for each value found" << endl;
cerr << "\tstats Prints some basic statistics from input BAM file(s)" << endl;
cerr << endl;
cerr << "See 'bamtools help COMMAND' for more information on a specific command." << endl;
cerr << endl;
cerr << "\tsort Sorts the BAM file according to some criteria" << endl;
cerr << "\tsplit Splits a BAM file on user-specified property, creating a new BAM output file for each value found" << endl;
cerr << "\tstats Prints some basic statistics from input BAM file(s)" << endl;
cerr << endl;
cerr << "See 'bamtools help COMMAND' for more information on a specific command." << endl;
cerr << endl;
cout << "Part of BamTools API and toolkit" << endl;
cout << "Primary authors: Derek Barnett, Erik Garrison, Michael Stromberg" << endl;
cout << "Part of BamTools API and toolkit" << endl;
cout << "Primary authors: Derek Barnett, Erik Garrison, Michael Stromberg" << endl;
// 'bamtools version', 'bamtools --version', or 'bamtools -v'
if ( IsVersion(argv[1]) ) return Version();
// 'bamtools version', 'bamtools --version', or 'bamtools -v'
if ( IsVersion(argv[1]) ) return Version();