Skip to content

Commit 46f5023

Browse files
authored
Replace foo/bar with better names in docs (#6156)
Signed-off-by: Ben Sherman <[email protected]>
1 parent c20f302 commit 46f5023

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+539
-526
lines changed

docs/cache-and-resume.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,19 @@ Sometimes a process needs to merge inputs from different sources. Consider the f
144144

145145
```nextflow
146146
workflow {
147-
ch_foo = channel.of( ['1', '1.foo'], ['2', '2.foo'] )
148-
ch_bar = channel.of( ['2', '2.bar'], ['1', '1.bar'] )
149-
gather(ch_foo, ch_bar)
147+
ch_bam = channel.of( ['1', '1.bam'], ['2', '2.bam'] )
148+
ch_bai = channel.of( ['2', '2.bai'], ['1', '1.bai'] )
149+
check_bam_bai(ch_bam, ch_bai)
150150
}
151151
152-
process gather {
152+
process check_bam_bai {
153153
input:
154-
tuple val(id), file(foo)
155-
tuple val(id), file(bar)
154+
tuple val(id), file(bam)
155+
tuple val(id), file(bai)
156156
157157
script:
158158
"""
159-
merge_command $foo $bar
159+
check_bam_bai $bam $bai
160160
"""
161161
}
162162
```
@@ -167,18 +167,18 @@ The solution is to explicitly join the two channels before the process invocatio
167167

168168
```nextflow
169169
workflow {
170-
ch_foo = channel.of( ['1', '1.foo'], ['2', '2.foo'] )
171-
ch_bar = channel.of( ['2', '2.bar'], ['1', '1.bar'] )
172-
gather(ch_foo.join(ch_bar))
170+
ch_bam = channel.of( ['1', '1.bam'], ['2', '2.bam'] )
171+
ch_bai = channel.of( ['2', '2.bai'], ['1', '1.bai'] )
172+
check_bam_bai(ch_bam.join(ch_bai))
173173
}
174174
175-
process gather {
175+
process check_bam_bai {
176176
input:
177-
tuple val(id), file(foo), file(bar)
177+
tuple val(id), file(bam), file(bai)
178178
179179
script:
180180
"""
181-
merge_command $foo $bar
181+
check_bam_bai $bam $bai
182182
"""
183183
}
184184
```

docs/channel.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ channels if it is invoked with all value channels, including simple values which
3838
For example:
3939

4040
```nextflow
41-
process foo {
41+
process echo {
4242
input:
4343
val x
4444
@@ -52,12 +52,12 @@ process foo {
5252
}
5353
5454
workflow {
55-
result = foo(1)
55+
result = echo(1)
5656
result.view { file -> "Result: ${file}" }
5757
}
5858
```
5959

60-
In the above example, since the `foo` process is invoked with a simple value instead of a channel, the input is implicitly
60+
In the above example, since the `echo` process is invoked with a simple value instead of a channel, the input is implicitly
6161
wrapped in a value channel, and the output is also emitted as a value channel.
6262

6363
See also: {ref}`process-multiple-input-channels`.

docs/cli.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Nextflow provides a robust command line interface (CLI) for the management and e
77
Simply run `nextflow` with no options or `nextflow -h` to see the list of available top-level options and commands. See {ref}`cli-reference` for the full list of subcommands with examples.
88

99
:::{note}
10-
Nextflow options use a single dash prefix, e.g. `-foo`. Do not confuse with double dash notation, e.g. `--foo`, which is instead used for {ref}`Pipeline parameters <cli-params>`.
10+
Nextflow options use a single dash prefix, e.g. `-resume`. Do not confuse with double dash notation, e.g. `--resume`, which is instead used for {ref}`Pipeline parameters <cli-params>`.
1111
:::
1212

1313
## Basic usage
@@ -166,22 +166,22 @@ The `-v` option prints out information about Nextflow, such as the version and b
166166

167167
## Running pipelines
168168

169-
The main purpose of the Nextflow CLI is to run Nextflow pipelines with the `run` command. Nextflow can execute a local script (e.g. `./main.nf`) or a remote project (e.g. `github.com/foo/bar`).
169+
The main purpose of the Nextflow CLI is to run Nextflow pipelines with the `run` command. Nextflow can execute a local script (e.g. `./main.nf`) or a remote project (e.g. `github.com/nextflow-io/hello`).
170170

171171
### Launching a remote project
172172

173173
To launch the execution of a pipeline project, hosted in a remote code repository, you simply need to specify its qualified name or the repository URL after the `run` command. The qualified name is formed by two parts: the `owner` name and the `repository` name separated by a `/` character.
174174

175-
In other words if a Nextflow project is hosted, for example, in a GitHub repository at the address `http://github.com/foo/bar`, it can be executed by entering the following command in your shell terminal:
175+
If a Nextflow project is hosted on GitHub, for example `http://github.com/nextflow-io/hello`, it can be executed by entering the following command in your shell terminal:
176176

177177
```bash
178-
nextflow run foo/bar
178+
nextflow run nextflow-io/hello
179179
```
180180

181181
or using the project URL:
182182

183183
```bash
184-
nextflow run http://github.com/foo/bar
184+
nextflow run http://github.com/nextflow-io/hello
185185
```
186186

187187
If the project is found, it will be automatically downloaded to the Nextflow home directory (`$HOME/.nextflow` by default) and cached for subsequent runs.
@@ -190,14 +190,6 @@ If the project is found, it will be automatically downloaded to the Nextflow hom
190190
You must use the `-hub` option to specify the hosting service if your project is hosted on a service other than GitHub, e.g. `-hub bitbucket`. However, the `-hub` option is not required if you use the project URL.
191191
:::
192192

193-
Try this feature by running the following command:
194-
195-
```bash
196-
nextflow run nextflow-io/hello
197-
```
198-
199-
It will download a trivial example from the repository published at [http://github.com/nextflow-io/hello](http://github.com/nextflow-io/hello) and execute it on your computer.
200-
201193
If the `owner` is omitted, Nextflow will search your cached pipelines for a pipeline that matches the name specified. If no pipeline is found, Nextflow will try to download it using the `organization` name defined by the `NXF_ORG` environment variable (`nextflow-io` by default).
202194

203195
:::{tip}
@@ -255,7 +247,7 @@ Parameters that are specified on the command line without a value are set to `tr
255247
:::
256248

257249
:::{note}
258-
Parameters that are specified on the command line in kebab case (e.g., `--foo-bar`) are automatically converted to camel case (e.g., `--fooBar`). Because of this, a parameter defined as `fooBar` in the pipeline script can be specified on the command line as `--fooBar` or `--foo-bar`.
250+
Parameters that are specified on the command line in kebab case (e.g., `--alpha-beta`) are automatically converted to camel case (e.g., `--alphaBeta`). Because of this, a parameter defined as `alphaBeta` in the pipeline script can be specified on the command line as `--alphaBeta` or `--alpha-beta`.
259251
:::
260252

261253
:::{warning}
@@ -275,22 +267,22 @@ $ nextflow run main.nf -params-file pipeline_params.yml
275267
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:
276268

277269
```console
278-
$ nextflow run main.nf --alpha 1 --beta foo
270+
$ nextflow run main.nf --alpha 1 --beta two
279271
```
280272

281273
Parameters can be represented in YAML format:
282274

283275
```yaml
284276
alpha: 1
285-
beta: 'foo'
277+
beta: 'two'
286278
```
287279
288280
Or in JSON format:
289281
290282
```json
291283
{
292284
"alpha": 1,
293-
"beta": "foo"
285+
"beta": "two"
294286
}
295287
```
296288

docs/conda.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Alternatively, it can be specified by setting the variable `NXF_CONDA_ENABLED=tr
4646
Conda package names can specified using the `conda` directive. Multiple package names can be specified by separating them with a blank space. For example:
4747

4848
```nextflow
49-
process foo {
49+
process hello {
5050
conda 'bwa samtools multiqc'
5151
5252
script:
@@ -82,7 +82,7 @@ Read the Conda documentation for more details about how to create [environment f
8282
The path of an environment file can be specified using the `conda` directive:
8383

8484
```nextflow
85-
process foo {
85+
process hello {
8686
conda '/some/path/my-env.yaml'
8787
8888
script:
@@ -174,7 +174,7 @@ Conda lock files must be a text file with the `.txt` extension.
174174
If you already have a local Conda environment, you can use it in your workflow specifying the installation directory of such environment by using the `conda` directive:
175175

176176
```nextflow
177-
process foo {
177+
process hello {
178178
conda '/path/to/an/existing/env/directory'
179179
180180
script:

docs/config.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ process.executor = 'sge'
8484
process.queue = 'long'
8585
process.memory = '10G'
8686
87-
includeConfig 'path/foo.config'
87+
includeConfig 'path/extra.config'
8888
```
8989

9090
Relative paths are resolved against the location of the including file.
@@ -185,7 +185,7 @@ process {
185185

186186
The `withName` selector applies both to processes defined with the same name and processes included under the same alias. For example, `withName: hello` will apply to any process originally defined as `hello`, as well as any process included under the alias `hello`.
187187

188-
Furthermore, selectors for the alias of an included process take priority over selectors for the original name of the process. For example, given a process defined as `foo` and included as `bar`, the selectors `withName: foo` and `withName: bar` will both be applied to the process, with the second selector taking priority over the first.
188+
Furthermore, selectors for the alias of an included process take priority over selectors for the original name of the process. For example, given a process defined as `hello` and included as `sayHello`, the selectors `withName: hello` and `withName: sayHello` will both be applied to the process, with the second selector taking priority over the first.
189189

190190
:::{tip}
191191
Label and process names do not need to be enclosed with quotes, provided the name does not include special characters (`-`, `!`, etc) and is not a keyword or a built-in type identifier. When in doubt, you can enclose the label name or process name with single or double quotes.
@@ -199,26 +199,26 @@ Both label and process name selectors allow the use of a regular expression in o
199199

200200
```groovy
201201
process {
202-
withLabel: 'foo|bar' {
202+
withLabel: 'hello|bye' {
203203
cpus = 2
204204
memory = 4.GB
205205
}
206206
}
207207
```
208208

209-
The above configuration snippet requests 2 cpus and 4 GB of memory for processes labeled as `foo` or `bar`.
209+
The above configuration snippet requests 2 cpus and 4 GB of memory for processes labeled as `hello` or `bye`.
210210

211211
A process selector can be negated prefixing it with the special character `!`. For example:
212212

213213
```groovy
214214
process {
215-
withLabel: 'foo' { cpus = 2 }
216-
withLabel: '!foo' { cpus = 4 }
215+
withLabel: 'hello' { cpus = 2 }
216+
withLabel: '!hello' { cpus = 4 }
217217
withName: '!align.*' { queue = 'long' }
218218
}
219219
```
220220

221-
The above configuration snippet sets 2 cpus for the processes annotated with the `foo` label and 4 cpus to all processes *not* annotated with that label. Finally it sets the use of `long` queue to all process whose name does *not* start with `align`.
221+
The above configuration snippet sets 2 cpus for every process labeled as `hello` and 4 cpus to every process *not* label as `hello`. It also specifies the `long` queue for every process whose name does *not* start with `align`.
222222

223223
(config-selector-priority)=
224224

@@ -238,17 +238,17 @@ For example:
238238
```groovy
239239
process {
240240
cpus = 4
241-
withLabel: foo { cpus = 8 }
242-
withName: bar { cpus = 16 }
243-
withName: 'baz:bar' { cpus = 32 }
241+
withLabel: hello { cpus = 8 }
242+
withName: bye { cpus = 16 }
243+
withName: 'mysub:bye' { cpus = 32 }
244244
}
245245
```
246246

247247
With the above configuration:
248248
- All processes will use 4 cpus (unless otherwise specified in their process definition).
249-
- Processes annotated with the `foo` label will use 8 cpus.
250-
- Any process named `bar` (or imported as `bar`) will use 16 cpus.
251-
- Any process named `bar` (or imported as `bar`) invoked by a workflow named `baz` with use 32 cpus.
249+
- Processes annotated with the `hello` label will use 8 cpus.
250+
- Any process named `bye` (or imported as `bye`) will use 16 cpus.
251+
- Any process named `bye` (or imported as `bye`) invoked by a workflow named `mysub` with use 32 cpus.
252252

253253
(config-profiles)=
254254

@@ -297,7 +297,7 @@ When defining a profile in the config file, avoid using both the dot and block s
297297

298298
```groovy
299299
profiles {
300-
foo {
300+
cluster {
301301
process.memory = '2 GB'
302302
process {
303303
cpus = 2
@@ -309,7 +309,7 @@ profiles {
309309
Due to a limitation of the legacy config parser, the first setting will be overwritten by the second:
310310

311311
```console
312-
$ nextflow config -profile foo
312+
$ nextflow config -profile cluster
313313
process {
314314
cpus = 2
315315
}

0 commit comments

Comments
 (0)