-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRCMC.wdl
176 lines (147 loc) · 3.87 KB
/
RCMC.wdl
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version 1.0
workflow RCMC {
String pipeline_ver = 'dev'
String image_id = sub(pipeline_ver, "dev", "latest")
input {
File pairs
File chrom_sizes
String region
String sample_id
String hic_resolution
}
call filter_mapped_pairs_region { input:
pairs = pairs,
region = region,
sample_id = sample_id
}
call juicer_hic {input:
image_id = image_id,
sample_id = sample_id,
chrom_sizes = chrom_sizes,
mapped_pairs = filter_mapped_pairs_region.captured_pairs
}
call juicer_hic_res {input:
image_id = image_id,
sample_id = sample_id,
chrom_sizes = chrom_sizes,
mapped_pairs = filter_mapped_pairs_region.captured_pairs,
hic_resolution = hic_resolution
}
call cooler_res {input:
image_id = image_id,
sample_id = sample_id,
chrom_sizes = chrom_sizes,
mapped_pairs = filter_mapped_pairs_region.captured_pairs,
hic_resolution = hic_resolution
}
output {
File captured_pairs = filter_mapped_pairs_region.captured_pairs
String captured_perc = filter_mapped_pairs_region.perc
File hic = juicer_hic.hic
File hic_res = juicer_hic_res.hic
File cooler_raw_res = cooler_res.raw_mcool
File cooler_balanced_res = cooler_res.balanced_mcool
}
}
task filter_mapped_pairs_region {
input {
File pairs
String region
String sample_id
String disk = "20"
String memory = "40GB"
}
command {
python /home/RCMC.py -i ${pairs} -r ${region} -o ${sample_id}_captured.pairs
}
runtime {
docker: "salvacasani/rcmc:latest"
bootDiskSizeGb: 40
memory: memory
disks: "local-disk " + disk + " SSD"
}
output {
String perc = read_string(stdout())
File captured_pairs = "${sample_id}_captured.pairs"
}
}
task juicer_hic {
input {
String image_id
String sample_id
File chrom_sizes
File mapped_pairs
Int cores = 2
String memory = "40GB"
String disk = "200"
}
command {
java -Xmx32000m -Djava.awt.headless=true -jar /usr/local/bin/juicer_tools_1.22.01.jar pre \
--threads ${cores} \
${mapped_pairs} \
${sample_id}_captured.hic \
${chrom_sizes}
}
runtime {
docker: "us-central1-docker.pkg.dev/aryeelab/docker/juicer:${image_id}"
bootDiskSizeGb: 40
memory: memory
disks: "local-disk " + disk + " SSD"
}
output {
File hic = "${sample_id}_captured.hic"
}
}
task juicer_hic_res {
input {
String image_id
String sample_id
File chrom_sizes
File mapped_pairs
Int cores = 2
String memory = "40GB"
String disk = "200"
String hic_resolution
}
command {
java -Xmx32000m -Djava.awt.headless=true -jar /usr/local/bin/juicer_tools_1.22.01.jar pre \
--threads ${cores} -r ${hic_resolution}\
${mapped_pairs} \
${sample_id}_${hic_resolution}bp_captured.hic \
${chrom_sizes}
}
runtime {
docker: "us-central1-docker.pkg.dev/aryeelab/docker/juicer:${image_id}"
bootDiskSizeGb: 40
memory: memory
disks: "local-disk " + disk + " SSD"
}
output {
File hic = "${sample_id}_${hic_resolution}bp_captured.hic"
}
}
task cooler_res {
input {
String image_id
String sample_id
File chrom_sizes
File mapped_pairs
Int hic_resolution = "500"
String disk = "200"
}
command {
cooler cload pairs -c1 2 -p1 3 -c2 4 -p2 5 ${chrom_sizes}:${hic_resolution} ${mapped_pairs} ${sample_id}.cool
cooler zoomify --resolutions ${hic_resolution}N -o ${sample_id}.captured.raw.mcool -p 4 ${sample_id}.cool
cooler zoomify --resolutions ${hic_resolution}N -o ${sample_id}.captured.balanced.mcool -p 4 --balance --balance-args '--nproc 4' ${sample_id}.cool
}
runtime {
docker: "us-central1-docker.pkg.dev/aryeelab/docker/cooler:${image_id}"
cpu: 4
memory: "8GB"
disks: "local-disk " + disk + " SSD"
}
output {
File raw_mcool = "${sample_id}.captured.raw.mcool"
File balanced_mcool = "${sample_id}.captured.balanced.mcool"
}
}