<commit_before>/*++

Module Name:

    snap.cpp

Abstract:

    Main entry point for the snap binary. Calls into the indexer, single-end aligner or
    paired-end aligner functions defined in other source files in this directory.

Authors:

    <NAME>, February, 2012

Environment:
`
    User mode service.

Revision History:

    Adapted from cSNAP, which was in turn adapted from the scala prototype

--*/

#include "stdafx.h"
#include "options.h"
#include "FASTA.h"
#include "GenomeIndex.h"
#include "SingleAligner.h"
#include "PairedAligner.h"
#include "exit.h"


using namespace std;

const char *SNAP_VERSION = "0.16alpha.13";

static void usage()
{
    fprintf(stderr,
            "Usage: snap <command> [<options>]\n"
            "Commands:\n"
            "   index    build a genome index\n"
            "   single   align single-end reads\n"
            "   paired   align paired-end reads\n"
            "Type a command without arguments to see its help.\n");
    soft_exit(1);
}


int main(int argc, const char **argv)
{
    printf("Welcome to SNAP version %s.\n\n", SNAP_VERSION);

    if (argc < 2) {
        usage();
    } else if (strcmp(argv[1], "index") == 0) {
        GenomeIndex::runIndexer(argc - 2, argv + 2);
    } else if (strcmp(argv[1], "single") == 0 || strcmp(argv[1], "paired") == 0) {
        for (int i = 1; i < argc; /* i is increased below */) {
            unsigned nArgsConsumed;
            if (strcmp(argv[i], "single") == 0) {
                SingleAlignerContext single;<commit_msg>Update version#<commit_after>/*++

Module Name:

    snap.cpp

Abstract:

    Main entry point for the snap binary. Calls into the indexer, single-end aligner or
    paired-end aligner functions defined in other source files in this directory.

Authors:

    <NAME>, February, 2012

Environment:
`
    User mode service.

Revision History:

    Adapted from cSNAP, which was in turn adapted from the scala prototype

--*/

#include "stdafx.h"
#include "options.h"
#include "FASTA.h"
#include "GenomeIndex.h"
#include "SingleAligner.h"
#include "PairedAligner.h"
#include "exit.h"


using namespace std;

const char *SNAP_VERSION = "0.16alpha.14";

static void usage()
{
    fprintf(stderr,
            "Usage: snap <command> [<options>]\n"
            "Commands:\n"
            "   index    build a genome index\n"
            "   single   align single-end reads\n"
            "   paired   align paired-end reads\n"
            "Type a command without arguments to see its help.\n");
    soft_exit(1);
}


int main(int argc, const char **argv)
{
    printf("Welcome to SNAP version %s.\n\n", SNAP_VERSION);

    if (argc < 2) {
        usage();
    } else if (strcmp(argv[1], "index") == 0) {
        GenomeIndex::runIndexer(argc - 2, argv + 2);
    } else if (strcmp(argv[1], "single") == 0 || strcmp(argv[1], "paired") == 0) {
        for (int i = 1; i < argc; /* i is increased below */) {
            unsigned nArgsConsumed;
            if (strcmp(argv[i], "single") == 0) {
                SingleAlignerContext single;
{'fraction_non_alphanumeric': 0.1303348653972423, 'fraction_numerical': 0.013788575180564675, 'mean_word_length': 2.5184757505773674, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2925381', 'n_tokens_mistral': 1031, 'n_tokens_neox': 979, 'n_words': 312}