Skip to content

Commit

Permalink
Improve documentation of named args (#5171) [ci skip]
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman authored Sep 26, 2024
1 parent 25e5eba commit d0a5162
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/reference/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ The `collectFile` operator collects the items from a source channel and saves th

This operator has multiple variants:

`collectFile( name: '...', options = [:] )`
`collectFile( name: '...', [options] )`

: Collects the items and saves them to a single file specified by the `name` option:

```{literalinclude} ../snippets/collectfile.nf
:language: groovy
```

`collectFile( closure, options = [:] )`
`collectFile( closure, [options] )`

: Collects the items into groups and saves each group to a file, using a grouping criteria. The grouping criteria is a {ref}`closure <script-closure>` that maps each item to a pair, where the first element is the file name for the group and the second element is the content to be appended to that file. For example:

Expand Down
6 changes: 3 additions & 3 deletions docs/reference/stdlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ The following functions are available in Nextflow scripts:
:::
: Stop the pipeline execution and return an exit code and optional error message.

`file( filePattern, options = [:] )`
`file( filePattern, [options] )`
: Get one or more files from a path or glob pattern. Returns a [Path](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Path.html) or list of Paths if there are multiple files.

: The following options are available:
Expand All @@ -226,7 +226,7 @@ The following functions are available in Nextflow scripts:

: See also: {ref}`Channel.fromPath <channel-path>`.

`files( filePattern, options = [:] )`
`files( filePattern, [options] )`
: Convenience method for `file()` that always returns a list.

`groupKey( key, size )`
Expand Down Expand Up @@ -593,7 +593,7 @@ The following methods are available for manipulating files and directories in a
file('any/path').mkdirs()
```

`mklink( linkName, options = [:] )`
`mklink( linkName, [options] )`
: Creates a *filesystem link* to a given path:

```groovy
Expand Down

0 comments on commit d0a5162

Please sign in to comment.