forked from charlottekyng/usb-modules-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
465 lines (355 loc) · 10.9 KB
/
Makefile
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# Top-level Makefile
#
#
# Author: Raymond Lim <[email protected]>
#
export
# job-related options
NUM_ATTEMPTS ?= 1
USE_CLUSTER ?= true
NUM_JOBS ?= 100
# possible values: SGE, SLURM
CLUSTER_ENGINE ?= SLURM
EXCLUDE_NODE ?=
NOW := $(shell date +"%F")
MAKELOG = log/$(@).$(NOW).log
ifeq ($(USE_CLUSTER),true)
MAKE = usb-modules-v2/scripts/qmake.pl -n $@.$(NOW) -r $(NUM_ATTEMPTS) -m -s -- make
endif
define RUN_MAKE_J
$(MAKE) -e -f $1 -j $2 $(TARGET) && \
mkdir -p completed_tasks && \
touch completed_tasks/$@
endef
RUN_MAKE = $(call RUN_MAKE_J,$1,$(NUM_JOBS))
#########################################################
## The set of targets below have been at least
## somewhat tested
##########################################################
TARGETS += bwamem
bwamem :
$(call RUN_MAKE,usb-modules-v2/aligners/bwamemAligner.mk)
TARGETS += bwaaln
bwaaln :
$(call RUN_MAKE,usb-modules-v2/aligners/bwaalnAligner.mk)
TARGETS += star
star :
$(call RUN_MAKE,usb-modules-v2/aligners/starAligner.mk)
TARGETS += hisat2
hisat2 :
$(call RUN_MAKE,usb-modules-v2/aligners/hisat2Aligner.mk)
TARGETS += fastqc
fastqc :
$(call RUN_MAKE,usb-modules-v2/qc/fastqc.mk)
TARGETS += bam_metrics
bam_metrics :
$(call RUN_MAKE,usb-modules-v2/qc/bamMetrics.mk)
TARGETS += fix_rg
fix_rg :
$(call RUN_MAKE,usb-modules-v2/bam_tools/fixRG.mk)
TARGETS += split_and_trim
split_and_trim:
$(call RUN_MAKE,usb-modules-v2/bam_tools/splitandtrim.mk)
TARGETS += downsample_bam
downsample_bam :
$(call RUN_MAKE,usb-modules-v2/bam_tools/downsampleBam.mk)
TARGETS += mutect
mutect :
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/mutect.mk)
TARGETS += rsem
rsem :
$(call RUN_MAKE,usb-modules-v2/rnaseq/rsem.mk)
TARGETS += process_bam
process_bam :
$(call RUN_MAKE,usb-modules-v2/bam_tools/processBam.mk)
TARGETS += gatk
gatk :
$(call RUN_MAKE,usb-modules-v2/variant_callers/gatkVariantCaller.mk)
TARGETS += genotype
genotype :
$(call RUN_MAKE,usb-modules-v2/qc/genotype.mk)
TARGETS += mutation_summary
mutation_summary :
$(call RUN_MAKE,usb-modules-v2/summary/mutationSummary.mk)
TARGETS += pon
pon :
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/pon.mk)
TARGETS += mutect2_calculate_contamination
mutect2_calculate_contamination :
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/mutect2_calculate_contamination.mk)
TARGETS += mutect2
mutect2 : mutect2_calculate_contamination
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/mutect2.mk)
TARGETS += bam_clipoverlap
bam_clipoverlap :
$(call RUN_MAKE,usb-modules-v2/bam_tools/bam_clipoverlap.mk)
# Note, the "PAIRED_END=true" from config.inc does not seem to be picked up here,
# so using the more intuitive conditional ($(PAIRED_END),true) would work only if
# "PAIRED_END=true" was also set in the main Makefile.
# Because "PAIRED_END=false" must be explicitly set in case of SE, make the conditional around that.
# TARGETS += strelka_refs
# ifeq ($(PAIRED_END),false)
# strelka_refs :
# $(call RUN_MAKE,usb-modules-v2/bam_tools/strelka_refs.mk)
# else
# strelka_refs : bam_clipoverlap
# $(call RUN_MAKE,usb-modules-v2/bam_tools/strelka_refs.mk)
# endif
TARGETS += strelka
ifeq ($(strip $(PAIRED_END)$(REF)),falseb37)
strelka : bam_clipoverlap
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/strelka.mk)
else
strelka :
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/strelka.mk)
endif
TARGETS += strelka2
ifeq ($(PAIRED_END),false)
strelka2 :
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/strelka2_somatic.mk)
else
strelka2 : bam_clipoverlap
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/strelka2_somatic.mk)
endif
#TARGETS += strelka2_germline
#ifeq ($(PAIRED_END),false)
#strelka2_germline :
# $(call RUN_MAKE,usb-modules-v2/variant_callers/strelka2_germline.mk)
#else
#strelka2_germline : bam_clipoverlap
# $(call RUN_MAKE,usb-modules-v2/variant_callers/strelka2_germline.mk)
#endif
TARGETS += varscan_cnv
varscan_cnv :
$(call RUN_MAKE,usb-modules-v2/copy_number/varscanCNV.mk)
TARGETS += poolednorm_bam
poolednorm_bam :
$(call RUN_MAKE,usb-modules-v2/bam_tools/poolednormBam.mk)
TARGETS += screen_hotspots
screen_hotspots :
$(call RUN_MAKE,usb-modules-v2/qc/screenHotspot.mk)
TARGETS += facets
facets :
$(call RUN_MAKE,usb-modules-v2/copy_number/facets.mk)
TARGETS += facets_poolednorm
facets_poolednorm :
$(call RUN_MAKE,usb-modules-v2/copy_number/facets_poolednorm.mk)
TARGETS += cnvkit
cnvkit :
$(call RUN_MAKE,usb-modules-v2/copy_number/cnvkit.mk)
TARGETS += tvc_somatic
tvc_somatic :
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/TVC.mk)
TARGETS += pipeit
pipeit :
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/pipeit.mk)
TARGETS += ballgown
ballgown:
$(call RUN_MAKE,usb-modules-v2/rnaseq/ballgown.mk)
TARGETS += deconstruct_sigs
deconstruct_sigs :
$(call RUN_MAKE,usb-modules-v2/mut_sigs/deconstructSigs.mk)
TARGETS += mutational_patterns
mutational_patterns :
$(call RUN_MAKE,usb-modules-v2/mut_sigs/MutationalPatterns.mk)
TARGETS += lst
lst :
$(call RUN_MAKE,usb-modules-v2/mut_sigs/lst.mk)
TARGETS += msisensor
msisensor :
$(call RUN_MAKE,usb-modules-v2/mut_sigs/msiSensor.mk)
TARGETS += mosaics
mosaics :
$(call RUN_MAKE,usb-modules-v2/chipseq/mosaics.mk)
TARGETS += macs2
macs2 :
$(call RUN_MAKE,usb-modules-v2/chipseq/macs2.mk)
TARGETS += absolute_seq
absolute_seq :
$(call RUN_MAKE,usb-modules-v2/clonality/absoluteSeq.mk)
TARGETS += pyclone
pyclone :
$(call RUN_MAKE,usb-modules-v2/clonality/pyclone.mk)
TARGETS += expands
expands :
$(call RUN_MAKE,usb-modules-v2/clonality/expands.mk)
TARGETS += star_fusion
star_fusion :
$(call RUN_MAKE,usb-modules-v2/sv_callers/starFusion.mk)
TARGETS += contest
contest :
$(call RUN_MAKE,usb-modules-v2/qc/contest.mk)
# annotate external vcfs
TARGETS += ann_ext_vcf
ann_ext_vcf:
$(call RUN_MAKE,usb-modules-v2/vcf_tools/annotateExtVcf.mk)
TARGETS += tvc
tvc :
$(call RUN_MAKE,usb-modules-v2/variant_callers/TVC.mk)
TARGETS += sufam_screen
sufam_screen :
$(call RUN_MAKE,usb-modules-v2/variant_callers/sufam.mk)
TARGETS += fusion_ts
fusion_ts :
$(call RUN_MAKE,usb-modules-v2/sv_callers/fusionTS.mk)
#########################################################
## The set of targets below have NOT been tested,
## or are known to be broken/obsolete.
##########################################################
TARGETS += pvacseq
pvacseq :
$(call RUN_MAKE,usb-modules-v2/neoepitopes/pvacseq.mk)
TARGETS += merge_fastq
merge_fastq :
$(call RUN_MAKE,modules/fastq_tools/mergeFastq.mk)
TARGETS += tophat_fusion
tophat_fusion :
$(call RUN_MAKE,usb-modules/sv_callers/tophatFusion.mk)
TARGETS += cufflinks
cufflinks :
$(call RUN_MAKE,usb-modules-v2/rnaseq/cufflinks.mk)
# not tested on the cluster
# requires x11 for graphics
#TARGETS += interval_qc
#interval_qc :
# $(call RUN_MAKE,modules/qc/intervalBamQC.mk)
#TARGETS += jsm
#jsm :
# $(call RUN_MAKE,modules/variant_callers/somatic/jsm.mk)
#TARGETS += varscan_fpfilter
#varscan_fpfilter :
# $(call RUN_MAKE,modules/variant_callers/varscanFpfilter.mk)
TARGETS += varscanTN
varscanTN :
$(call RUN_MAKE,usb-modules-v2/variant_callers/somatic/varscanTN.mk)
TARGETS += varscan
varscan :
$(call RUN_MAKE,modules/variant_callers/varscan.mk)
# single sample mutation seq
TARGETS += merge_vcfTN
merge_vcfTN :
$(call RUN_MAKE,modules/vcf_tools/vcfMergeTN.mk)
TARGETS += compare_vcf
compare_vcf :
$(call RUN_MAKE,modules/vcf_tools/vcfCompare.mk)
TARGETS += merge_vcf_platform
merge_vcf_platform :
$(call RUN_MAKE,modules/vcf_tools/vcfMergePlatform.mk)
TARGETS += compare_vcfTN
compare_vcfTN :
$(call RUN_MAKE,modules/vcf_tools/vcfCompareTN.mk)
TARGETS += qualimap
qualimap :
$(call RUN_MAKE,modules/qc/qualimap.mk)
TARGETS += hmmcopy
hmmcopy :
$(call RUN_MAKE,modules/copy_number/hmmCopy.mk)
TARGETS += nfuse_wgss_wtss
nfuse_wgss_wtss :
$(call RUN_MAKE,modules/copy_number/nfuseWGSSWTSS.mk)
TARGETS += sum_reads
sum_reads :
$(call RUN_MAKE,usb-modules-v2/rnaseq/sumRNASeqReads.mk)
TARGETS += gistic
gistic :
$(call RUN_MAKE,modules/copy_number/gistic.mk)
TARGETS += gistic_facets
gistic_facets :
$(call RUN_MAKE,usb-modules-v2/copy_number/gisticFacets.mk)
NUM_DEFUSE_JOBS ?= 5
TARGETS += defuse
defuse :
$(call RUN_MAKE_J,modules/sv_callers/defuse.mk,$(NUM_DEFUSE_JOBS))
NUM_CHIMSCAN_JOBS ?= 5
TARGETS += chimscan
chimscan :
$(call RUN_MAKE_J,modules/sv_callers/chimerascan.mk,$(NUM_CHIMSCAN_JOBS))
TARGETS += oncofuse
oncofuse :
$(call RUN_MAKE,modules/sv_callers/oncofuse.mk)
TARGETS += lumpy
lumpy :
$(call RUN_MAKE,modules/sv_callers/lumpy.mk)
TARGETS += hydra
hydra :
$(call RUN_MAKE,modules/sv_callers/hydra.mk)
TARGETS += pindel
pindel :
$(call RUN_MAKE,modules/variant_callers/pindel.mk)
TARGETS += scalpel
scalpel :
$(call RUN_MAKE,modules/variant_callers/somatic/scalpel.mk)
TARGETS += snp6
snp6 :
$(call RUN_MAKE,modules/snp6/snp6.mk)
TARGETS += soapfuse
soapfuse :
$(call RUN_MAKE,modules/sv_callers/soapFuse.mk)
TARGETS += mapsplice
mapsplice :
$(call RUN_MAKE,modules/sv_callers/mapsplice.mk)
TARGETS += fusioncatcher
fusioncatcher :
$(call RUN_MAKE,modules/sv_callers/fusioncatcher.mk)
TARGETS += crest
crest :
$(call RUN_MAKE,modules/sv_callers/crest.mk)
TARGETS += extract_fastq
extract_fastq :
$(call RUN_MAKE,modules/fastq_tools/extractFastq.mk)
TARGETS += titan
titan :
$(call RUN_MAKE,modules/copy_number/titan.mk)
TARGETS += ann_titan
ann_titan :
$(call RUN_MAKE,modules/copy_number/annotateTitan.mk)
TARGETS += samtools_het
samtools_het :
$(call RUN_MAKE,modules/variant_callers/samtoolsHet.mk)
TARGETS += merge_strelka_varscan
merge_strelka_varscan :
$(call RUN_MAKE,modules/variant_callers/somatic/mergeStrelkaVarscanIndels.mk)
TARGETS += rseqc
rseqc :
$(call RUN_MAKE,modules/qc/rseqc.mk)
TARGETS += integrate_rnaseq
integrate_rnaseq :
$(call RUN_MAKE,modules/sv_callers/integrateRnaseq.mk)
TARGETS += integrate
integrate :
$(call RUN_MAKE,modules/sv_callers/integrate.mk)
TARGETS += merge_split_fastq
merge_split_fastq :
$(call RUN_MAKE,modules/fastq_tools/mergeSplitFastq.mk)
TARGETS += virus_detection_bowtie2
virus_detection_bowtie2 :
$(call RUN_MAKE,modules/virus/virus_detection_bowtie2.mk)
TARGETS += gatk_validation
gatk_validation :
$(call RUN_MAKE,modules/variant_callers/somatic/gatkValidation.mk)
TARGETS += samtools_validation
samtools_validation :
$(call RUN_MAKE,modules/variant_callers/somatic/samtoolsValidation.mk)
TARGETS += norm_copynum
norm_copynum :
$(call RUN_MAKE,modules/copy_number/normalisedCopyNum.mk)
TARGETS += recurrent_mutations
recurrent_mutations :
$(call RUN_MAKE,modules/recurrent_mutations/report.mk)
TARGETS += brass
brass :
$(call RUN_MAKE,modules/sv_callers/brass.mk)
TARGETS += mutsig_report
mutsig_report :
$(call RUN_MAKE,modules/mut_sigs/mutSigReport.mk)
# standalone bam file merger
TARGETS += merge_bam
merge_bam :
$(call RUN_MAKE,usb-modules-v2/bam_tools/mergeBam.mk)
TARGETS += mutsigcv
mutsigcv :
$(call RUN_MAKE,usb-modules-v2/siggenes/mutsigcv.mk)
TARGETS += youn_and_simon
youn_and_simon :
$(call RUN_MAKE,usb-modules-v2/siggenes/youn_and_simon.mk)
.PHONY : $(TARGETS)