Skip to content

Commit

Permalink
docs: Command line arguments for configuration files (#1343)
Browse files Browse the repository at this point in the history
* Command line arguments for configuration files

- Is it `configfile` or `configfiles` ? 
- pattern `--config` of Markdown seems to be ``--config`` in RST (I will double check that with my previous commit)
- [API](https://snakemake.readthedocs.io/en/latest/api_reference/snakemake.html#api-reference-snakemake) references`configfiles`, but does not describe CLI parameter

* fix arg name

* fmt

Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
  • Loading branch information
enryH and johanneskoester committed Jan 28, 2022
1 parent 11d4dc8 commit ad8aaa4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/snakefiles/configuration.rst
Expand Up @@ -37,10 +37,10 @@ In addition to the `configfile` statement, config values can be overwritten via
$ snakemake --config yourparam=1.5
Further, you can manually alter the config dictionary using any Python code **outside** of your rules. Changes made from within a rule won't be seen from other rules.
Finally, you can use the `--configfile` command line argument to overwrite values from the `configfile` statement.
Note that any values parsed into the `config` dictionary with any of above mechanisms are merged, i.e., all keys defined via a `configfile`
statement, or the `--configfile` and `--config` command line arguments will end up in the final `config` dictionary, but if two methods define the same key, command line
overwrites the `configfile` statement.
Finally, you can use the ``--configfile`` command line argument to overwrite values from the `configfile` statement.
Note that any values parsed into the ``config`` dictionary with any of above mechanisms are merged, i.e., all keys defined via a ``configfile``
statement, or the ``--configfile`` and ``--config`` command line arguments will end up in the final `config` dictionary, but if two methods define the same key, command line
overwrites the ``configfile`` statement.

For adding config placeholders into a shell command, Python string formatting syntax requires you to leave out the quotes around the key name, like so:

Expand Down

0 comments on commit ad8aaa4

Please sign in to comment.