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/side_quests/workflows_of_workflows.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,21 @@ One of the most powerful features of Nextflow is its ability to compose complex
5
5
Let's explore why workflow composition is so important. When you're developing a pipeline, you often find yourself creating similar sequences of processes for different data types or analysis steps. Without workflow composition, you might end up copying and pasting these process sequences, leading to duplicated code that's hard to maintain. Or you might create one massive workflow that's difficult to understand and modify.
6
6
7
7
With workflow composition, you can:
8
+
8
9
- Break down complex pipelines into logical, reusable units
9
10
- Test each workflow module independently
10
11
- Mix and match workflows to create new pipelines
11
12
- Share common workflow modules across different pipelines
12
13
- Make your code more maintainable and easier to understand
13
14
14
15
In this side quest, we'll create a pipeline that demonstrates these benefits by:
16
+
15
17
1. Creating independent workflow modules that can be tested and used separately
16
18
2. Composing these modules into a larger pipeline
17
19
3. Using Nextflow's workflow composition features to manage data flow between modules
- Feeds the timestamped greetings into the transform workflow
232
239
- Produces both uppercase and reversed versions of the greetings
@@ -236,6 +243,7 @@ You should now have a complete pipeline that:
236
243
In this side quest, we've explored the powerful concept of workflow composition in Nextflow, which allows us to build complex pipelines from smaller, reusable components. Here's what we've accomplished:
237
244
238
245
1. **Created Modular Workflows**: We built two independent workflow modules:
246
+
239
247
- A `GREETING_WORKFLOW` that validates names, creates greetings, and adds timestamps
240
248
- A `TRANSFORM_WORKFLOW` that converts text to uppercase and reverses it
241
249
@@ -248,6 +256,7 @@ In this side quest, we've explored the powerful concept of workflow composition
248
256
5. **Practiced Modular Design**: We experienced firsthand how breaking a pipeline into logical components makes the code more maintainable and easier to understand.
249
257
250
258
This modular approach offers several advantages over monolithic pipelines:
259
+
251
260
- Each workflow can be developed, tested, and debugged independently
252
261
- Workflows can be reused across different pipelines
253
262
- The overall pipeline structure becomes more readable and maintainable
@@ -260,6 +269,7 @@ By mastering workflow composition, you're now equipped to build more sophisticat
260
269
### Key Concepts
261
270
262
271
1. **Workflow Inclusion**
272
+
263
273
```nextflow
264
274
// Include a single workflow
265
275
include { WORKFLOW_NAME } from './path/to/workflow'
@@ -272,6 +282,7 @@ By mastering workflow composition, you're now equipped to build more sophisticat
0 commit comments