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/module.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,14 +196,14 @@ Project L
196
196
└── P2-template.sh
197
197
```
198
198
199
-
Projects A contains a workflow that includes processes P1 and P2:
199
+
Project A contains a workflow that includes processes P1 and P2:
200
200
201
201
```
202
202
Project A
203
203
└── main.nf
204
204
```
205
205
206
-
Pipeline B contains a workflow that also includes process P1 and P2:
206
+
Project B contains a workflow that also includes process P1 and P2:
207
207
208
208
```
209
209
Project B
@@ -212,11 +212,11 @@ Project B
212
212
213
213
As the template files are stored with the modules inside the Project L, Projects A and B can include them without any changing any code. Future projects would also be able to include these modules by cloning Project L and including its module (if they were not available on the system).
214
214
215
-
Keeping the module template within the script path has several advantages beyond facilitating module sharing across pipelines:
215
+
Beyond facilitating module sharing across pipelines, keeping the module template within the script path has several advantages, including:
216
216
217
-
1. Modules are self-contained
218
-
2. Modules can be tested independently from the pipeline(s) that import them
219
-
3. Modules can be made into libraries
217
+
- Modules are self-contained.
218
+
- Modules can be tested independently from the pipeline(s) that import them.
219
+
- Modules can be made into libraries.
220
220
221
221
Organizing templates locations allows for a well-structured project. In projects with multiple modules that rely on templates, you can organize module scripts and their corresponding templates into logical groups. For example:
222
222
@@ -276,7 +276,7 @@ Binary scripts must be placed in the module directory named `<module-dir>/resour
276
276
Module binary scripts require a local or shared file system for the pipeline work directory, or {ref}`wave-page` when using cloud-based executors.
277
277
:::
278
278
279
-
Scripts can also be stored at the pipeline level using the `bin` directory. See {ref}`bin directory <bundling-executable>` for more information.
279
+
Scripts can also be stored at the pipeline level using the `bin` directory. See {ref}`bundling-executables` for more information.
Copy file name to clipboardExpand all lines: docs/process.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ workflow {
112
112
```
113
113
114
114
:::{tip}
115
-
As the location of the interpreter binary file can differ across platforms. Use `env` to resolve the interpreter's location instead of hard-coding the interpreter path. For example:
115
+
Use `env` to resolve the interpreter's location instead of hard-coding the interpreter path. For example:
116
116
117
117
```
118
118
#!/usr/bin/env python
@@ -160,7 +160,7 @@ In the above example, the process will execute one of several scripts depending
160
160
161
161
### Template
162
162
163
-
Process scripts can be externalized to **template** files and accessed using the `template` function in the script section. For example:
163
+
Process scripts can be externalized to **template** files and reused across multiple processes. Templates can be accessed using the `template` function in the script section. For example:
164
164
165
165
```nextflow
166
166
process templateExample {
@@ -176,7 +176,7 @@ workflow {
176
176
}
177
177
```
178
178
179
-
By default, Nextflow looks for template scripts in the `templates` directory, located alongside the Nextflow script that defines the process. A template can be reused across multiple processes. An absolute path can be used to specify a different template location. However, this practice is discouraged because it hinders pipeline portability.
179
+
By default, Nextflow looks for template scripts in the `templates` directory, located alongside the Nextflow script that defines the process. An absolute path can be used to specify a different template location. However, this practice is discouraged because it hinders pipeline portability.
180
180
181
181
Templates can be tested independently of pipeline execution. However, variables prefixed with the dollar character (`$`) are interpreted as Nextflow variables when the template script is executed by Nextflow and Bash variables when executed directly. Consider the following template script:
Copy file name to clipboardExpand all lines: docs/sharing.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,15 +108,15 @@ Executable scripts can be included in the pipeline `bin` directory located at th
108
108
Each script should include a shebang line to specify the interpreter for the script.
109
109
110
110
:::{tip}
111
-
As the location of the interpreter binary file can differ across platforms. Use `env` to resolve the interpreter's location instead of hard-coding the interpreter path. For example:
111
+
Use `env` to resolve the interpreter's location instead of hard-coding the interpreter path. For example:
112
112
113
113
```
114
114
#!/usr/bin/env python
115
115
```
116
116
117
117
:::
118
118
119
-
Scripts placed in the `bin` directory must have executable permissions. Use the `chmod` command to grant the required permissions. For example:
119
+
Scripts placed in the `bin` directory must have executable permissions. Use `chmod` to grant the required permissions. For example:
0 commit comments