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

Better documentation for positional parameter info #26

Open
holgerbrandl opened this issue Feb 7, 2017 · 0 comments
Open

Better documentation for positional parameter info #26

holgerbrandl opened this issue Feb 7, 2017 · 0 comments

Comments

@holgerbrandl
Copy link

Since the current implementation supports also info for positional parameters (and even arbitrary text, which is really useful), it would be great if the examples in the README or via ?docopt could mention this as well.


suppressMessages(require(docopt))

doc <- '
Analyze the effect of the batch removal on the clustering
Usage: batch_effect_removal.R [options] <count_matrix> <fancy_input>

Inputs:
count_matrix                    The input data
fancy_input                      Another very important input for this cool program

Options:
--contrasts=<tab_delim_table>   Table with sample pairs for which dge analysis should be performed
--pcutoff <pcutoff>             Override q-value filter and filter by p-value instead
'

#valid
opts <- docopt(doc, args=list("foo.txt"))
#invalid
opts <- docopt(doc, args=list())

# do wee see the Inputs when asking for help?
opts <- docopt(doc, args="--help")

See the "Inputs" and header line in the example.

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

No branches or pull requests

1 participant