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
Copy file name to clipboardExpand all lines: docs/process.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,7 +260,7 @@ Hello Mr. a
260
260
Hello Mr. c
261
261
```
262
262
263
-
A native process is very similar to a {ref}`function <syntax-function>`, but provides additional capabilities such as parallelism, caching, and progress logging.
263
+
A native process is very similar to a {ref}`function <syntax-function>`. However, it provides additional capabilities such as parallelism, caching, and progress logging.
Copy file name to clipboardExpand all lines: docs/reference/syntax.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ A Nextflow script may contain the following top-level declarations:
37
37
38
38
Script declarations are in turn composed of statements and expressions.
39
39
40
-
A script may contain one or more [statements](#statements), if there are no top-level declarations. In this case, the entire script will be treated as an entry workflow. For example:
40
+
If there are no top-level declarations, a script may contain one or more [statements](#statements), in which case the entire script is treated as an entry workflow. For example:
41
41
42
42
```groovy
43
43
println 'Hello world!'
@@ -65,7 +65,7 @@ The first line of a script can be a [shebang](https://en.wikipedia.org/wiki/Sheb
65
65
66
66
### Feature flag
67
67
68
-
A feature flag declaration is an assignment, where the target should be a valid {ref}`feature flag <config-feature-flags>` and the source should be a literal (i.e. number, string, boolean):
68
+
A feature flag declaration is an assignment. The target should be a valid {ref}`feature flag <config-feature-flags>` and the source should be a literal (i.e. number, string, boolean):
69
69
70
70
```groovy
71
71
nextflow.preview.topic = true
@@ -79,7 +79,7 @@ An include declaration consists of an *include source* and one or more *include
79
79
include { foo as bar } from './some/module'
80
80
```
81
81
82
-
The include source should be a string literal and should refer to either a local path (e.g. `./module.nf`) or a plugin (e.g. `plugin/nf-hello`). Each include clause should specify a name, and may also specify an *alias*. In the example above, `foo` is included under the alias `bar`.
82
+
The include source should be a string literal and should refer to either a local path (e.g. `./module.nf`) or a plugin (e.g. `plugin/nf-hello`). Each include clause should specify a name, and may also specify an *alias*. In the above example, `foo` is included under the alias `bar`.
83
83
84
84
Include clauses can be separated by semi-colons or newlines:
85
85
@@ -109,7 +109,7 @@ The following definitions can be included:
109
109
110
110
### Parameter
111
111
112
-
A parameter declaration is an assignment, where the target should be a pipeline parameter and the source should be an expression:
112
+
A parameter declaration is an assignment. The target should be a pipeline parameter and the source should be an expression:
113
113
114
114
```groovy
115
115
params.message = 'Hello world!'
@@ -404,7 +404,7 @@ Multiple variables can be assigned in a single statement as long as the source e
404
404
405
405
Any [expression](#expressions) can be a statement.
406
406
407
-
In general, the only expressions that can have any effect as expression statements are function calls that have side effects (e.g. `println`) or an implicit return statement (e.g. in a function or closure).
407
+
In general, the only expressions that can have any effect as expression statements are function calls that have side effects (e.g. `println`) or an implicit return statement in a [function](#function) or [closure](#closure).
408
408
409
409
### assert
410
410
@@ -693,7 +693,7 @@ A list literal consists of a comma-separated list of zero or more expressions, e
693
693
694
694
### Map
695
695
696
-
A map literal consists of a comma-separated list of one or more *map entries*, where each map entry consists of a *key expression* and *value expression* separated by a colon, enclosed in square brackets:
696
+
A map literal consists of a comma-separated list of one or more *map entries*, enclosed in square brackets. Each map entry consists of a *key expression* and *value expression* separated by a colon:
697
697
698
698
```groovy
699
699
[foo: 1, bar: 2, baz: 3]
@@ -952,6 +952,6 @@ Compound expressions are evaluated in the following order:
952
952
953
953
The following legacy features were excluded from this page because they are deprecated:
954
954
955
-
- The `addParams` and `params` clauses of include declarations (see {ref}`module-params`)
956
-
- The `when:` section of a process definition (see {ref}`process-when`)
955
+
- The `addParams` and `params` clauses of include declarations. See {ref}`module-params` for more information.
956
+
- The `when:` section of a process definition. See {ref}`process-when` for more information.
Copy file name to clipboardExpand all lines: docs/script.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
# Scripts
4
4
5
-
Nextflow is a workflow language that runs on the Java virtual machine (JVM). Nextflow's syntax is very similar to [Groovy](https://groovy-lang.org/), a scripting language for the JVM, but Nextflow is specialized for writing computational pipelines in a declarative manner. See {ref}`syntax-page` for a full description of the Nextflow language.
5
+
Nextflow is a workflow language that runs on the Java virtual machine (JVM). Nextflow's syntax is very similar to [Groovy](https://groovy-lang.org/), a scripting language for the JVM. However, Nextflow is specialized for writing computational pipelines in a declarative manner. See {ref}`syntax-page` for a full description of the Nextflow language.
6
6
7
7
Nextflow scripts can also make full use of the Java and Groovy standard libraries. See {ref}`stdlib-page` for more information.
8
8
@@ -45,7 +45,7 @@ println str
45
45
```
46
46
47
47
:::{warning}
48
-
Variables can also be declared without `def` in many cases, but this practice is discouraged outside of simple code snippets because it can lead to a {ref}`race condition <cache-global-var-race-condition>`.
48
+
Variables can also be declared without `def` in some cases. However, this practice is discouraged outside of simple code snippets because it can lead to a {ref}`race condition <cache-global-var-race-condition>`.
49
49
:::
50
50
51
51
## Lists
@@ -311,7 +311,7 @@ println square(9)
311
311
312
312
The above example prints `81`.
313
313
314
-
The main use case for a closure, however, is as an argument to a higher-order function:
314
+
The main use case for a closure is as an argument to a higher-order function:
315
315
316
316
```groovy
317
317
[ 1, 2, 3, 4 ].collect(square)
@@ -380,7 +380,7 @@ This way, the closure is fully "self-contained" because it doesn't access or mut
380
380
381
381
So far, we have been focusing on the basic building blocks of Nextflow code, like variables, lists, strings, and closures.
382
382
383
-
In practice, however, Nextflow scripts are composed of *workflows*, *processes*, and *functions* (collectively known as *definitions*), and they can *include* definitions from other scripts.
383
+
In practice, however, Nextflow scripts are composed of *workflows*, *processes*, and *functions* (collectively known as *definitions*), and can *include* definitions from other scripts.
384
384
385
385
To transition a code snippet into a proper workflow script, simply wrap it in a `workflow` block:
386
386
@@ -390,7 +390,7 @@ workflow {
390
390
}
391
391
```
392
392
393
-
This block is called the *entry workflow*. A script can only have one entry workflow, and it serves as the entrypoint when the script is executed. In fact, whenever a script contains only simple statements like `println 'Hello!'`, Nextflow simply treats it as an entry workflow!
393
+
This block is called the *entry workflow*. It serves as the entrypoint when the script is executed. A script can only have one entry workflow. Whenever a script contains only simple statements like `println 'Hello!'`, Nextflow simply treats it as an entry workflow.
394
394
395
395
You can also break up code into functions, for example:
0 commit comments