edawson / gfakluge

A C++ library and utilities for manipulating the Graphical Fragment Assembly format.
http://edawson.github.io/gfakluge/
MIT License
51 stars 20 forks source link

Add --version option to each tool [feature request] #22

Closed sjackman closed 6 years ago

sjackman commented 6 years ago

Thanks!

edawson commented 6 years ago

Most tools now support this after #25 , but I've used -S / --spec as the flag. How do we feel about this? -v / -V might be a natural choice for a --verbose flag that outputs what gfakluge is currently doing to stderr.

sjackman commented 6 years ago

I would suggest --version and --help, which is the de facto standard. Short single-character options are not needed.

edawson commented 6 years ago

The --version <X> flag now works. Thanks for the suggestions, @sjackman !

sjackman commented 6 years ago

Thanks, Eric! What does the <X> refer to?

edawson commented 6 years ago

Just meant to indicate it takes an argument of type double.

sjackman commented 6 years ago

We may have crossed wires here. I was looking for an option that reports the current version number and does not take an option. For example…

❯❯❯ ls --version
ls (GNU coreutils) 8.27
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Richard M. Stallman and David MacKenzie.
edawson commented 6 years ago

Oh! Yes, we got crossed up on that. Easy fix.

sjackman commented 6 years ago

Ah, I see what happened. I should have elaborated in my issue description. Sorry for the confusion! -S / --spec makes sense for specifying the output format. If you think gfakluge may one day support formats other than GFA, such as for example GraphViz, you may consider naming the option similarly to samtools -O, --output-fmt FORMAT[,OPT[=VAL]] e.g.

gfakluge -O gfa1
gfakluge -O gfa2
gfakluge -O gv
edawson commented 6 years ago

This is now done ---version will show a version message any time it is passed. No immediate plans to support graphviz, but that's an excellent idea. Will close this for now.

sjackman commented 6 years ago

abyss-todot (included with ABySS, and now a misnomer) can convert between GraphViz, GFA1, and GFA2. It can read the GraphViz, GFA1, and GFA2 output by ABySS, but not necessarily all valid GraphViz, GFA1, and GFA2 files.