-
Notifications
You must be signed in to change notification settings - Fork 1
/
comparison.nf
149 lines (126 loc) · 4.89 KB
/
comparison.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#! /usr/bin/env nextflow
/*
* Enable dsl2
*/
nextflow.enable.dsl = 2
params.cpus = "30"
params.mem = "10" //GB
process TrainTestSplit{
publishDir "${params.publish_dir}_${params.iter}_${params.kFold}/${task.process.replaceAll(':', '_')}", mode: "copy"
input:
path metabolome
path methylome
path proteome
path transcriptome
path clinical
output:
publishDir
tuple file("${params.kFold}_${params.label}_samples_train.txt"),file("${params.kFold}_${params.label}_samples_test.txt"),file("${params.kFold}_Merged_clinical_${params.label}_train.tsv")
script:
"""
cp $baseDir/result_20220912/ourBiomarker_GCN_out_${params.iter}/test_${params.kFold}/TrainTestSplit/* ./
"""
}
process DIABLO{
publishDir "${params.publish_dir}_${params.iter}_${params.kFold}/${task.process.replaceAll(':', '_')}", mode: "copy"
cpus params.cpus
memory "${params.mem} GB"
input:
path methylome
path proteome
path transcriptome
path clinical
tuple file(train_samples),file(test_samples),file(clinical_train)
output:
publishDir
file("DIABLO_performance.txt")
script:
"""
Rscript $baseDir/modules_comparativeAnalysis/DIABLO/diablo.R ${params.label} ${methylome} ${proteome} ${transcriptome} ${clinical} ${train_samples} ${test_samples}
"""
}
process MOGONET{
publishDir "${params.publish_dir}_${params.iter}_${params.kFold}/${task.process.replaceAll(':', '_')}", mode: "copy"
cpus params.cpus
memory "${params.mem} GB"
input:
path methylome
path proteome
path transcriptome
path clinical
tuple file(train_samples),file(test_samples),file(clinical_train)
output:
publishDir
file("MOGONET_performance.txt")
script:
"""
python $baseDir/modules_comparativeAnalysis/MOGONET/preprocessing.py --label ${params.label} --m ${methylome} --p ${proteome} --t ${transcriptome} --clin ${clinical} --train_samples ${train_samples} --test_samples ${test_samples}
python $baseDir/modules_comparativeAnalysis/MOGONET/main_mogonet.py
"""
}
process MOFA{
publishDir "${params.publish_dir}_${params.iter}_${params.kFold}/${task.process.replaceAll(':', '_')}", mode: "copy"
cpus params.cpus
memory "${params.mem} GB"
input:
path methylome
path proteome
path transcriptome
path clinical
tuple file(train_samples),file(test_samples),file(clinical_train)
output:
publishDir
file("MOFA_performance.txt")
script:
"""
Rscript $baseDir/modules_comparativeAnalysis/MOFA/MOFA.R ${params.label} ${methylome} ${proteome} ${transcriptome} ${clinical} ${train_samples} ${test_samples}
"""
}
process iDRW{
publishDir "${params.publish_dir}_${params.iter}_${params.kFold}/${task.process.replaceAll(':', '_')}", mode: "copy"
cpus params.cpus
memory "${params.mem} GB"
input:
path methylome
path proteome
path transcriptome
path clinical
tuple file(train_samples),file(test_samples),file(clinical_train)
output:
publishDir
file("iDRW_performance.txt")
script:
"""
Rscript $baseDir/modules_comparativeAnalysis/iDRW/iDRW.R ${params.label} ${methylome} ${proteome} ${transcriptome} ${clinical} ${train_samples} ${test_samples}
"""
}
/*
* run pipeline
*/
workflow{
TrainTestSplit(file(params.metabolome),
file(params.methylome),
file(params.proteome),
file(params.transcriptome),
file(params.clinical))
DIABLO(file(params.methylome),
file(params.proteome),
file(params.transcriptome),
file(params.clinical),
TrainTestSplit.out)
MOGONET(file(params.methylome),
file(params.proteome),
file(params.transcriptome),
file(params.clinical),
TrainTestSplit.out)
iDRW(file(params.methylome),
file(params.proteome),
file(params.transcriptome),
file(params.clinical),
TrainTestSplit.out)
MOFA(file(params.methylome),
file(params.proteome),
file(params.transcriptome),
file(params.clinical),
TrainTestSplit.out)
}