Skip to content

Commit 82f4651

Browse files
authored
Merge pull request #544 from ewels/fix-heading-numbers
2 parents 3ac52a0 + 14b6053 commit 82f4651

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/hello_nextflow/03_hello_workflow.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,12 @@ HOLà
272272

273273
That is the result we want to achieve with our workflow.
274274

275-
### 2.1. Create a new process to do the collection step
275+
### 2.2. Create a new process to do the collection step
276276

277277
Let's create a new process and call it `collectGreetings()`.
278278
We can start writing it based on the previous one.
279279

280-
#### 2.1.1. Write the 'obvious' parts of the process
280+
#### 2.2.1. Write the 'obvious' parts of the process
281281

282282
Add the following process definition to the workflow script:
283283

@@ -306,7 +306,7 @@ This is what we can write with confidence based on what you've learned so far.
306306
But this is not functional!
307307
It leaves out the input definition(s) and the first half of the script command because we need to figure out how to write that.
308308

309-
#### 2.1.2. Define inputs to `collectGreetings()`
309+
#### 2.2.2. Define inputs to `collectGreetings()`
310310

311311
We need to collect the greetings from all the calls to the `convertToUpper()` process.
312312
What do we know we can get from the previous step in the workflow?
@@ -333,7 +333,7 @@ _After:_
333333
Notice we use the `path` prefix even though we expect this to contain multiple files.
334334
Nextflow doesn't mind, so it doesn't matter.
335335

336-
#### 2.1.3. Compose the concatenation command
336+
#### 2.2.3. Compose the concatenation command
337337

338338
This is where things could get a little tricky, because we need to be able to handle an arbitrary number of input files.
339339
Specifically, we can't write the command up front, so we need to tell Nextflow how to compose it at runtime based on what inputs flow into the process.
@@ -372,11 +372,11 @@ In theory this should handle any arbitrary number of input files.
372372

373373
<!--[ADD LINK to note above] -->
374374

375-
### 2.2. Add the collection step to the workflow
375+
### 2.3. Add the collection step to the workflow
376376

377377
Now we should just need to call the collection process on the output of the uppercasing step.
378378

379-
#### 2.2.1. Connect the process calls
379+
#### 2.3.1. Connect the process calls
380380

381381
In the workflow block, make the following code change:
382382

@@ -401,7 +401,7 @@ _After:_
401401

402402
This connects the output of `convertToUpper()` to the input of `collectGreetings()`.
403403

404-
#### 2.2.2. Run the workflow with `-resume`
404+
#### 2.3.2. Run the workflow with `-resume`
405405

406406
Let's try it.
407407

@@ -435,13 +435,13 @@ Oh no. The collection step was run individually on each greeting, which is NOT w
435435

436436
We need to do something to tell Nextflow explicitly that we want that third step to run on all the elements in the channel output by `convertToUpper()`.
437437

438-
### 2.3. Use an operator to collect the greetings into a single input
438+
### 2.4. Use an operator to collect the greetings into a single input
439439

440440
Yes, once again the answer to our problem is an operator.
441441

442442
Specifically, we are going to use the aptly-named [`collect()`](https://www.nextflow.io/docs/latest/reference/operator.html#collect) operator.
443443

444-
#### 2.3.1. Add the `collect()` operator
444+
#### 2.4.1. Add the `collect()` operator
445445

446446
This time it's going to look a bit different because we're not adding the operator in the context of a channel factory, but to an output channel.
447447

@@ -466,7 +466,7 @@ _After:_
466466
}
467467
```
468468

469-
#### 2.3.2. Add some `view()` statements
469+
#### 2.4.2. Add some `view()` statements
470470

471471
Let's also include a couple of `view()` statements to visualize the before and after states of the channel contents.
472472

@@ -492,7 +492,7 @@ _After:_
492492

493493
The `view()` statements can go anywhere you want; we put them after the call for readability.
494494

495-
#### 2.3.3. Run the workflow again with `-resume`
495+
#### 2.4.3. Run the workflow again with `-resume`
496496

497497
Let's try it:
498498

0 commit comments

Comments
 (0)