Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation of named args #5171

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading