-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
628 lines (461 loc) · 14.1 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
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
ifneq ("$(wildcard config.inc)", "")
include config.inc
endif
ifneq ("$(wildcard project_config.inc)", "")
include project_config.inc
endif
include modules/config.inc
export
NUM_ATTEMPTS ?= 10
NOW := $(shell date +"%F")
MAKELOG = log/$(@).$(NOW).log
USE_CLUSTER ?= true
QMAKE = modules/scripts/qmake.pl -n $@.$(NOW) $(if $(SLACK_CHANNEL),-c $(SLACK_CHANNEL)) -r $(NUM_ATTEMPTS) -m -s -- make
NUM_JOBS ?= 100
define RUN_QMAKE
$(QMAKE) -e -f $1 -j $2 $(TARGET) && \
mkdir -p completed_tasks && \
touch completed_tasks/$@
endef
RUN_MAKE = $(if $(findstring false,$(USE_CLUSTER))$(findstring n,$(MAKEFLAGS)),+$(MAKE) -f $1,$(call RUN_QMAKE,$1,$(NUM_JOBS)))
#==================================================
# workflows
#==================================================
TARGETS += somatic_indels
somatic_indels :
$(call RUN_MAKE,modules/variant_callers/somatic/somaticIndels.mk)
TARGETS += somatic_variants
somatic_variants :
$(call RUN_MAKE,modules/variant_callers/somatic/somaticVariants.mk)
#==================================================
# aligners
#==================================================
TARGETS += bwamem
bwamem :
$(call RUN_MAKE,modules/aligners/bwamemAligner.mk)
TARGETS += bwa
bwa : NUM_ATTEMPTS = 50
bwa :
$(call RUN_MAKE,modules/aligners/bwaAligner.mk)
TARGETS += bowtie
bowtie : NUM_ATTEMPTS = 50
bowtie :
$(call RUN_MAKE,modules/aligners/bowtieAligner.mk)
TARGETS += tmap
tmap : NUM_ATTEMPTS = 50
tmap :
$(call RUN_MAKE,modules/aligners/tmapAligner.mk)
TARGETS += hisat
hisat :
$(call RUN_MAKE,modules/aligners/hisatAligner.mk)
TARGETS += tophat
tophat :
$(call RUN_MAKE,modules/aligners/tophatAligner.mk)
TARGETS += star
star :
$(call RUN_MAKE,modules/aligners/starAligner.mk)
TARGETS += star_fusion_aligner
star_fusion_aligner :
$(call RUN_MAKE,modules/aligners/starFusionAligner.mk)
TARGETS += blast_reads
blast_reads :
$(call RUN_MAKE,modules/fastq_tools/blastReads.mk)
#==================================================
# variant callers
#==================================================
TARGETS += mutect
mutect :
$(call RUN_MAKE,modules/variant_callers/somatic/mutect.mk)
TARGETS += mutect2
mutect2 :
$(call RUN_MAKE,modules/variant_callers/somatic/mutect2.mk)
TARGETS += somatic_sniper
somatic_sniper :
$(call RUN_MAKE,modules/variant_callers/somatic/somaticSniper.mk)
TARGETS += snvmix
snvmix :
$(call RUN_MAKE,modules/variant_callers/snvmix.mk)
TARGETS += tvcTN
tvcTN :
$(call RUN_MAKE,modules/variant_callers/somatic/tvcTN.mk)
TARGETS += tvc
tvc :
$(call RUN_MAKE,modules/variant_callers/tvc.mk)
TARGETS += varscanTN
varscanTN :
$(call RUN_MAKE,modules/variant_callers/somatic/varscanTN.mk)
TARGETS += varscan
varscan :
$(call RUN_MAKE,modules/variant_callers/varscan.mk)
TARGETS += strelka
strelka :
$(call RUN_MAKE,modules/variant_callers/somatic/strelka.mk)
TARGETS += scalpel
scalpel :
$(call RUN_MAKE,modules/variant_callers/somatic/scalpel.mk)
TARGETS += lancet
lancet :
$(call RUN_MAKE,modules/variant_callers/somatic/lancet.mk)
TARGETS += pindelTN
pindelTN :
$(call RUN_MAKE,modules/variant_callers/somatic/pindelTN.mk)
TARGETS += pindel
pindel :
$(call RUN_MAKE,modules/variant_callers/pindel.mk)
TARGETS += gatk
gatk :
$(call RUN_MAKE,modules/variant_callers/gatk.mk)
TARGETS += haplotype_caller
haplotype_caller :
$(call RUN_MAKE,modules/variant_callers/haplotypeCaller.mk)
TARGETS += samtools_het
samtools_het :
$(call RUN_MAKE,modules/variant_callers/samtoolsHet.mk)
TARGETS += platypus
platypus :
$(call RUN_MAKE,modules/variant_callers/somatic/platypus.mk)
TARGETS += msisensor
msisensor :
$(call RUN_MAKE,modules/variant_callers/somatic/msisensor.mk)
TARGETS += hla_polysolver
hla_polysolver :
$(call RUN_MAKE,modules/variant_callers/somatic/polysolver.mk)
TARGETS += pyrohmm
pyrohmm :
$(call RUN_MAKE,modules/variant_callers/pyroHMMVar.mk)
TARGETS += museqTN
museqTN :
$(call RUN_MAKE,modules/variant_callers/somatic/museqTN.mk)
TARGETS += hotspot
hotspot :
$(call RUN_MAKE,modules/variant_callers/hotspot.mk)
TARGETS += jsm
jsm :
$(call RUN_MAKE,modules/variant_callers/somatic/jsm.mk)
TARGETS += sufam
sufam:
$(call RUN_MAKE,modules/variant_callers/sufamsampleset.mk)
TARGETS += sufam_gt
sufam_gt :
$(call RUN_MAKE,modules/variant_callers/sufam_gt.mk)
TARGETS += get_basecount
get_basecount :
$(call RUN_MAKE,modules/variant_callers/get_basecounts.mk)
TARGETS += strelka_varscan_indels
strelka_varscan_indels :
$(call RUN_MAKE,modules/variant_callers/somatic/strelkaVarscanIndels.mk)
#==================================================
# copy number
#==================================================
TARGETS += facets
facets :
$(call RUN_MAKE,modules/copy_number/facets.mk)
TARGETS += facets_suite
facets_suite :
$(call RUN_MAKE,modules/copy_number/facets_suite.mk)
TARGETS += ascat
ascat :
$(call RUN_MAKE,modules/copy_number/ascat.mk)
TARGETS += norm_copynum
norm_copynum :
$(call RUN_MAKE,modules/copy_number/normalisedCopyNum.mk)
TARGETS += titan
titan :
$(call RUN_MAKE,modules/copy_number/titan.mk)
TARGETS += varscan_cnv
varscan_cnv :
$(call RUN_MAKE,modules/copy_number/varscanCNV.mk)
TARGETS += hmmcopy
hmmcopy :
$(call RUN_MAKE,modules/copy_number/hmmCopy.mk)
TARGETS += freec
freec :
$(call RUN_MAKE,modules/copy_number/controlFreeC.mk)
TARGETS += freecTN
freecTN :
$(call RUN_MAKE,modules/copy_number/controlFreeCTN.mk)
TARGETS += freec_lohTN
freec_lohTN :
$(call RUN_MAKE,modules/copy_number/controlFreeCLOHTN.mk)
TARGETS += exomecnv
exomecnv :
$(call RUN_MAKE,modules/copy_number/exomeCNV.mk)
TARGETS += exomecnvloh
exomecnvloh :
$(call RUN_MAKE,modules/copy_number/exomeCNVLOH.mk)
TARGETS += gistic
gistic :
$(call RUN_MAKE,modules/copy_number/gistic.mk)
TARGETS += snp6
snp6 :
$(call RUN_MAKE,modules/snp6/snp6.mk)
TARGETS += cnv_kit
cnv_kit :
$(call RUN_MAKE,modules/copy_number/cnvkit.mk)
#==================================================
# RNAseq structural variant callers
#==================================================
TARGETS += star_fusion
star_fusion :
$(call RUN_MAKE,modules/sv_callers/starFusion.mk)
TARGETS += tophat_fusion
tophat_fusion :
$(call RUN_MAKE,modules/sv_callers/tophatFusion.mk)
TARGETS += manta_rnaseq
manta_rnaseq :
$(call RUN_MAKE,modules/sv_callers/mantaRnaseq.mk)
TARGETS += integrate_rnaseq
integrate_rnaseq :
$(call RUN_MAKE,modules/sv_callers/integrateRnaseq.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 += oncofuse
oncofuse :
$(call RUN_MAKE,modules/sv_callers/oncofuse.mk)
#==================================================
# DNA structural variant callers
#==================================================
TARGETS += manta_tumor_normal
manta_tumor_normal :
$(call RUN_MAKE,modules/sv_callers/manta_tumor_normal.mk)
TARGETS += svaba_tumor_normal
svaba_tumor_normal :
$(call RUN_MAKE,modules/sv_callers/svaba_tumor_normal.mk)
TARGETS += gridss_tumor_normal
gridss_tumor_normal :
$(call RUN_MAKE,modules/sv_callers/gridss_tumor_normal.mk)
TARGETS += manta
manta :
$(call RUN_MAKE,modules/sv_callers/manta.mk)
TARGETS += brass
brass :
$(call RUN_MAKE,modules/sv_callers/brass.mk)
TARGETS += integrate
integrate :
$(call RUN_MAKE,modules/sv_callers/integrate.mk)
TARGETS += defuse
defuse :
$(call RUN_MAKE,modules/sv_callers/defuse.mk)
NUM_CHIMSCAN_JOBS ?= 5
TARGETS += chimscan
chimscan :
$(call RUN_MAKE_J,modules/sv_callers/chimerascan.mk,$(NUM_CHIMSCAN_JOBS))
TARGETS += lumpy
lumpy :
$(call RUN_MAKE,modules/sv_callers/lumpy.mk)
TARGETS += hydra
hydra :
$(call RUN_MAKE,modules/sv_callers/hydra.mk)
TARGETS += nfuse_wgss_wtss
nfuse_wgss_wtss :
$(call RUN_MAKE,modules/sv_callers/nfuseWGSSWTSS.mk)
TARGETS += crest
crest :
$(call RUN_MAKE,modules/sv_callers/crest.mk)
TARGETS += delly
delly :
$(call RUN_MAKE,modules/sv_callers/delly.mk)
#==================================================
# BAM tools
#==================================================
TARGETS += fix_bam
fix_bam :
$(call RUN_MAKE,modules/bam_tools/fix_bam.mk)
TARGETS += fix_rg
fix_rg :
$(call RUN_MAKE,modules/bam_tools/fix_rg.mk)
TARGETS += fix_mate
fix_mate :
$(call RUN_MAKE,modules/bam_tools/fix_mate.mk)
TARGETS += merge_bam
merge_bam :
$(call RUN_MAKE,modules/bam_tools/merge_bam.mk)
TARGETS += process_bam
process_bam :
$(call RUN_MAKE,modules/bam_tools/processBam.mk)
TARGETS += getbam_irb_mirror
getbam_irb_mirror :
$(call RUN_MAKE,modules/bam_tools/get_bam_irb_mirror.mk)
TARGETS += getbam_data_mirror
getbam_data_mirror :
$(call RUN_MAKE,modules/bam_tools/get_bam_data_mirror.mk)
TARGETS += putbam_data_mirror
putbam_data_mirror :
$(call RUN_MAKE,modules/bam_tools/put_bam_data_mirror.mk)
#==================================================
# VCF tools
#==================================================
TARGETS += merge_sv
merge_sv :
$(call RUN_MAKE,modules/vcf_tools/merge_sv.mk)
TARGETS += annotate_sv
annotate_sv :
$(call RUN_MAKE,modules/vcf_tools/annotate_sv.mk)
#==================================================
# FASTQ tools
#==================================================
TARGETS += merge_fastq
merge_fastq :
$(call RUN_MAKE,modules/fastq_tools/mergeFastq.mk)
TARGETS += merge_split_fastq
merge_split_fastq :
$(call RUN_MAKE,modules/fastq_tools/mergeSplitFastq.mk)
TARGETS += extract_fastq
extract_fastq :
$(call RUN_MAKE,modules/fastq_tools/extractFastq.mk)
TARGETS += extract_unmapped
extract_unmapped :
$(call RUN_MAKE,modules/fastq_tools/extractReads.mk)
TARGETS += extract_unmapped_pairs
extract_unmapped_pairs :
$(call RUN_MAKE,modules/fastq_tools/extractunmappedpairs.mk)
TARGETS += bam_to_fasta
bam_to_fasta :
$(call RUN_MAKE,modules/fastq_tools/bamtoFasta.mk)
#==================================================
# QC
#==================================================
TARGETS += bam_metrics
bam_metrics :
$(call RUN_MAKE,modules/qc/bam_metrics.mk)
TARGETS += bam_interval_metrics
bam_interval_metrics :
$(call RUN_MAKE,modules/qc/bam_interval_metrics.mk)
TARGETS += wgs_metrics
wgs_metrics :
$(call RUN_MAKE,modules/qc/wgs_metrics.mk)
TARGETS += rnaseq_metrics
rnaseq_metrics :
$(call RUN_MAKE,modules/qc/rnaseqMetrics.mk)
TARGETS += fastqc
fastqc :
$(call RUN_MAKE,modules/qc/fastqc.mk)
TARGETS += interval_qc
interval_qc :
$(call RUN_MAKE,modules/qc/intervalBamQC.mk)
TARGETS += rseqc
rseqc :
$(call RUN_MAKE,modules/qc/rseqc.mk)
TARGETS += qualimap
qualimap :
$(call RUN_MAKE,modules/qc/qualimap.mk)
TARGETS += bam_stats
bam_stats :
$(call RUN_MAKE,modules/qc/bamStats.mk)
#==================================================
# RNA sequencing
#==================================================
TARGETS += sum_reads
sum_reads :
$(call RUN_MAKE,modules/rnaseq/sumreads.mk)
TARGETS += kallisto
kallisto :
$(call RUN_MAKE,modules/rnaseq/kallisto.mk)
TARGETS += immune_deconv
immune_deconv :
$(call RUN_MAKE,modules/rnaseq/immunedeconv.mk)
#==================================================
# Ploidy / Clonality
#==================================================
TARGETS += pyloh
pyloh :
$(call RUN_MAKE,modules/ploidy/pyloh.mk)
TARGETS += clonehd
clonehd :
$(call RUN_MAKE,modules/clonality/clonehd.mk)
TARGETS += absolute_seq
absolute_seq :
$(call RUN_MAKE,modules/clonality/absoluteSeq.mk)
TARGETS += pyclone_13
pyclone_13 :
$(call RUN_MAKE,modules/clonality/pyclone_13.mk)
TARGETS += pyclone_vi
pyclone_vi :
$(call RUN_MAKE,modules/clonality/pyclone_vi.mk)
#==================================================
# mutational signatures
#==================================================
TARGETS += deconstruct_sigs
deconstruct_sigs :
$(call RUN_MAKE,modules/signatures/deconstruct_sigs.mk)
TARGETS += sv_signature
sv_signature :
$(call RUN_MAKE,modules/signatures/sv_signature.mk)
TARGETS += star_fish
star_fish :
$(call RUN_MAKE,modules/signatures/star_fish.mk)
TARGETS += hr_detect
hr_detect :
$(call RUN_MAKE,modules/signatures/hr_detect.mk)
#==================================================
# miscellaneous
#==================================================
TARGETS += cluster_samples
cluster_samples :
$(call RUN_MAKE,modules/contamination/clusterSamples.mk)
TARGETS += contest
contest :
$(call RUN_MAKE,modules/contamination/contest.mk)
TARGETS += virus_detection_bowtie2
virus_detection_bowtie2 :
$(call RUN_MAKE,modules/virus/virus_detection_bowtie2.mk)
TARGETS += viral_detection
viral_detection :
$(call RUN_MAKE,modules/test/workflows/viral_detection.mk)
TARGETS += krona_classify
krona_classify :
$(call RUN_MAKE,modules/virus/krona_classify.mk)
TARGETS += medicc2
medicc2 :
$(call RUN_MAKE,modules/copy_number/medicc2.mk)
#==================================================
# reports
#==================================================
TARGETS += recurrent_mutations
recurrent_mutations :
$(call RUN_MAKE,modules/recurrent_mutations/report.mk)
TARGETS += genome_summary
genome_summary :
$(call RUN_MAKE,modules/summary/genomesummary.mk)
TARGETS += mutation_summary
mutation_summary :
$(call RUN_MAKE,modules/summary/mutationsummary.mk)
TARGETS += delmh_summary
delmh_summary :
$(call RUN_MAKE,modules/summary/delmh_summary.mk)
#==================================================
# annotations
#==================================================
TARGETS += ann_ext_vcf
ann_ext_vcf :
$(call RUN_MAKE,modules/vcf_tools/annotateExtVcf.mk)
TARGETS += ann_somatic_vcf
ann_somatic_vcf :
$(call RUN_MAKE,modules/vcf_tools/annotateSomaticVcf.mk)
TARGETS += ann_vcf
ann_vcf :
$(call RUN_MAKE,modules/vcf_tools/annotateVcf.mk)
TARGETS += cravat_annotate
cravat_annotate :
$(call RUN_MAKE,modules/vcf_tools/cravat_annotation.mk)
TARGETS += cravat_summary
cravat_summary :
$(call RUN_MAKE,modules/summary/cravat_summary.mk)
TARGETS += ann_summary_vcf
ann_summary_vcf :
$(call RUN_MAKE,modules/vcf_tools/annotateSummaryVcf.mk)
#==================================================
# beta testing
#==================================================
TARGETS += hotspot_summary
hotspot_summary :
$(MAKE) -f modules/variant_callers/genotypehotspots.mk -j $(NUM_JOBS)
$(call RUN_MAKE,modules/summary/hotspotsummary.mk)
.PHONY : $(TARGETS)