@@ -64,7 +64,14 @@ int main(int argc, char **argv) {
64
64
{" subgraph" ,2 }
65
65
};
66
66
67
- userInput.mode = string_to_case.at (argv[1 ]);
67
+ auto got = string_to_case.find (argv[1 ]);
68
+ if (got != string_to_case.end ()) {
69
+ userInput.mode = got->second ;
70
+ }else {
71
+ fprintf (stderr, " mode %s does not exist. Terminating\n " , argv[1 ]);
72
+ return EXIT_FAILURE;
73
+ }
74
+
68
75
switch (userInput.mode ) {
69
76
case 0 : { // sequence validation
70
77
@@ -75,7 +82,7 @@ int main(int argc, char **argv) {
75
82
{" input-sequence" , required_argument, 0 , ' f' },
76
83
{" kmer-length" , required_argument, 0 , ' k' },
77
84
{" search-depth" , required_argument, 0 , 0 },
78
- {" backtracking -span" , required_argument, 0 , 0 },
85
+ {" max -span" , required_argument, 0 , 0 },
79
86
{" out-format" , required_argument, 0 , ' o' },
80
87
{" input-reads" , required_argument, 0 , ' r' },
81
88
{" tmp-prefix" , required_argument, 0 , ' t' },
@@ -112,10 +119,10 @@ int main(int argc, char **argv) {
112
119
default : // handle positional arguments
113
120
case 0 : // case for long options without short options
114
121
if (strcmp (long_options[option_index].name ," search-depth" ) == 0 )
115
- userInput.depth = atoi (optarg );
122
+ userInput.kmerDepth = atoi (optarg );
116
123
117
- if (strcmp (long_options[option_index].name ," backtracking -span" ) == 0 )
118
- userInput.backtrackingSpan = atoi (optarg );
124
+ if (strcmp (long_options[option_index].name ," max -span" ) == 0 )
125
+ userInput.maxSpan = atoi (optarg );
119
126
break ;
120
127
case ' c' : // coverage cutoff
121
128
if (!isNumber (optarg )) {
@@ -196,7 +203,7 @@ int main(int argc, char **argv) {
196
203
printf (" \t -m --max-memory use at most this amount of memory (in Gb, default: 0.9 of max).\n " );
197
204
printf (" \t -j --threads <n> numbers of threads (default: max).\n " );
198
205
printf (" \t -v --version software version.\n " );
199
- printf (" \t --search-depth the max depth for graph traversal (default: 3 ).\n " );
206
+ printf (" \t --search-depth the max depth for graph traversal (default: 21 ).\n " );
200
207
printf (" \t --cmd print $0 to stdout.\n " );
201
208
exit (0 );
202
209
}
@@ -381,7 +388,7 @@ int main(int argc, char **argv) {
381
388
printf (" \t -d --database DBG database.\n " );
382
389
printf (" \t -f --input-sequence sequence input file (fasta).\n " );
383
390
printf (" \t --traversal-algorithm <string> the approach used for graph search (best-first/traversal, default: best-first).\n " );
384
- printf (" \t --search-depth the max depth for graph traversal (default: 3 ).\n " );
391
+ printf (" \t --search-depth the max depth for graph traversal (default: 21 ).\n " );
385
392
printf (" \t --no-collapse do not collapse linear nodes (default: false).\n " );
386
393
printf (" \t --no-reference do not include reference nodes (default: false).\n " );
387
394
printf (" \t -o --out-format generates various kinds of outputs (currently supported: .gfa1/2).\n " );
0 commit comments