Commit 5827f9c1 authored by Aaron Quinlan's avatar Aaron Quinlan
Browse files

Merge pull request #239 from nkindlon/master

fixed sample and coverage unit tests, fixed up CommonHelp for all PFM tools
parents 54f37afb 60022b90
/*
* closestHelp.cpp
*
* Created on: Apr 22, 2015
* Author: nek3d
*/
#include "CommonHelp.h"
void closest_help(void) {
cerr << "\nTool: bedtools closest (aka closestBed)" << endl;
cerr << "Version: " << VERSION << "\n";
cerr << "Summary: For each feature in A, finds the closest " << endl;
cerr << "\t feature (upstream or downstream) in B." << endl << endl;
cerr << "Usage: " << "bedtools closest" << " [OPTIONS] -a <bed/gff/vcf> -b <bed/gff/vcf>" << endl << endl;
cerr << "Options: " << endl;
cerr << "\t-s\t" << "Req. same strandedness. That is, find the closest feature in" << endl;
cerr << "\t\tB that overlaps A on the _same_ strand." << endl;
cerr << "\t\t- By default, overlaps are reported without respect to strand." << endl << endl;
cerr << "\t-S\t" << "Req. opposite strandedness. That is, find the closest feature" << endl;
cerr << "\t\tin B that overlaps A on the _opposite_ strand." << endl;
cerr << "\t\t- By default, overlaps are reported without respect to strand." << endl << endl;
cerr << "\t-d\t" << "In addition to the closest feature in B, " << endl;
cerr << "\t\treport its distance to A as an extra column." << endl;
cerr << "\t\t- The reported distance for overlapping features will be 0." << endl << endl;
cerr << "\t-D\t" << "Like -d, report the closest feature in B, and its distance to A" << endl;
cerr << "\t\tas an extra column. Unlike -d, use negative distances to report" << endl;
cerr << "\t\tupstream features." << endl;
cerr << "\t\tThe options for defining which orientation is \"upstream\" are:" << endl;
cerr << "\t\t- \"ref\" Report distance with respect to the reference genome. " << endl;
cerr << "\t\t B features with a lower (start, stop) are upstream" << endl;
cerr << "\t\t- \"a\" Report distance with respect to A." << endl;
cerr << "\t\t When A is on the - strand, \"upstream\" means B has a" << endl;
cerr << "\t\t higher (start,stop)." << endl;
cerr << "\t\t- \"b\" Report distance with respect to B." << endl;
cerr << "\t\t When B is on the - strand, \"upstream\" means A has a" << endl;
cerr << "\t\t higher (start,stop)." << endl << endl;
cerr << "\t-io\t" << "Ignore features in B that overlap A. That is, we want close," << endl;
cerr << "\t\tyet not touching features only." << endl << endl;
cerr << "\t-iu\t" << "Ignore features in B that are upstream of features in A." << endl;
cerr << "\t\tThis option requires -D and follows its orientation" << endl;
cerr << "\t\trules for determining what is \"upstream\"." << endl << endl;
cerr << "\t-id\t" << "Ignore features in B that are downstream of features in A." << endl;
cerr << "\t\tThis option requires -D and follows its orientation" << endl;
cerr << "\t\trules for determining what is \"downstream\"." << endl << endl;
cerr << "\t-fu\t" << "Choose first from features in B that are upstream of features in A." << endl;
cerr << "\t\tThis option requires -D and follows its orientation" << endl;
cerr << "\t\trules for determining what is \"upstream\"." << endl << endl;
cerr << "\t-fd\t" << "Choose first from features in B that are downstream of features in A." << endl;
cerr << "\t\tThis option requires -D and follows its orientation" << endl;
cerr << "\t\trules for determining what is \"downstream\"." << endl << endl;
cerr << "\t-t\t" << "How ties for closest feature are handled. This occurs when two" << endl;
cerr << "\t\tfeatures in B have exactly the same \"closeness\" with A." << endl;
cerr << "\t\tBy default, all such features in B are reported." << endl;
cerr << "\t\tHere are all the options:" << endl;
cerr << "\t\t- \"all\" Report all ties (default)." << endl;
cerr << "\t\t- \"first\" Report the first tie that occurred in the B file." << endl;
cerr << "\t\t- \"last\" Report the last tie that occurred in the B file." << endl << endl;
cerr << "\t-mdb\t" << "How multiple databases are resolved." << endl;
cerr << "\t\t- \"each\" Report closest records for each database (default)." << endl;
cerr << "\t\t- \"all\" Report closest records among all databases." << endl << endl;
cerr << "\t-names\t" << "When using multiple databases (-b), provide an alias for each that" << endl;
cerr <<"\t\twill appear instead of a fileId when also printing the DB record." << endl << endl;
cerr << "\t-filenames" << "\tWhen using multiple databases (-b), show each complete filename" << endl;
cerr <<"\t\t\tinstead of a fileId when also printing the DB record." << endl << endl;
cerr << "\t-k\t" << "Report the k closest hits. Default is 1. If tieMode = \"all\", " << endl;
cerr << "\t\t- all ties will still be reported." << endl << endl;
cerr << "\t-N\t" << "Require that the query and the closest hit have different names." << endl;
cerr << "\t\tFor BED, the 4th column is compared." << endl << endl;
cerr << "\t-header\t" << "Print the header from the A file prior to results." << endl << endl;
cerr << "\t-nonamecheck\t" << "For sorted data, don't throw an error if the file has different naming conventions" << endl;
cerr << "\t\t\tfor the same chromosome. ex. \"chr1\" vs \"chr01\"." << endl << endl;
cerr << "Notes: " << endl;
cerr << "\tReports \"none\" for chrom and \"-1\" for all other fields when a feature" << endl;
cerr << "\tis not found in B on the same chromosome as the feature in A." << endl;
cerr << "\tE.g. none\t-1\t-1" << endl << endl;
// end the program here
exit(1);
}
/*
* closestHelp.cpp
*
* Created on: Apr 22, 2015
* Author: nek3d
*/
#include "CommonHelp.h"
void closest_help(void) {
cerr << "\nTool: bedtools closest (aka closestBed)" << endl;
cerr << "Version: " << VERSION << "\n";
cerr << "Summary: For each feature in A, finds the closest " << endl;
cerr << "\t feature (upstream or downstream) in B." << endl << endl;
cerr << "Usage: " << "bedtools closest" << " [OPTIONS] -a <bed/gff/vcf> -b <bed/gff/vcf>" << endl << endl;
cerr << "Options: " << endl;
cerr << "\t-d\t" << "In addition to the closest feature in B, " << endl;
cerr << "\t\treport its distance to A as an extra column." << endl;
cerr << "\t\t- The reported distance for overlapping features will be 0." << endl << endl;
cerr << "\t-D\t" << "Like -d, report the closest feature in B, and its distance to A" << endl;
cerr << "\t\tas an extra column. Unlike -d, use negative distances to report" << endl;
cerr << "\t\tupstream features." << endl;
cerr << "\t\tThe options for defining which orientation is \"upstream\" are:" << endl;
cerr << "\t\t- \"ref\" Report distance with respect to the reference genome. " << endl;
cerr << "\t\t B features with a lower (start, stop) are upstream" << endl;
cerr << "\t\t- \"a\" Report distance with respect to A." << endl;
cerr << "\t\t When A is on the - strand, \"upstream\" means B has a" << endl;
cerr << "\t\t higher (start,stop)." << endl;
cerr << "\t\t- \"b\" Report distance with respect to B." << endl;
cerr << "\t\t When B is on the - strand, \"upstream\" means A has a" << endl;
cerr << "\t\t higher (start,stop)." << endl << endl;
cerr << "\t-io\t" << "Ignore features in B that overlap A. That is, we want close," << endl;
cerr << "\t\tyet not touching features only." << endl << endl;
cerr << "\t-iu\t" << "Ignore features in B that are upstream of features in A." << endl;
cerr << "\t\tThis option requires -D and follows its orientation" << endl;
cerr << "\t\trules for determining what is \"upstream\"." << endl << endl;
cerr << "\t-id\t" << "Ignore features in B that are downstream of features in A." << endl;
cerr << "\t\tThis option requires -D and follows its orientation" << endl;
cerr << "\t\trules for determining what is \"downstream\"." << endl << endl;
cerr << "\t-fu\t" << "Choose first from features in B that are upstream of features in A." << endl;
cerr << "\t\tThis option requires -D and follows its orientation" << endl;
cerr << "\t\trules for determining what is \"upstream\"." << endl << endl;
cerr << "\t-fd\t" << "Choose first from features in B that are downstream of features in A." << endl;
cerr << "\t\tThis option requires -D and follows its orientation" << endl;
cerr << "\t\trules for determining what is \"downstream\"." << endl << endl;
cerr << "\t-t\t" << "How ties for closest feature are handled. This occurs when two" << endl;
cerr << "\t\tfeatures in B have exactly the same \"closeness\" with A." << endl;
cerr << "\t\tBy default, all such features in B are reported." << endl;
cerr << "\t\tHere are all the options:" << endl;
cerr << "\t\t- \"all\" Report all ties (default)." << endl;
cerr << "\t\t- \"first\" Report the first tie that occurred in the B file." << endl;
cerr << "\t\t- \"last\" Report the last tie that occurred in the B file." << endl << endl;
cerr << "\t-mdb\t" << "How multiple databases are resolved." << endl;
cerr << "\t\t- \"each\" Report closest records for each database (default)." << endl;
cerr << "\t\t- \"all\" Report closest records among all databases." << endl << endl;
cerr << "\t-k\t" << "Report the k closest hits. Default is 1. If tieMode = \"all\", " << endl;
cerr << "\t\t- all ties will still be reported." << endl << endl;
cerr << "\t-N\t" << "Require that the query and the closest hit have different names." << endl;
cerr << "\t\tFor BED, the 4th column is compared." << endl << endl;
IntersectCommonHelp();
allToolsCommonHelp();
cerr << "Notes: " << endl;
cerr << "\tReports \"none\" for chrom and \"-1\" for all other fields when a feature" << endl;
cerr << "\tis not found in B on the same chromosome as the feature in A." << endl;
cerr << "\tE.g. none\t-1\t-1" << endl << endl;
// end the program here
exit(1);
}
......@@ -23,16 +23,6 @@ void coverage_help(void) {
cerr << "Options: " << endl;
cerr << "\t-abam\t" << "The A input file is in BAM format. Replaces -a." << endl << endl;
cerr << "\t-s\t" << "Require same strandedness. That is, only counts hits in A that" << endl;
cerr << "\t\toverlap B on the _same_ strand." << endl;
cerr << "\t\t- By default, overlaps are counted without respect to strand." << endl << endl;
cerr << "\t-S\t" << "Require different strandedness. That is, only report hits in A" << endl;
cerr << "\t\tthat overlap B on the _opposite_ strand." << endl;
cerr << "\t\t- By default, overlaps are counted without respect to strand." << endl << endl;
cerr << "\t-hist\t" << "Report a histogram of coverage for each feature in B" << endl;
cerr << "\t\tas well as a summary histogram for _all_ features in B." << endl << endl;
cerr << "\t\tOutput (tab delimited) after each feature in B:" << endl;
......@@ -44,42 +34,10 @@ void coverage_help(void) {
cerr << "\t-counts\t" << "Only report the count of overlaps, don't compute fraction, etc." << endl << endl;
cerr << "\t-split\t" << "Treat \"split\" BAM or BED12 entries as distinct BED intervals." << endl;
cerr << "\t\twhen computing coverage." << endl;
cerr << "\t\tFor BAM files, this uses the CIGAR \"N\" and \"D\" operations " << endl;
cerr << "\t\tto infer the blocks for computing coverage." << endl;
cerr << "\t\tFor BED12 files, this uses the BlockCount, BlockStarts," << endl;
cerr << "\t\tand BlockEnds fields (i.e., columns 10,11,12)." << endl << endl;
cerr << "\t-sorted\t" << "Use the \"chromsweep\" algorithm for sorted (-k1,1 -k2,2n) input." << endl << endl;
cerr << "\t-g\t" << "Provide a genome file to enforce consistent chromosome sort order" << endl;
cerr <<"\t\tacross input files. Only applies when used with -sorted option." << endl << endl;
cerr << "\t-header\t" << "Print the header from the A file prior to results." << endl << endl;
cerr << "\t-nobuf\t" << "Disable buffered output. Using this option will cause each line"<< endl;
cerr <<"\t\tof output to be printed as it is generated, rather than saved" << endl;
cerr <<"\t\tin a buffer. This will make printing large output files " << endl;
cerr <<"\t\tnoticeably slower, but can be useful in conjunction with" << endl;
cerr <<"\t\tother software tools and scripts that need to process one" << endl;
cerr <<"\t\tline of bedtools output at a time." << endl << endl;
cerr << "\t-names\t" << "When using multiple databases, provide an alias for each that" << endl;
cerr <<"\t\twill appear instead of a fileId when also printing the DB record." << endl << endl;
cerr << "\t-filenames" << "\tWhen using multiple databases, show each complete filename" << endl;
cerr <<"\t\t\tinstead of a fileId when also printing the DB record." << endl << endl;
cerr << "\t-sortout\t" << "When using multiple databases, sort the output DB hits" << endl;
cerr << "\t\t\tfor each record." << endl << endl;
cerr << "\t-nonamecheck\t" << "For sorted data, don't throw an error if the file has different naming conventions" << endl;
cerr << "\t\t\tfor the same chromosome. ex. \"chr1\" vs \"chr01\"." << endl << endl;
CommonHelp();
IntersectCommonHelp();
sortedHelp();
allToolsCommonHelp();
cerr << "Default Output: " << endl;
cerr << "\t" << " After each entry in A, reports: " << endl;
......
......@@ -12,30 +12,12 @@ void fisher_help(void) {
cerr << "Options: " << endl;
cerr << "\t-f\t" << "Minimum overlap required as a fraction of A." << endl;
cerr << "\t\t- Default is 1E-9 (i.e., 1bp)." << endl;
cerr << "\t\t- FLOAT (e.g. 0.50)" << endl << endl;
cerr << "\t-m\t" << "Merge overlapping intervals before" << endl;
cerr << "\t\t- looking at overlap." << endl << endl;
cerr << "\t-r\t" << "Require that the fraction overlap be reciprocal for A and B." << endl;
cerr << "\t\t- In other words, if -f is 0.90 and -r is used, this requires" << endl;
cerr << "\t\t that B overlap 90% of A and A _also_ overlaps 90% of B." << endl << endl;
cerr << "\t-split\t" << "Treat \"split\" BAM or BED12 entries as distinct BED intervals." << endl << endl;
cerr << "\t-s\t" << "Force strandedness. That is, only merge features" << endl;
cerr << "\t\tthat are on the same strand." << endl;
cerr << "\t\t- By default, merging is done without respect to strand." << endl << endl;
cerr << "\t-S\t" << "Force merge for one specific strand only." << endl;
cerr << "\t\t" << "Follow with + or - to force merge from only" << endl;
cerr << "\t\t" << "the forward or reverse strand, respectively." << endl;
cerr << "\t\t" << "- By default, merging is done without respect to strand." << endl << endl;
IntersectCommonHelp();
allToolsCommonHelp();
cerr << "\t-nonamecheck\t" << "For sorted data, don't throw an error if the file has different naming conventions" << endl;
cerr << "\t\t\tfor the same chromosome. ex. \"chr1\" vs \"chr01\"." << endl << endl;
cerr << "Notes: " << endl;
cerr << "\t(1) Input files must be sorted by chrom, then start position."
......
......@@ -28,88 +28,12 @@ void intersect_help(void) {
// -abam is obsolete.
// cerr << "\t-abam\t" << "The A input file is in BAM format. Output will be BAM as well." << endl << endl;
cerr << "\t-ubam\t" << "Write uncompressed BAM output. Default writes compressed BAM." << endl << endl;
cerr << "\t-bed\t" << "When using BAM input (-abam), write output as BED. The default" << endl;
cerr << "\t\tis to write output in BAM when using -abam." << endl << endl;
IntersectOutputHelp();
IntersectCommonHelp();
cerr << "\t-wa\t" << "Write the original entry in A for each overlap." << endl << endl;
cerr << "\t-wb\t" << "Write the original entry in B for each overlap." << endl;
cerr << "\t\t- Useful for knowing _what_ A overlaps. Restricted by -f and -r." << endl << endl;
cerr << "\t-loj\t" << "Perform a \"left outer join\". That is, for each feature in A" << endl;
cerr << "\t\treport each overlap with B. If no overlaps are found, " << endl;
cerr << "\t\treport a NULL feature for B." << endl << endl;
cerr << "\t-wo\t" << "Write the original A and B entries plus the number of base" << endl;
cerr << "\t\tpairs of overlap between the two features." << endl;
cerr << "\t\t- Overlaps restricted by -f and -r." << endl;
cerr << "\t\t Only A features with overlap are reported." << endl << endl;
cerr << "\t-wao\t" << "Write the original A and B entries plus the number of base" << endl;
cerr << "\t\tpairs of overlap between the two features." << endl;
cerr << "\t\t- Overlapping features restricted by -f and -r." << endl;
cerr << "\t\t However, A features w/o overlap are also reported" << endl;
cerr << "\t\t with a NULL B feature and overlap = 0." << endl << endl;
cerr << "\t-u\t" << "Write the original A entry _once_ if _any_ overlaps found in B." << endl;
cerr << "\t\t- In other words, just report the fact >=1 hit was found." << endl;
cerr << "\t\t- Overlaps restricted by -f and -r." << endl << endl;
cerr << "\t-c\t" << "For each entry in A, report the number of overlaps with B." << endl;
cerr << "\t\t- Reports 0 for A entries that have no overlap with B." << endl;
cerr << "\t\t- Overlaps restricted by -f and -r." << endl << endl;
cerr << "\t-v\t" << "Only report those entries in A that have _no overlaps_ with B." << endl;
cerr << "\t\t- Similar to \"grep -v\" (an homage)." << endl << endl;
cerr << "\t-f\t" << "Minimum overlap required as a fraction of A." << endl;
cerr << "\t\t- Default is 1E-9 (i.e., 1bp)." << endl;
cerr << "\t\t- FLOAT (e.g. 0.50)" << endl << endl;
cerr << "\t-r\t" << "Require that the fraction overlap be reciprocal for A and B." << endl;
cerr << "\t\t- In other words, if -f is 0.90 and -r is used, this requires" << endl;
cerr << "\t\t that B overlap 90% of A and A _also_ overlaps 90% of B." << endl << endl;
cerr << "\t-s\t" << "Require same strandedness. That is, only report hits in B" << endl;
cerr << "\t\tthat overlap A on the _same_ strand." << endl;
cerr << "\t\t- By default, overlaps are reported without respect to strand." << endl << endl;
cerr << "\t-S\t" << "Require different strandedness. That is, only report hits in B" << endl;
cerr << "\t\tthat overlap A on the _opposite_ strand." << endl;
cerr << "\t\t- By default, overlaps are reported without respect to strand." << endl << endl;
cerr << "\t-split\t" << "Treat \"split\" BAM or BED12 entries as distinct BED intervals." << endl << endl;
cerr << "\t-sorted\t" << "Use the \"chromsweep\" algorithm for sorted (-k1,1 -k2,2n) input." << endl << endl;
cerr << "\t-g\t" << "Provide a genome file to enforce consistent chromosome sort order" << endl;
cerr <<"\t\tacross input files. Only applies when used with -sorted option." << endl << endl;
cerr << "\t-header\t" << "Print the header from the A file prior to results." << endl << endl;
cerr << "\t-nobuf\t" << "Disable buffered output. Using this option will cause each line"<< endl;
cerr <<"\t\tof output to be printed as it is generated, rather than saved" << endl;
cerr <<"\t\tin a buffer. This will make printing large output files " << endl;
cerr <<"\t\tnoticeably slower, but can be useful in conjunction with" << endl;
cerr <<"\t\tother software tools and scripts that need to process one" << endl;
cerr <<"\t\tline of bedtools output at a time." << endl << endl;
cerr << "\t-names\t" << "When using multiple databases, provide an alias for each that" << endl;
cerr <<"\t\twill appear instead of a fileId when also printing the DB record." << endl << endl;
cerr << "\t-filenames" << "\tWhen using multiple databases, show each complete filename" << endl;
cerr <<"\t\t\tinstead of a fileId when also printing the DB record." << endl << endl;
cerr << "\t-sortout\t" << "When using multiple databases, sort the output DB hits" << endl;
cerr << "\t\t\tfor each record." << endl << endl;
cerr << "\t-nonamecheck\t" << "For sorted data, don't throw an error if the file has different naming conventions" << endl;
cerr << "\t\t\tfor the same chromosome. ex. \"chr1\" vs \"chr01\"." << endl << endl;
CommonHelp();
sortedHelp();
allToolsCommonHelp();
cerr << "Notes: " << endl;
cerr << "\t(1) When a BAM file is used for the A file, the alignment is retained if overlaps exist," << endl;
......
......@@ -27,27 +27,8 @@ void jaccard_help(void) {
cerr << "Options: " << endl;
cerr << "\t-f\t" << "Minimum overlap required as a fraction of A." << endl;
cerr << "\t\t- Default is 1E-9 (i.e., 1bp)." << endl;
cerr << "\t\t- FLOAT (e.g. 0.50)" << endl << endl;
cerr << "\t-r\t" << "Require that the fraction overlap be reciprocal for A and B." << endl;
cerr << "\t\t- In other words, if -f is 0.90 and -r is used, this requires" << endl;
cerr << "\t\t that B overlap 90% of A and A _also_ overlaps 90% of B." << endl << endl;
cerr << "\t-split\t" << "Treat \"split\" BAM or BED12 entries as distinct BED intervals." << endl << endl;
cerr << "\t-s\t" << "Force strandedness. That is, only merge features" << endl;
cerr << "\t\tthat are on the same strand." << endl;
cerr << "\t\t- By default, merging is done without respect to strand." << endl << endl;
cerr << "\t-S\t" << "Force merge for one specific strand only." << endl;
cerr << "\t\t" << "Follow with + or - to force merge from only" << endl;
cerr << "\t\t" << "the forward or reverse strand, respectively." << endl;
cerr << "\t\t" << "- By default, merging is done without respect to strand." << endl << endl;
cerr << "\t-nonamecheck\t" << "For sorted data, don't throw an error if the file has different naming conventions" << endl;
cerr << "\t\t\tfor the same chromosome. ex. \"chr1\" vs \"chr01\"." << endl << endl;
IntersectCommonHelp();
allToolsCommonHelp();
cerr << "Notes: " << endl;
cerr << "\t(1) Input files must be sorted by chrom, then start position."
......
......@@ -18,45 +18,11 @@ void map_help(void) {
cerr << "Options: " << endl;
cerr << "\t-c\t" << "Specify columns from the B file to map onto intervals in A." << endl;
cerr << "\t\tDefault: 5." << endl;
cerr << "\t\tMultiple columns can be specified in a comma-delimited list." << endl << endl;
KeyListOpsHelp();
cerr << "\t-f\t" << "Minimum overlap required as a fraction of A." << endl;
cerr << "\t\t- Default is 1E-9 (i.e., 1bp)." << endl;
cerr << "\t\t- FLOAT (e.g. 0.50)" << endl << endl;
cerr << "\t-r\t" << "Require that the fraction overlap be reciprocal for A and B." << endl;
cerr << "\t\t- In other words, if -f is 0.90 and -r is used, this requires" << endl;
cerr << "\t\t that B overlap 90% of A and A _also_ overlaps 90% of B." << endl << endl;
cerr << "\t-s\t" << "Require same strandedness. That is, only report hits in B" << endl;
cerr << "\t\tthat overlap A on the _same_ strand." << endl;
cerr << "\t\t- By default, overlaps are reported without respect to strand." << endl << endl;
cerr << "\t-S\t" << "Require different strandedness. That is, only report hits in B" << endl;
cerr << "\t\tthat overlap A on the _opposite_ strand." << endl;
cerr << "\t\t- By default, overlaps are reported without respect to strand." << endl << endl;
cerr << "\t-split\t" << "Treat \"split\" BAM or BED12 entries as distinct BED intervals." << endl << endl;
cerr << "\t-g\t" << "Provide a genome file to enforce consistent chromosome sort order" << endl;
cerr <<"\t\tacross input files." << endl << endl;
cerr << "\t-null\t" << "The value to print if no overlaps are found for an A interval." << endl;
cerr << "\t\t- Default - \".\"" << endl << endl;
cerr << "\t-header\t" << "Print the header from the A file prior to results." << endl << endl;
cerr << "\t-prec\t" << "Sets the decimal precision for output (Default: 5)" << endl << endl;
cerr << "\t-nonamecheck\t" << "For sorted data, don't throw an error if the file has different naming conventions" << endl;
cerr << "\t\t\tfor the same chromosome. ex. \"chr1\" vs \"chr01\"." << endl << endl;
CommonHelp();
IntersectCommonHelp();
allToolsCommonHelp();
cerr << "Notes: " << endl;
cerr << "\t(1) Both input files must be sorted by chrom, then start." << endl << endl;
......
......@@ -34,16 +34,12 @@ void merge_help(void) {
cerr << "\t-d\t" << "Maximum distance between features allowed for features" << endl; cerr << "\t\tto be merged." << endl; cerr << "\t\t- Def. 0. That is, overlapping & book-ended features are merged." << endl;
cerr << "\t\t- (INTEGER)" << endl;
cerr << "\t\t- Note: negative values enforce the number of b.p. required for overlap." << endl << endl;
cerr << "\t-header\t" << "Print the header from the A file prior to results." << endl << endl;
cerr << "\t-c\t" << "Specify columns from the input file to operate upon (see -o option, below)." << endl;
cerr << "\t\tMultiple columns can be specified in a comma-delimited list." << endl << endl;
cerr << "\t-prec\t" << "Sets the decimal precision for output (Default: 5)" << endl << endl;
KeyListOpsHelp();
allToolsCommonHelp();
cerr << "Notes: " << endl;
cerr << "\t(1) The input file (-i) file must be sorted by chrom, then start." << endl << endl;
// end the program here
......
......@@ -30,9 +30,6 @@ void sample_help(void) {
cerr << "\t-ubam\t" << "Write uncompressed BAM output. Default writes compressed BAM." << endl << endl;
cerr << "\t-bed\t" << "When using BAM input (-abam), write output as BED. The default" << endl;
cerr << "\t\tis to write output in BAM when using -abam." << endl << endl;
cerr << "\t-s\t" << "Require same strandedness. That is, only give records" << endl;
cerr << "\t\tthat have the same strand. Use '-s forward' or '-s reverse'" << endl;
cerr << "\t\tfor forward or reverse strand records, respectively." << endl;
......@@ -40,8 +37,10 @@ void sample_help(void) {
cerr << "\t-header\t" << "Print the header from the input file prior to results." << endl << endl;
allToolsCommonHelp();
cerr << "Notes: " << endl;
cerr << "\tTBD: Enter other usage notes here." << endl << endl;
// cerr << "\tTBD: Enter other usage notes here." << endl << endl;
// end the program here
exit(1);
......
......@@ -35,6 +35,9 @@ void spacing_help(void) {
cerr << "\tchr1 35 45 5 " << endl;
cerr << "\tchr1 100 200 55 " << endl << endl;
allToolsCommonHelp();
// end the program here
exit(1);
}
......@@ -17,17 +17,6 @@ void subtract_help(void) {
cerr << "Usage: " << "bedtools subtract" << " [OPTIONS] -a <bed/gff/vcf> -b <bed/gff/vcf>" << endl << endl;
cerr << "Options: " << endl;
cerr << "\t-f\t" << "Minimum overlap required as a fraction of A." << endl;
cerr << "\t\t- Default is 1E-9 (i.e., 1bp)." << endl;
cerr << "\t\t- (FLOAT) (e.g. 0.50)" << endl << endl;
cerr << "\t-s\t" << "Require same strandedness. That is, only subtract hits in B" << endl;
cerr << "\t\tthat overlap A on the _same_ strand." << endl;
cerr << "\t\t- By default, overlaps are subtracted without respect to strand." << endl << endl;
cerr << "\t-S\t" << "Force strandedness. That is, only subtract hits in B that" << endl;
cerr << "\t\toverlap A on the _opposite_ strand." << endl;
cerr << "\t\t- By default, overlaps are subtracted without respect to strand." << endl << endl;
cerr << "\t-A\t" << "Remove entire feature if any overlap. That is, by default," << endl;
cerr << "\t\tonly subtract the portion of A that overlaps B. Here, if" << endl;
......@@ -44,35 +33,9 @@ void subtract_help(void) {
cerr << "\t\t- Overlaps restricted by -f and -r." << endl;
cerr << "\t\t Only A features with overlap are reported." << endl << endl;
cerr << "\t-split\t" << "Treat \"split\" BAM or BED12 entries as distinct BED intervals." << endl << endl;
cerr << "\t-sorted\t" << "Use the \"chromsweep\" algorithm for sorted (-k1,1 -k2,2n) input." << endl << endl;
cerr << "\t-g\t" << "Provide a genome file to enforce consistent chromosome sort order" << endl;
cerr <<"\t\tacross input files. Only applies when used with -sorted option." << endl << endl;
cerr << "\t-header\t" << "Print the header from the A file prior to results." << endl << endl;
cerr << "\t-nobuf\t" << "Disable buffered output. Using this option will cause each line"<< endl;
cerr <<"\t\tof output to be printed as it is generated, rather than saved" << endl;
cerr <<"\t\tin a buffer. This will make printing large output files " << endl;
cerr <<"\t\tnoticeably slower, but can be useful in conjunction with" << endl;
cerr <<"\t\tother software tools and scripts that need to process one" << endl;
cerr <<"\t\tline of bedtools output at a time." << endl << endl;
cerr << "\t-names\t" << "When using multiple databases, provide an alias for each that" << endl;
cerr <<"\t\twill appear instead of a fileId when also printing the DB record." << endl << endl;
cerr << "\t-filenames" << "\tWhen using multiple databases, show each complete filename" << endl;
cerr <<"\t\t\tinstead of a fileId when also printing the DB record." << endl << endl;
cerr << "\t-sortout\t" << "When using multiple databases, sort the output DB hits" << endl;
cerr << "\t\t\tfor each record." << endl << endl;
cerr << "\t-nonamecheck\t" << "For sorted data, don't throw an error if the file has different naming conventions" << endl;
cerr << "\t\t\tfor the same chromosome. ex. \"chr1\" vs \"chr01\"." << endl << endl;
IntersectCommonHelp();
sortedHelp();
allToolsCommonHelp();
// end the program here
exit(1);
......
......@@ -330,6 +330,10 @@ const QuickString &KeyListOps::format(double val)
void KeyListOpsHelp() {
cerr << "\t-c\t" << "Specify columns from the B file to map onto intervals in A." << endl;