-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
39 lines (31 loc) · 1.03 KB
/
main.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env nextflow
@Grab('com.xlson.groovycsv:groovycsv:1.3')
import static com.xlson.groovycsv.CsvParser.parseCsv
nextflow.enable.dsl = 2
// Workflows
include { BUILD } from "./workflows/build"
include { EXTEND } from "./workflows/extend"
include { SUB } from "./workflows/sub"
// Modules
include { MERGE } from "./modules/merge.nf"
include { RENAME_INTEGRATIONS } from "./modules/rename_integrations.nf"
workflow {
if (params.mode == "build") {
BUILD()
subworkflow = BUILD.out
} else if (params.mode == "extend") {
EXTEND()
subworkflow = EXTEND.out
} else if (params.mode == "sub") {
SUB()
subworkflow = SUB.out
} else {
error "Invalid mode: ${params.mode}. Please enable one of the following profiles: 'build', 'extend', or 'sub'"
}
MERGE (
subworkflow.adata,
subworkflow.obsm.map{ meta, obsm -> obsm}.collect(),
subworkflow.obs.map{ meta, obs -> obs}.collect(),
)
RENAME_INTEGRATIONS(MERGE.out.adata)
}