Commit 548bcae0 authored by Brent Pedersen's avatar Brent Pedersen
Browse files

add -m option to merge intervals

parent 3594e98a
...@@ -34,7 +34,7 @@ void fisher_help(void) { ...@@ -34,7 +34,7 @@ void fisher_help(void) {
cerr << "Summary: Calculate Fisher statistic b/w two feature files." cerr << "Summary: Calculate Fisher statistic b/w two feature files."
<< endl << endl; << endl << endl;
cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -a <bed/gff/vcf> -b <bed/gff/vcf> -c <possible counts>" << endl << endl; cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -a <bed/gff/vcf> -b <bed/gff/vcf> -g <genome file>" << endl << endl;
cerr << "Options: " << endl; cerr << "Options: " << endl;
...@@ -43,6 +43,9 @@ void fisher_help(void) { ...@@ -43,6 +43,9 @@ void fisher_help(void) {
cerr << "\t\t- Default is 1E-9 (i.e., 1bp)." << endl; cerr << "\t\t- Default is 1E-9 (i.e., 1bp)." << endl;
cerr << "\t\t- FLOAT (e.g. 0.50)" << endl << 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-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- 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\t that B overlap 90% of A and A _also_ overlaps 90% of B." << endl << endl;
......
...@@ -43,6 +43,10 @@ bool ContextFisher::parseCmdArgs(int argc, char **argv, int skipFirstArgs) ...@@ -43,6 +43,10 @@ bool ContextFisher::parseCmdArgs(int argc, char **argv, int skipFirstArgs)
if (strcmp(_argv[_i], "-g") == 0) { if (strcmp(_argv[_i], "-g") == 0) {
if (!handle_g()) return false; if (!handle_g()) return false;
} }
if(strcmp(_argv[_i], "-m") == 0) {
markUsed(_i - _skipFirstArgs);
setUseMergedIntervals(true);
}
} }
return ContextIntersect::parseCmdArgs(argc, argv, _skipFirstArgs); return ContextIntersect::parseCmdArgs(argc, argv, _skipFirstArgs);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment