-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.nf
68 lines (60 loc) · 1.55 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
/*
Run cBioPortal Export
*/
process cBioPortalExport {
container 'sagebionetworks/geniesp'
secret 'SYNAPSE_AUTH_TOKEN'
input:
val cohort
val release
val production
val use_grs
output:
stdout
script:
if (production && use_grs) {
"""
geniesp $cohort $release \
--upload \
--cbioportal /usr/src/cbioportal \
--production \
--use-grs
"""
} else if (production && !use_grs){
"""
geniesp $cohort $release \
--upload \
--cbioportal /usr/src/cbioportal \
--production
"""
} else if (!production && use_grs){
"""
geniesp $cohort $release \
--upload \
--cbioportal /usr/src/cbioportal \
--use-grs
"""
} else {
"""
geniesp $cohort $release \
--upload \
--cbioportal /usr/src/cbioportal \
"""
}
}
workflow {
params.cohort = 'NSCLC' // Default
params.release = '1.1-consortium' // Default
params.production = false
params.use_grs = false
// Check if cohort is part of allowed cohort list
def allowed_cohorts = ["BLADDER", "BrCa", "CRC", "NSCLC", "PANC", "Prostate"]
if (!allowed_cohorts.contains(params.cohort)) {exit 1, 'Invalid cohort name'}
ch_cohort = Channel.value(params.cohort)
ch_release = Channel.value(params.release)
ch_production = Channel.value(params.production)
ch_use_grs = Channel.value(params.use_grs)
cBioPortalExport(ch_cohort, ch_release, ch_production, ch_use_grs)
}