Skip to content

Commit 9444ed1

Browse files
committed
Apply suggestions from review
Signed-off-by: Ben Sherman <[email protected]>
1 parent 0645746 commit 9444ed1

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

docs/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ params.helper_file = "${projectDir}/assets/helper.txt"
4848

4949
### Blocks
5050

51-
A config scope can also be specified as a block, allowing multiple configuration options to be set within that block. For example:
51+
A config scope can also be specified as a block, which may contain multiple configuration options. For example:
5252

5353
```groovy
5454
// dot syntax

docs/process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Hello Mr. a
260260
Hello Mr. c
261261
```
262262

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.
264264

265265
(process-stub)=
266266

docs/reference/syntax.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ A Nextflow script may contain the following top-level declarations:
3737

3838
Script declarations are in turn composed of statements and expressions.
3939

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:
4141

4242
```groovy
4343
println 'Hello world!'
@@ -65,7 +65,7 @@ The first line of a script can be a [shebang](https://en.wikipedia.org/wiki/Sheb
6565

6666
### Feature flag
6767

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):
6969

7070
```groovy
7171
nextflow.preview.topic = true
@@ -79,7 +79,7 @@ An include declaration consists of an *include source* and one or more *include
7979
include { foo as bar } from './some/module'
8080
```
8181

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`.
8383

8484
Include clauses can be separated by semi-colons or newlines:
8585

@@ -109,7 +109,7 @@ The following definitions can be included:
109109

110110
### Parameter
111111

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:
113113

114114
```groovy
115115
params.message = 'Hello world!'
@@ -404,7 +404,7 @@ Multiple variables can be assigned in a single statement as long as the source e
404404

405405
Any [expression](#expressions) can be a statement.
406406

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).
408408

409409
### assert
410410

@@ -693,7 +693,7 @@ A list literal consists of a comma-separated list of zero or more expressions, e
693693

694694
### Map
695695

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:
697697

698698
```groovy
699699
[foo: 1, bar: 2, baz: 3]
@@ -952,6 +952,6 @@ Compound expressions are evaluated in the following order:
952952

953953
The following legacy features were excluded from this page because they are deprecated:
954954

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.
957957
- The implicit `it` closure parameter

docs/script.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Scripts
44

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.
66

77
Nextflow scripts can also make full use of the Java and Groovy standard libraries. See {ref}`stdlib-page` for more information.
88

@@ -45,7 +45,7 @@ println str
4545
```
4646

4747
:::{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>`.
4949
:::
5050

5151
## Lists
@@ -311,7 +311,7 @@ println square(9)
311311

312312
The above example prints `81`.
313313

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:
315315

316316
```groovy
317317
[ 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
380380

381381
So far, we have been focusing on the basic building blocks of Nextflow code, like variables, lists, strings, and closures.
382382

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.
384384

385385
To transition a code snippet into a proper workflow script, simply wrap it in a `workflow` block:
386386

@@ -390,7 +390,7 @@ workflow {
390390
}
391391
```
392392

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.
394394

395395
You can also break up code into functions, for example:
396396

0 commit comments

Comments
 (0)