@@ -48,7 +48,8 @@ static const char USAGE_MESSAGE[] =
4848 " Histograms are omitted if no prefix is given."
4949 " -t, --threshold=N set path support threshold to N. [4]"
5050 " -x, --extract=N extract N rmers per read. [4]"
51- " -m, --min-tests=N set minimum number of sliding window moves to N. Maximum value is 127. [20]"
51+ " -m, --min-tests=N set minimum number of sliding window moves to N. Cannot be higher than 127. [20]"
52+ " -M, --max-tests=N set maximum number of sliding window moves to N. Cannot be higher than 127. [36]"
5253 " -n, --branching=N set maximum number of branching paths to N. [75]"
5354 " -r, --rmer=N explicitly set r value (k value used by rresolver)."
5455 " The number of set r values should be equalto the number of read sizes."
@@ -97,6 +98,9 @@ int extract = 4;
9798/* * Minimum number of sliding window moves */
9899int minTests = 20 ;
99100
101+ /* * Maximum number of sliding window moves */
102+ int maxTests = 36 ;
103+
100104/* * Maximum number of branching paths */
101105int branching = 75 ;
102106
@@ -121,7 +125,7 @@ int format; // used by ContigProperties
121125
122126}
123127
124- static const char shortopts[] = " b:j:g:c:k:h:t:x:m:n:r:q:eS:U:v" ;
128+ static const char shortopts[] = " b:j:g:c:k:h:t:x:m:M: n:r:q:eS:U:v" ;
125129
126130enum
127131{
@@ -139,6 +143,7 @@ static const struct option longopts[] = {
139143 { " threshold" , required_argument, NULL , ' t' },
140144 { " extract" , required_argument, NULL , ' x' },
141145 { " min-tests" , required_argument, NULL , ' m' },
146+ { " max-tests" , required_argument, NULL , ' M' },
142147 { " branching" , required_argument, NULL , ' n' },
143148 { " rmer" , required_argument, NULL , ' r' },
144149 { " quality-threshold" , required_argument, NULL , ' q' },
@@ -196,6 +201,11 @@ check_options(int argc, bool& die)
196201 std::cerr << PROGRAM " : invalid number of threads `-j`" << std::endl;
197202 die = true ;
198203 }
204+
205+ if (opt::minTests > opt::maxTests) {
206+ std::cerr << PROGRAM " : --min-tests cannot be higher than --max-tests" << std::endl;
207+ die = true ;
208+ }
199209}
200210
201211void
@@ -296,6 +306,9 @@ main(int argc, char** argv)
296306 case ' m' :
297307 arg >> opt::minTests;
298308 break ;
309+ case ' M' :
310+ arg >> opt::maxTests;
311+ break ;
299312 case ' n' :
300313 arg >> opt::branching;
301314 break ;
0 commit comments