Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OptionParser: mode for setting up distinct "commands" within a program #31

Open
andrewdavidsmith opened this issue Aug 11, 2019 · 1 comment

Comments

@andrewdavidsmith
Copy link
Contributor

I noticed that @egor-dolzhenko implemented this in radmeth and others have done similar things. It's already relatively easy using our OptionParser class, but the facilities for printing help and usage messages are just not there when it comes to the "modes". So this issue involves designing the facilities to print usages messages that indicate what the commands are, and what they do. If a user specifies one of those properly (i.e. as the first argument after the program name), then subsequent requests for help/usage should be "command-specific."

@timydaley
Copy link
Contributor

I think that this is implemented in preseq. Calling preseq gives you
$ ~/preseq/preseq
preseq: a program for analyzing library complexity
Version: 2.0.3

Usage: preseq [OPTIONS]

: c_curve generate complexity curve for a library
lc_extrap predict the yield for future experiments
gc_extrap predict genome coverage low input
sequencing experiments
bound_pop lower bound on population size

And calling each individual module gives you the help commands for that module. Is this what you're looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants