You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Removed accent from Hola
* Revert changes on non-english docs and update note about the tr command being naive
Note: Non-english docs will get updated by the translation pipeline
* Also update uppercased instances
---------
Co-authored-by: Geraldine Van der Auwera <geraldinevdauwera@gmail.com>
Copy file name to clipboardExpand all lines: docs/en/docs/hello_nextflow/02_hello_channels.md
+34-34Lines changed: 34 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -300,7 +300,7 @@ Workflows typically run on batches of inputs that are meant to be processed in b
300
300
Conveniently, the `channel.of()` channel factory we've been using is quite happy to accept more than one value, so we don't need to modify that at all.
301
301
We can just load multiple values into the channel.
302
302
303
-
Let's make them `'Hello'`, `'Bonjour'` and `'Holà'`.
303
+
Let's make them `'Hello'`, `'Bonjour'` and `'Hola'`.
304
304
305
305
#### 2.1.1. Add more greetings
306
306
@@ -310,7 +310,7 @@ Before the workflow block, make the following code change:
@@ -704,7 +704,7 @@ This is not yet functional, we've just added a declaration for the array.
704
704
705
705
#### 3.1.2. Set array of greetings as the input to the channel factory
706
706
707
-
Now we're going to replace the values `'Hello','Bonjour','Holà'` currently hardcoded in the channel factory with the `greetings_array` we just created.
707
+
Now we're going to replace the values `'Hello','Bonjour','Hola'` currently hardcoded in the channel factory with the `greetings_array` we just created.
708
708
709
709
In the workflow block, make the following change:
710
710
@@ -715,7 +715,7 @@ In the workflow block, make the following change:
715
715
716
716
main:
717
717
// declare an array of input greetings
718
-
greetings_array = ['Hello','Bonjour','Holà']
718
+
greetings_array = ['Hello','Bonjour','Hola']
719
719
// create a channel for inputs
720
720
greeting_ch = channel.of(greetings_array)
721
721
.view()
@@ -734,9 +734,9 @@ In the workflow block, make the following change:
Look at the output of `view()` and the error messages.
796
796
797
-
It looks like Nextflow tried to run a single process call, using `[Hello, Bonjour, Holà]` as a single string value, instead of using the three strings in the array as separate values.
797
+
It looks like Nextflow tried to run a single process call, using `[Hello, Bonjour, Hola]` as a single string value, instead of using the three strings in the array as separate values.
@@ -824,7 +824,7 @@ In the workflow block, make the following code change:
824
824
825
825
main:
826
826
// declare an array of input greetings
827
-
greetings_array = ['Hello','Bonjour','Holà']
827
+
greetings_array = ['Hello','Bonjour','Hola']
828
828
// create a channel for inputs
829
829
greeting_ch = channel.of(greetings_array)
830
830
.view()
@@ -844,7 +844,7 @@ In the workflow block, make the following code change:
844
844
845
845
main:
846
846
// declare an array of input greetings
847
-
greetings_array = ['Hello','Bonjour','Holà']
847
+
greetings_array = ['Hello','Bonjour','Hola']
848
848
// create a channel for inputs
849
849
greeting_ch = channel.of(greetings_array)
850
850
.view()
@@ -878,7 +878,7 @@ In the workflow block, make the following code change:
878
878
879
879
main:
880
880
// declare an array of input greetings
881
-
greetings_array = ['Hello','Bonjour','Holà']
881
+
greetings_array = ['Hello','Bonjour','Hola']
882
882
// create a channel for inputs
883
883
greeting_ch = channel.of(greetings_array)
884
884
.view { greeting -> "Before flatten: $greeting" }
@@ -899,7 +899,7 @@ In the workflow block, make the following code change:
899
899
900
900
main:
901
901
// declare an array of input greetings
902
-
greetings_array = ['Hello','Bonjour','Holà']
902
+
greetings_array = ['Hello','Bonjour','Hola']
903
903
// create a channel for inputs
904
904
greeting_ch = channel.of(greetings_array)
905
905
.view()
@@ -945,10 +945,10 @@ nextflow run hello-channels.nf
945
945
946
946
executor > local (3)
947
947
[b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔
948
-
Before flatten: [Hello, Bonjour, Holà]
948
+
Before flatten: [Hello, Bonjour, Hola]
949
949
After flatten: Hello
950
950
After flatten: Bonjour
951
-
After flatten: Holà
951
+
After flatten: Hola
952
952
```
953
953
954
954
This time it works AND gives us the additional insight into what the contents of the channel look like before and after we run the `flatten()` operator.
@@ -984,7 +984,7 @@ We've prepared a a CSV file called `greetings.csv` that contains several input g
984
984
```csv title="data/greetings.csv" linenums="1"
985
985
Hello,English,123
986
986
Bonjour,French,456
987
-
Holà,Spanish,789
987
+
Hola,Spanish,789
988
988
```
989
989
990
990
Our next task is to adapt our workflow to read in the values from this file.
@@ -1026,7 +1026,7 @@ Make the following edit to the parameter declaration:
1026
1026
/*
1027
1027
* Pipeline parameters
1028
1028
*/
1029
-
input: String = 'Holà mundo!'
1029
+
input: String = 'Hola mundo!'
1030
1030
```
1031
1031
1032
1032
This assumes the file is co-located with the workflow code.
@@ -1065,7 +1065,7 @@ In the workflow block, make the following code change:
1065
1065
1066
1066
main:
1067
1067
// declare an array of input greetings
1068
-
greetings_array = ['Hello','Bonjour','Holà']
1068
+
greetings_array = ['Hello','Bonjour','Hola']
1069
1069
// create a channel for inputs
1070
1070
greeting_ch = channel.of(greetings_array)
1071
1071
.view { greeting -> "Before flatten: $greeting" }
@@ -1205,7 +1205,7 @@ nextflow run hello-channels.nf
1205
1205
Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv
1206
1206
After splitCsv: [Hello, English, 123]
1207
1207
After splitCsv: [Bonjour, French, 456]
1208
-
After splitCsv: [Holà, Spanish, 789]
1208
+
After splitCsv: [Hola, Spanish, 789]
1209
1209
ERROR ~ Error executing process > 'sayHello (2)'
1210
1210
1211
1211
Caused by:
@@ -1325,10 +1325,10 @@ nextflow run hello-channels.nf
1325
1325
Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv
Copy file name to clipboardExpand all lines: docs/en/docs/hello_nextflow/03_hello_workflow.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ For this chapter, it's under `results/hello_workflow/`.
82
82
results/hello_workflow
83
83
├── Bonjour-output.txt
84
84
├── Hello-output.txt
85
-
└── Holà-output.txt
85
+
└── Hola-output.txt
86
86
```
87
87
88
88
If that worked for you, you're ready to learn how to assemble a multi-step workflow.
@@ -111,7 +111,7 @@ To do the conversion of the greetings to uppercase, we're going to use a classic
111
111
tr '[a-z]''[A-Z]'
112
112
```
113
113
114
-
This is a very naive text replacement one-liner that does not account for accented letters, so for example 'Holà' will become 'HOLà', but it will do a good enough job for demonstrating the Nextflow concepts and that's what matters.
114
+
This is a very naive text replacement one-liner that does not account for accented letters, but it will do a good enough job for demonstrating the Nextflow concepts and that's what matters.
115
115
116
116
To test it out, we can run the `echo 'Hello World'` command and pipe its output to the `tr` command:
117
117
@@ -328,10 +328,10 @@ You'll find the outputs in the `results/hello_workflow` directory as set in the
328
328
results/hello_workflow/
329
329
├── Bonjour-output.txt
330
330
├── Hello-output.txt
331
-
├── Holà-output.txt
331
+
├── Hola-output.txt
332
332
├── UPPER-Bonjour-output.txt
333
333
├── UPPER-Hello-output.txt
334
-
└── UPPER-Holà-output.txt
334
+
└── UPPER-Hola-output.txt
335
335
```
336
336
337
337
That's convenient! But it's still worth taking a look inside the work directory of one of the calls to the second process.
@@ -340,8 +340,8 @@ That's convenient! But it's still worth taking a look inside the work directory
The output is a text file called `COLLECTED-output.txt` that contains the uppercase versions of the original greetings.
@@ -565,7 +565,7 @@ Now have a look at the contents of the final output file.
565
565
??? abstract "File contents"
566
566
567
567
```console title="results/COLLECTED-output.txt"
568
-
Holà
568
+
Hola
569
569
```
570
570
571
571
Oh no. The collection step was run individually on each greeting, which is NOT what we wanted.
@@ -653,8 +653,8 @@ nextflow run hello-workflow.nf -resume
653
653
[1e/83586c] collectGreetings | 1 of 1 ✔
654
654
Before collect: /workspaces/training/hello-nextflow/work/b3/d52708edba8b864024589285cb3445/UPPER-Bonjour-output.txt
655
655
Before collect: /workspaces/training/hello-nextflow/work/99/79394f549e3040dfc2440f69ede1fc/UPPER-Hello-output.txt
656
-
Before collect: /workspaces/training/hello-nextflow/work/aa/56bfe7cf00239dc5badc1d04b60ac4/UPPER-Holà-output.txt
657
-
After collect: [/workspaces/training/hello-nextflow/work/b3/d52708edba8b864024589285cb3445/UPPER-Bonjour-output.txt, /workspaces/training/hello-nextflow/work/99/79394f549e3040dfc2440f69ede1fc/UPPER-Hello-output.txt, /workspaces/training/hello-nextflow/work/aa/56bfe7cf00239dc5badc1d04b60ac4/UPPER-Holà-output.txt]
656
+
Before collect: /workspaces/training/hello-nextflow/work/aa/56bfe7cf00239dc5badc1d04b60ac4/UPPER-Hola-output.txt
657
+
After collect: [/workspaces/training/hello-nextflow/work/b3/d52708edba8b864024589285cb3445/UPPER-Bonjour-output.txt, /workspaces/training/hello-nextflow/work/99/79394f549e3040dfc2440f69ede1fc/UPPER-Hello-output.txt, /workspaces/training/hello-nextflow/work/aa/56bfe7cf00239dc5badc1d04b60ac4/UPPER-Hola-output.txt]
658
658
```
659
659
660
660
It runs successfully, although the log output may look a little messier than this (we cleaned it up for readability).
0 commit comments