From b5265448fad1554547dcdd5dc8d95ab4ccb07972 Mon Sep 17 00:00:00 2001
From: Aaron Quinlan <aaronquinlan@gmail.com>
Date: Sun, 26 Apr 2009 12:01:06 -0400
Subject: [PATCH] Improved the usage statements in *Main.cpp

---
 src/closestBed/closestMain.cpp               | 7 +++----
 src/complementBed/complementMain.cpp         | 4 ++--
 src/coverageBed/coverageMain.cpp             | 5 +++--
 src/fastaFromBed/fastaFromBedMain.cpp        | 3 +++
 src/genomeCoverageBed/genomeCoverageMain.cpp | 4 ++++
 src/intersectBed/intersectMain.cpp           | 5 ++---
 src/mergeBed/mergeMain.cpp                   | 5 ++---
 src/windowBed/windowMain.cpp                 | 8 ++++----
 8 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/src/closestBed/closestMain.cpp b/src/closestBed/closestMain.cpp
index 3d9735cc..539c8faa 100644
--- a/src/closestBed/closestMain.cpp
+++ b/src/closestBed/closestMain.cpp
@@ -82,14 +82,13 @@ void ShowHelp(void) {
 	cerr << "===============================================" << endl << endl;
 	cerr << "Description: For each feature in BED A, finds the closest feature (upstream or downstream) in BED B" << endl;
 
-	cerr << "***NOTE: Only BED3 - BED6 formats allowed.***"<< endl << endl;
-
 	cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -a <a.bed> -b <b.bed>" << endl << endl;
 
 	cerr << "NOTES: " << endl;
-	cerr << "\t" << "-i stdin " << "allows closestBed to read BED A from stdin.  E.g.: cat a.bed | closestBed -a stdin -b B.bed" << endl << endl;
+	cerr << "\t" << "-i stdin\t\t" << "Allows BED file A to be read from stdin.  E.g.: cat a.bed | closestBed -a stdin -b B.bed" << endl << endl;
 	cerr << "\t" << "Reports \"none\" for chrom and \"-1\" for all other fields when a feature is not found in B on the same chromosome as the feature in A.  E.g. none -1 -1" << endl;
-
+	cerr << "\t***Only BED3 - BED6 formats allowed.***" << endl << endl;
+	
 	// end the program here
 	exit(1);
 
diff --git a/src/complementBed/complementMain.cpp b/src/complementBed/complementMain.cpp
index 890f909a..7be948ad 100755
--- a/src/complementBed/complementMain.cpp
+++ b/src/complementBed/complementMain.cpp
@@ -85,12 +85,12 @@ void ShowHelp(void) {
 	cerr << " Hall Laboratory, University of Virginia" << endl;
 	cerr << "===============================================" << endl << endl;
 	cerr << "Description: Returns the base pair complement of a BED file." << endl << endl;
-	cerr << "***NOTE: Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -i <input.bed> -g <genome.txt>" << endl << endl;
 	
 	cerr << "NOTES: " << endl;
-	cerr << "\t" << "-i stdin\t\t"	<< "Allows complementBed to read BED from stdin.  E.g.: cat a.bed | complementBed -i stdin" << endl << endl;
+	cerr << "\t" << "-i stdin\t\t"	<< "Allows BED file A to be read from stdin.  E.g.: cat a.bed | complementBed -a stdin -b B.bed" << endl << endl;
+	cerr << "\t***Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	// end the program here
 	exit(1);
diff --git a/src/coverageBed/coverageMain.cpp b/src/coverageBed/coverageMain.cpp
index 4dc73170..d303742e 100755
--- a/src/coverageBed/coverageMain.cpp
+++ b/src/coverageBed/coverageMain.cpp
@@ -85,11 +85,12 @@ void ShowHelp(void) {
 	cerr << " Aaron Quinlan, Ph.D. (aaronquinlan@gmail.com)  " << endl ;
 	cerr << " Hall Laboratory, University of Virginia" << endl;
 	cerr << "===============================================" << endl << endl;
-	//cerr << "Description: Reportoverlaps between a.bed and b.bed." << endl << endl;
-	cerr << "***NOTE: Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -a <a.bed> -b <b.bed>" << endl << endl;
 
+	cerr << "NOTES: " << endl;
+	cerr << "\t***Only BED3 - BED6 formats allowed.***"<< endl << endl;
+
 	//cerr << "OPTIONS: " << endl;
 	//cerr << "\t" << "-u\t\t\t"            	<< "Write ORIGINAL a.bed entry ONCE if ANY overlap bed." << endl << "\t\t\t\tIn other words, ignore multiple overlaps." << endl << endl;
 	//cerr << "\t" << "-v \t\t\t"             << "Only report those entries in A that have NO OVERLAP in B." << endl << "\t\t\t\tSimilar to grep -v." << endl << endl;
diff --git a/src/fastaFromBed/fastaFromBedMain.cpp b/src/fastaFromBed/fastaFromBedMain.cpp
index e35bc63f..79eb381a 100755
--- a/src/fastaFromBed/fastaFromBedMain.cpp
+++ b/src/fastaFromBed/fastaFromBedMain.cpp
@@ -113,6 +113,9 @@ void ShowHelp(void) {
 
 	cerr << "\nHelp:" << endl;
 	cerr << "  -h                             shows this help text" << endl;
+	
+	cerr << "NOTES: " << endl;
+	cerr << "\t***Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	// end the program here
 	exit(1);
diff --git a/src/genomeCoverageBed/genomeCoverageMain.cpp b/src/genomeCoverageBed/genomeCoverageMain.cpp
index d589070c..863dda71 100755
--- a/src/genomeCoverageBed/genomeCoverageMain.cpp
+++ b/src/genomeCoverageBed/genomeCoverageMain.cpp
@@ -117,10 +117,14 @@ void ShowHelp(void) {
 	cerr << "\tchr2\t181748087" << endl;
 	cerr << "\t..." << endl;
 	cerr << "\tchrY_random\t58682461" << endl << endl;
+	cerr << "\t***Only BED3 - BED6 formats allowed.***"<< endl << endl;	
+	
 	cerr << "TIPS:" << endl;
 	cerr << "\tOne can use the UCSC Genome Browser's MySQL database to extract chromosome sizes. For example, H. sapiens:" << endl << endl;
 	cerr << "\tmysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e \"select chrom, size from hg18.chromInfo\"  > hg18.genome" 
 		<< endl << endl;
+		
+	
 	// end the program here
 	exit(1);
 }
diff --git a/src/intersectBed/intersectMain.cpp b/src/intersectBed/intersectMain.cpp
index c66ca7f8..6732170a 100755
--- a/src/intersectBed/intersectMain.cpp
+++ b/src/intersectBed/intersectMain.cpp
@@ -134,7 +134,6 @@ void ShowHelp(void) {
 	cerr << " Hall Laboratory, University of Virginia" << endl;
 	cerr << "===============================================" << endl << endl;
 	cerr << "Description: Report overlaps between a.bed and b.bed." << endl << endl;
-	cerr << "***NOTE: Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -a <a.bed> -b <b.bed>" << endl << endl;
 
@@ -147,8 +146,8 @@ void ShowHelp(void) {
 	cerr << "\t" << "-wb \t\t\t"			<< "Write the original entry in B for each overlap." << endl << "\t\t\t\tUseful for knowing _what_ A overlaps. Restricted by -f." << endl << endl;
 
 	cerr << "NOTES: " << endl;
-	cerr << "\t" << "-i stdin\t\t"	<< "Allows intersectBed to read BED from stdin.  E.g.: cat a.bed | intersectBed -a stdin -b B.bed" << endl << endl;
-
+	cerr << "\t" << "-i stdin\t\t"	<< "Allows BED file A to be read from stdin.  E.g.: cat a.bed | intersectBed -a stdin -b B.bed" << endl << endl;
+	cerr << "\t***Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	// end the program here
 	exit(1);
diff --git a/src/mergeBed/mergeMain.cpp b/src/mergeBed/mergeMain.cpp
index d603f658..84b8db97 100755
--- a/src/mergeBed/mergeMain.cpp
+++ b/src/mergeBed/mergeMain.cpp
@@ -92,7 +92,6 @@ void ShowHelp(void) {
 	cerr << " Hall Laboratory, University of Virginia" << endl;
 	cerr << "===============================================" << endl << endl;
 	cerr << "Description: Merges overlapping bed entries into a sinle interval." << endl << endl;
-	cerr << "***NOTE: Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -i <input.bed>" << endl << endl;
 	
@@ -101,8 +100,8 @@ void ShowHelp(void) {
 	cerr << "\t" << "-d\t\t\t"      << "Maximum distance between features allowed for features to be merged. (Default=0)" << endl << endl;
 
 	cerr << "NOTES: " << endl;
-	cerr << "\t" << "-i stdin\t\t"	<< "Allows mergeBed to read BED from stdin.  E.g.: cat a.bed | mergeBed -i stdin" << endl << endl;
-
+	cerr << "\t" << "-i stdin\t\t"	<< "Allows BED file A to be read from stdin.  E.g.: cat a.bed | mergeBed -a stdin -b B.bed" << endl << endl;
+	cerr << "\t***Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	// end the program here
 	exit(1);
diff --git a/src/windowBed/windowMain.cpp b/src/windowBed/windowMain.cpp
index 3f963b50..f58f161a 100755
--- a/src/windowBed/windowMain.cpp
+++ b/src/windowBed/windowMain.cpp
@@ -24,7 +24,7 @@ int main(int argc, char* argv[]) {
 	string bedBFile;
 
 	// input arguments
-	int slop = 0;
+	int slop = 1000;
 
 	bool haveBedA = false;
 	bool haveBedB = false;
@@ -123,18 +123,18 @@ void ShowHelp(void) {
 	cerr << "Description: Examines a \"window\" around each feature in A.bed and" << endl;
 	cerr << "reports all features in B.bed that are within the window. For each overlap the entire entry in A and B are reported." 
 		 << endl << endl;
-	cerr << "***NOTE: Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 	cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -a <a.bed> -b <b.bed>" << endl << endl;
 
 	cerr << "OPTIONS: " << endl;
-	cerr << "\t" << "-w (e.g. 100000)\t"	<< "Base pairs added before and after each entry in A when searching for overlaps in B (default=0)" << endl << endl;	
+	cerr << "\t" << "-w (def. 1000)\t\t"		<< "Base pairs added before and after each entry in A when searching for overlaps in B." << endl << endl;	
 	cerr << "\t" << "-u\t\t\t"            	<< "Write ORIGINAL a.bed entry ONCE if ANY overlap with B.bed." << endl << "\t\t\t\tIn other words, just report the fact >=1 hit was found." << endl << endl;
 	cerr << "\t" << "-v \t\t\t"             << "Only report those entries in A that have NO OVERLAP in B within the requested window." << endl << "\t\t\t\tSimilar to grep -v." << endl << endl;
 	cerr << "\t" << "-c \t\t\t"				<< "For each entry in A, report the number of hits in B within the requested window." << endl << "\t\t\t\tReports 0 for A entries that have no overlap with B." << endl << endl;
 
 	cerr << "NOTES: " << endl;
-	cerr << "\t" << "-i stdin\t\t"	<< "Allows windowBed to read BED from stdin.  E.g.: cat a.bed | windowBed -a stdin -b B.bed" << endl << endl;
+	cerr << "\t" << "-i stdin\t\t"	<< "Allows BED file A to be read from stdin.  E.g.: cat a.bed | windowBed -a stdin -b B.bed" << endl << endl;
+	cerr << "\t***Only BED3 - BED6 formats allowed.***"<< endl << endl;
 
 
 	// end the program here
-- 
GitLab