MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit 8b5937f2 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

vidjil.cpp: usage_examples(), from old usage(), and show help on invalid command

used in CLI .set_footer()
parent 79cf8de4
...@@ -143,9 +143,10 @@ extern char *optarg; ...@@ -143,9 +143,10 @@ extern char *optarg;
extern int optind, optopt, opterr; extern int optind, optopt, opterr;
int usage(char *progname, bool advanced) string usage_examples(char *progname)
{ {
cout stringstream ss;
ss
<< endl << endl
<< "Examples (see doc/algo.org)" << endl << "Examples (see doc/algo.org)" << endl
<< " " << progname << " -c clones -g germline/homo-sapiens.g -2 -3 -r 1 demo/Demo-X5.fa # (basic usage, detect the locus for each read," << endl << " " << progname << " -c clones -g germline/homo-sapiens.g -2 -3 -r 1 demo/Demo-X5.fa # (basic usage, detect the locus for each read," << endl
...@@ -157,7 +158,8 @@ int usage(char *progname, bool advanced) ...@@ -157,7 +158,8 @@ int usage(char *progname, bool advanced)
<< " " << progname << " -c segment -g germline/homo-sapiens.g -2 -3 -X 50 demo/Stanford_S22.fasta # (full analysis of each read, only for debug/testing, here on 50 sampled reads)" << endl << " " << progname << " -c segment -g germline/homo-sapiens.g -2 -3 -X 50 demo/Stanford_S22.fasta # (full analysis of each read, only for debug/testing, here on 50 sampled reads)" << endl
<< " " << progname << " -c germlines -g germline/homo-sapiens.g demo/Stanford_S22.fasta # (statistics on the k-mers)" << endl << " " << progname << " -c germlines -g germline/homo-sapiens.g demo/Stanford_S22.fasta # (statistics on the k-mers)" << endl
; ;
return 1;
return ss.str();
} }
...@@ -516,6 +518,8 @@ int main (int argc, char **argv) ...@@ -516,6 +518,8 @@ int main (int argc, char **argv)
app.set_footer(usage_examples(argv[0]));
//$$ options: parsing //$$ options: parsing
CLI11_PARSE(app, argc, argv); CLI11_PARSE(app, argc, argv);
...@@ -531,7 +535,7 @@ int main (int argc, char **argv) ...@@ -531,7 +535,7 @@ int main (int argc, char **argv)
command = CMD_GERMLINES; command = CMD_GERMLINES;
else { else {
cerr << "Unknwown command " << optarg << endl; cerr << "Unknwown command " << optarg << endl;
usage(argv[0], false); throw CLI::CallForHelp();
} }
list <string> f_reps_V(v_reps_V.begin(), v_reps_V.end()); list <string> f_reps_V(v_reps_V.begin(), v_reps_V.end());
......
Markdown is supported
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