-
Notifications
You must be signed in to change notification settings - Fork 3
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
Error in passthrough argument feature: Invalid config definition: Config entry must start with a valid identifier.
#109
Comments
Temporary solution:
This will modify the Snakemake code so that it accepts the dashes. This is explained in more detail in the documentation: https://comparem2.readthedocs.io/en/latest/20%20usage/#passthrough-arguments This issue will be kept open until a better and more permanent solution is made: snakemake/snakemake#2986 Best, Carl |
@cmkobel Thanks for the explanation on snakemake/snakemake#2986 (comment)! Yeah I totally agree with you snakemake don't have to be that strict with config names, I was just saying that might be where that specific regex came from. It certainly is a limitation that there is no very good way to refer to the name of a rule with Also thanks for the pointer to this repo, I read it. Great project I might actually need to use it :). I looked at the snakefile, from what I understand you did:
If this is all the features you need, why not just
If the above is all you need I take that back you don't need that solution at all. The GCC-type solution is when you need to escape the arguments for the user and/or manipulate/filter the arguments one-by-one. If you need that level of feature It's easier to use a completely unambiguous grammar. For example features like these:
I can elaborate more if this feature is what you need! |
Thanks for considering my challenge of passing command line arguments using the config system of the Snakemake framework. It is not an easy problem to solve and I'm happy to collaborate with you on finding the best solution. Your interpretation of my implementation is correct. I like your idea of using The solution to running I also added a "separator" argument to the unpacking function so that it is also possible to write comma separated options like I think we need to accept some limitations in this system. The point is not to make something that is extremely flexible, but that the user can specify common arguments like the ones given in the config.yaml, on the fly. |
Snakemake has now been modified to allow hyphens in CLI-config strings from version 8.17.0 To do: CompareM2 will be updated to use this version of snakemake (or newer) asap. |
When using the passthrough argument feature (e.g. by setting prokka's --kingdom argument to "archaea") on a fresh installation of CompareM2, the following error message might show:
This is a known bug which is a product of CompareM2 using Snakemake in a way it wasn't originally intended to. Because Snakemake does not allow any other characters than regex:
[\w_]
in the --config strings, the passthrough argument feature can not support dashes (-). Unfortunately, these dashes are necessary to be able to specify different types of command line option keys often using a combination of dashes and underlines (e.g. "--some-option" or "--other_option").The text was updated successfully, but these errors were encountered: