Skip to content

Commit ac1dd3f

Browse files
authored
Merge pull request #384 from nadnein/docs/add_cli_arguments
Add --delimiter argument to CLI post-run docs
2 parents d0e33c8 + dd631ce commit ac1dd3f

1 file changed

Lines changed: 13 additions & 17 deletions

File tree

docs/usage/extension.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,23 @@ The plugin provides some [extension points](https://nextflow.io/docs/latest/plug
1818

1919
In CLI/extension post-run mode, workflow metadata is reconstructed using the trace file (e.g., start/end time, duration) and synthetic/runtime values (e.g., run name, command line), and may differ from reports generated during an integrated plugin run.
2020

21+
#### Shared arguments
22+
23+
Both modes accept the following arguments:
24+
25+
- **tracePath** *(required)*: Path to the execution trace file.
26+
- **delimiter**: Column separator used in the trace file. Defaults to `'\t'`.
27+
2128
#### From the command line
2229
The command line functionality utilizes Nextflow configs, like the regular plugin (see [parameters.md](./parameters.md)).
2330
It is recommended to set the output paths and a fixed carbon intensity value (`ci`) in the config.
2431
```bash
25-
nextflow plugin nf-co2footprint:postRun --config <path_to_nextflow.config> --tracePath <path_to_execution_trace.txt>
32+
nextflow plugin nf-co2footprint:postRun --tracePath <path_to_execution_trace.txt> [--config <path_to_nextflow.config>] [--delimiter <delimiter>]
2633
```
2734

35+
In addition to the [shared arguments](#shared-arguments):
2836

37+
- **--config**: Path to a Nextflow config file (output paths, carbon intensity, etc.).
2938

3039
#### Within a workflow through functions
3140
The interaction follows the [Nextflow extension function schema](https://nextflow.io/docs/latest/plugins/developing-plugins.html#functions).
@@ -58,23 +67,10 @@ workflow {
5867

5968
##### Functions
6069
###### `parseTraceFile`
61-
Parse the trace file into a list of TraceRecord instances.
62-
63-
- **tracePath**:
64-
Path to a trace file
65-
66-
- **delimiter**:
67-
Deliming character of the tabular trace file. Defaults to `'\t'`.
70+
Parse the trace file into a list of TraceRecord instances. Accepts the [shared arguments](#shared-arguments).
6871

6972
###### `calculateCO2`
70-
Can be used to calculate the emissions of a trace.
71-
72-
- **tracePath**:
73-
Path to the trace file
73+
Calculate the emissions of a trace. Accepts the [shared arguments](#shared-arguments), plus:
7474

75-
- **configModifications**:
76-
Temporarily overrides parameters in the `co2footprint` block of the current Nextflow configuration for a single extension function call. The provided map is merged with the existing configuration and does not affect the overall workflow run. Can be used to adjust settings such as output paths or carbon intensity for post-run estimations. Defaults to [:].
75+
- **configModifications**: Temporarily overrides parameters in the `co2footprint` block of the current Nextflow configuration for this call. The provided map is merged with the existing configuration and does not affect the overall workflow run. Defaults to `[:]`.
7776
Example: `[trace: [file: <Path_to_your_output_trace_file>], ci: <Your_carbon_intensity>]`
78-
79-
- **delimiter**:
80-
Delimiter that is used withing execution trace file. Defaults to `'\t'`.

0 commit comments

Comments
 (0)