Author: Michael R. Crusoe
Description: Change the name of program in docs
Forwarded: https://github.com/amplab/snap/pull/59
--- snap-aligner.orig/SNAPLib/AlignerContext.cpp
+++ snap-aligner/SNAPLib/AlignerContext.cpp
@@ -396,9 +396,9 @@
     AlignerOptions *options;
 
     if (paired) {
-        options = new PairedAlignerOptions("snap paired <index-dir> <inputFile(s)> [<options>] where <input file(s)> is a list of files to process.\n");
+        options = new PairedAlignerOptions("snap-aligner paired <index-dir> <inputFile(s)> [<options>] where <input file(s)> is a list of files to process.\n");
     } else {
-        options = new AlignerOptions("snap single <index-dir> <inputFile(s)> [<options>] where <input file(s)> is a list of files to process.\n");
+        options = new AlignerOptions("snap-aligner single <index-dir> <inputFile(s)> [<options>] where <input file(s)> is a list of files to process.\n");
     }
 
     options->extra = extension->extraOptions();
--- snap-aligner.orig/SNAPLib/AlignerOptions.cpp
+++ snap-aligner/SNAPLib/AlignerOptions.cpp
@@ -200,7 +200,7 @@
                 "alignment, followed by a comma (separated by a space from the other parameters) followed by the\n"
                 "parameters for the next alignment (including single or paired).  You may have as many of these\n"
                 "as you please.  If two consecutive alignments use the same index, it will not be reloaded.\n"
-                "So, for example, you could do 'snap single hg19-20 foo.fq -o foo.sam , paired hg19-20 end1.fq end2.fq -o paired.sam'\n"
+                "So, for example, you could do 'snap-aligner single hg19-20 foo.fq -o foo.sam , paired hg19-20 end1.fq end2.fq -o paired.sam'\n"
                 "and it would not reload the index between the single and paired alignments.\n",
                 "SNAP doesn't parse the options for later runs until the earlier ones have completed, so if you make\n"
                 "an error in one, it may take a while for you to notice.  So, be careful (or check back shortly after\n"
@@ -225,7 +225,7 @@
                       "explicitly specify the type.  But really, that's just confusing and you shouldn't do it.\n"
                       "Input and output may also be from/to stdin/stdout. To do that, use a - for the input or output file\n"
                       "name and give an explicit type specifier.  So, for example, \n"
-                      "snap single myIndex -fastq - -o -sam -\n"
+                      "snap-aligner aligner single myIndex -fastq - -o -sam -\n"
                       "would read FASTQ from stdin and write SAM to stdout.\n"
     );
 }
@@ -957,7 +957,7 @@
         }
     } else {
         if (snapFile->isStdio) {
-            WriteErrorMessage("Stdio IO always requires an explicit file type.  So, for example, do 'snap single index-directory -fastq -' to read FASTQ from stdin\n");
+            WriteErrorMessage("Stdio IO always requires an explicit file type.  So, for example, do 'snap-aligner single index-directory -fastq -' to read FASTQ from stdin\n");
         } else {
             WriteErrorMessage("Unknown file type for file name '%s', please specify file type with -fastq, -sam, -bam, etc.\n", snapFile->fileName);
         }
--- snap-aligner.orig/SNAPLib/CommandProcessor.cpp
+++ snap-aligner/SNAPLib/CommandProcessor.cpp
@@ -40,7 +40,7 @@
 static void usage()
 {
 	WriteErrorMessage(
-		"Usage: snap <command> [<options>]\n"
+		"Usage: snap-aligner <command> [<options>]\n"
 		"Commands:\n"
 		"   index    build a genome index\n"
 		"   single   align single-end reads\n"
@@ -57,7 +57,7 @@
 			//
 			// The error cases in index build don't really free memory properly, so we just don't allows it in daemon mode.
 			//
-			WriteErrorMessage("The index command is not available in daemon mode.  Please run 'snap index' directly.\n");
+			WriteErrorMessage("The index command is not available in daemon mode.  Please run 'snap-aligner index' directly.\n");
 		}
 	} else if (strcmp(argv[1], "single") == 0 || strcmp(argv[1], "paired") == 0) {
 		for (int i = 1; i < argc; /* i is increased below */) {
@@ -84,7 +84,7 @@
 
 static void daemonUsage()
 {
-	fprintf(stderr, "Usage: snap daemon [Named pipe name]\n");
+	fprintf(stderr, "Usage: snap-aligner daemon [Named pipe name]\n");
 	soft_exit_no_print(1);    // Don't use soft_exit, it's confusing people to get an "error" message after the usage
 }
 
--- snap-aligner.orig/SNAPLib/GenomeIndex.cpp
+++ snap-aligner/SNAPLib/GenomeIndex.cpp
@@ -51,7 +51,7 @@
 static void usage()
 {
 	WriteErrorMessage(
-		"Usage: snap index <input.fa> <output-dir> [<options>]\n"
+		"Usage: snap-aligner index <input.fa> <output-dir> [<options>]\n"
 		"Options:\n"
 		"  -s               Seed size (default: %d)\n"
 		"  -h               Hash table slack (default: %.1f)\n"
