Skip to content

Commit df69b8f

Browse files
Docs: Move -params-file config from CLI to config (#5534) [ci skip]
Signed-off-by: Christopher Hakkaart <[email protected]>
1 parent e025a84 commit df69b8f

File tree

3 files changed

+33
-23
lines changed

3 files changed

+33
-23
lines changed

docs/cli.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,36 @@ $ nextflow run <pipeline> --files "*.fasta"
243243
```
244244
:::
245245

246+
Parameters specified on the command line can be also specified in a params file using the `-params-file` option.
247+
248+
```bash
249+
nextflow run main.nf -params-file pipeline_params.yml
250+
```
251+
252+
The `-params-file` option loads parameters for your Nextflow pipeline from a JSON or YAML file. Parameters defined in the file are equivalent to specifying them directly on the command line. For example, instead of specifying parameters on the command line:
253+
254+
```bash
255+
nextflow run main.nf --alpha 1 --beta foo
256+
```
257+
258+
Parameters can be represented in YAML format:
259+
260+
```yaml
261+
alpha: 1
262+
beta: 'foo'
263+
```
264+
265+
Or in JSON format:
266+
267+
```json
268+
{
269+
"alpha": 1,
270+
"beta": "foo"
271+
}
272+
```
273+
274+
The parameters specified in a params file are merged with the resolved configuration. The values provided via a params file overwrite those of the same name in the Nextflow configuration file, but not those specified on the command line.
275+
246276
## Managing projects
247277

248278
Nextflow seamlessly integrates with popular Git providers, including [BitBucket](http://bitbucket.org/), [GitHub](http://github.com), and [GitLab](http://gitlab.com) for managing Nextflow pipelines as version-controlled Git repositories.

docs/config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ params {
138138
}
139139
```
140140

141+
See {ref}`cli-params` for information about how to modify these on the command line.
142+
141143
(config-process)=
142144

143145
## Process configuration

docs/reference/cli.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,29 +1172,7 @@ The `run` command is used to execute a local pipeline script or remote pipeline
11721172
$ nextflow run main.nf -params-file pipeline_params.yml
11731173
```
11741174

1175-
For example, the following params file in YAML format:
1176-
1177-
```yaml
1178-
alpha: 1
1179-
beta: 'foo'
1180-
```
1181-
1182-
Or in JSON format:
1183-
1184-
```json
1185-
{
1186-
"alpha": 1,
1187-
"beta": "foo"
1188-
}
1189-
```
1190-
1191-
Is equivalent to the following command line:
1192-
1193-
```console
1194-
$ nextflow run main.nf --alpha 1 --beta foo
1195-
```
1196-
1197-
The parameters specified with this mechanism are merged with the resolved configuration (base configuration and profiles). The values provided via a params file overwrite those of the same name in the Nextflow configuration file.
1175+
See {ref}`cli-params` for more information about writing custom parameters files.
11981176

11991177
### `self-update`
12001178

0 commit comments

Comments
 (0)