Skip to content

Arguments have hidden positional dependency #28

@eyzhao

Description

@eyzhao

Hello there,

Thank you for bringing this phenomenal tool to R!

I'm on docopt_0.4.5 and I've noticed a strange behaviour regarding order of arguments. Here's an example:

' Usage: combine_germline_files.R -p PATHS -o OUTPUT [ -n GENENAME ]
 ' -> doc

 library(docopt)
 args = docopt(doc)

When I run

Rscript scripts/pipelines/pog-germline/combine_germline_files.R -p paths/germline_paths.txt -o meta/mutyh_germline.txt -n MUTYH

it works just fine, but if I reverse the argument order of -p and -o as follows:

Rscript scripts/pipelines/pog-germline/combine_germline_files.R -o meta/mutyh_germline.txt -p paths/germline_paths.txt -n MUTYH

I get an error. The script loads meta/mutyh_germline into PATHS instead of correctly loading paths/germline_paths.txt into PATHS. This seems to suggest a hidden dependency on the order of arguments, not just which flags they follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions