-
Notifications
You must be signed in to change notification settings - Fork 29
/
hmftools.wdl
1368 lines (1254 loc) · 66.7 KB
/
hmftools.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
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
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version 1.0
# Copyright (c) 2020 Leiden University Medical Center
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
task Amber {
input {
String referenceName
File referenceBam
File referenceBamIndex
String tumorName
File tumorBam
File tumorBamIndex
String outputDir = "./amber"
File loci
File referenceFasta
File referenceFastaFai
File referenceFastaDict
Int threads = 2
String memory = "85GiB"
String javaXmx = "80G"
Int timeMinutes = 480
String dockerImage = "quay.io/biocontainers/hmftools-amber:3.5--0"
}
command {
AMBER -Xmx~{javaXmx} \
-reference ~{referenceName} \
-reference_bam ~{referenceBam} \
-tumor ~{tumorName} \
-tumor_bam ~{tumorBam} \
-output_dir ~{outputDir} \
-threads ~{threads} \
-ref_genome ~{referenceFasta} \
-loci ~{loci}
}
output {
File version = "~{outputDir}/amber.version"
File tumorBafPcf = "~{outputDir}/~{tumorName}.amber.baf.pcf"
File tumorBafTsv = "~{outputDir}/~{tumorName}.amber.baf.tsv"
File tumorBafVcf = "~{outputDir}/~{tumorName}.amber.baf.vcf.gz"
File tumorBafVcfIndex = "~{outputDir}/~{tumorName}.amber.baf.vcf.gz.tbi"
File tumorContaminationVcf = "~{outputDir}/~{tumorName}.amber.contamination.vcf.gz"
File tumorContaminationVcfIndex = "~{outputDir}/~{tumorName}.amber.contamination.vcf.gz.tbi"
File tumorContaminationTsv = "~{outputDir}/~{tumorName}.amber.contamination.tsv"
File tumorQc = "~{outputDir}/~{tumorName}.amber.qc"
File normalSnpVcf = "~{outputDir}/~{referenceName}.amber.snp.vcf.gz"
File normalSnpVcfIndex = "~{outputDir}/~{referenceName}.amber.snp.vcf.gz.tbi"
Array[File] outputs = [version, tumorBafPcf, tumorBafTsv, tumorBafVcf, tumorBafVcfIndex,
tumorContaminationVcf, tumorContaminationVcfIndex, tumorContaminationTsv, tumorQc,
normalSnpVcf, normalSnpVcfIndex]
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
cpu: threads
}
parameter_meta {
referenceName: {description: "the name of the normal sample.", category: "required"}
referenceBam: {description: "The normal BAM file.", category: "required"}
referenceBamIndex: {description: "The index for the normal BAM file.", category: "required"}
tumorName: {description: "The name of the tumor sample.", category: "required"}
tumorBam: {description: "The tumor BAM file.", category: "required"}
tumorBamIndex: {description: "The index for the tumor BAM file.", category: "required"}
outputDir: {description: "The path to the output directory.", category: "common"}
loci: {description: "A VCF file containing likely heterozygous sites.", category: "required"}
referenceFasta: {description: "The reference fasta file.", category: "required"}
referenceFastaDict: {description: "The sequence dictionary associated with the reference fasta file.",
category: "required"}
referenceFastaFai: {description: "The index for the reference fasta file.", category: "required"}
threads: {description: "The number of threads the program will use.", category: "advanced"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task Cobalt {
input {
String referenceName
File referenceBam
File referenceBamIndex
String tumorName
File tumorBam
File tumorBamIndex
String outputDir = "./cobalt"
File gcProfile
Int threads = 1
String memory = "5GiB"
String javaXmx = "4G"
Int timeMinutes = 480
String dockerImage = "quay.io/biocontainers/hmftools-cobalt:1.11--0"
}
command {
COBALT -Xmx~{javaXmx} \
-reference ~{referenceName} \
-reference_bam ~{referenceBam} \
-tumor ~{tumorName} \
-tumor_bam ~{tumorBam} \
-output_dir ~{outputDir} \
-threads ~{threads} \
-gc_profile ~{gcProfile}
}
output {
File version = "~{outputDir}/cobalt.version"
File normalGcMedianTsv = "~{outputDir}/~{referenceName}.cobalt.gc.median.tsv"
File normalRationMedianTsv = "~{outputDir}/~{referenceName}.cobalt.ratio.median.tsv"
File normalRationPcf = "~{outputDir}/~{referenceName}.cobalt.ratio.pcf"
File tumorGcMedianTsv = "~{outputDir}/~{tumorName}.cobalt.gc.median.tsv"
File tumorRatioPcf = "~{outputDir}/~{tumorName}.cobalt.ratio.pcf"
File tumorRatioTsv = "~{outputDir}/~{tumorName}.cobalt.ratio.tsv"
File tumorChrLen = "~{outputDir}/~{tumorName}.chr.len"
Array[File] outputs = [version, normalGcMedianTsv, normalRationMedianTsv,
normalRationPcf, tumorGcMedianTsv, tumorRatioPcf, tumorRatioTsv, tumorChrLen]
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
cpu: threads
}
parameter_meta {
referenceName: {description: "the name of the normal sample.", category: "required"}
referenceBam: {description: "The normal BAM file.", category: "required"}
referenceBamIndex: {description: "The index for the normal BAM file.", category: "required"}
tumorName: {description: "The name of the tumor sample.", category: "required"}
tumorBam: {description: "The tumor BAM file.", category: "required"}
tumorBamIndex: {description: "The index for the tumor BAM file.", category: "required"}
outputDir: {description: "The path to the output directory.", category: "common"}
gcProfile: {description: "A file describing the GC profile of the reference genome.", category: "required"}
threads: {description: "The number of threads the program will use.", category: "advanced"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task CupGenerateReport {
input {
String sampleName
File cupData
String outputDir = "./cuppa"
String memory = "5GiB"
Int timeMinutes = 10
String dockerImage = "quay.io/biowdl/cuppa:1.6"
}
# This script writes to the directory that the input is located in.
# Giving the input directly will cause the script to write in the
# locallized input dir, which may cause issues with write permissions
# in certain execution engines or backends. We, therefore, make links
# to a working directory, and give that directory as input instead.
# We can't just use the outputDir directly. This could be an
# absolute path in which case the linking might fail due to name
# collisions. Outputs are copied to the given output dir afterwards.
command {
set -e
mkdir -p ./workdir ~{outputDir}
ln -s -t workdir ~{cupData}
CupGenerateReport \
~{sampleName} \
workdir/
mv -t ~{outputDir} \
./workdir/~{sampleName}.cup.report.summary.png \
./workdir/~{sampleName}_cup_report.pdf
if [ -f ./workdir/~{sampleName}.cup.report.features.png ]
then
mv -t ~{outputDir} \
./workdir/~{sampleName}.cup.report.features.png
fi
}
output {
File summaryPng = "~{outputDir}/~{sampleName}.cup.report.summary.png"
File? featuresPng = "~{outputDir}/~{sampleName}.cup.report.features.png"
File reportPdf = "~{outputDir}/~{sampleName}_cup_report.pdf"
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
}
parameter_meta {
sampleName: {description: "The sample id.", category: "required"}
cupData: {description: "The output produced by cuppa.", category: "required"}
outputDir: {description: "The directory the ouput will be placed in.", category: "common"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task Cuppa {
input {
Array[File]+ linxOutput
Array[File]+ purpleOutput
String sampleName
Array[String]+ categories = ["DNA"]
Array[File]+ referenceData
File purpleSvVcf
File purpleSvVcfIndex
File purpleSomaticVcf
File purpleSomaticVcfIndex
String outputDir = "./cuppa"
String javaXmx = "4G"
String memory = "5GiB"
Int timeMinutes = 10
String dockerImage = "quay.io/biowdl/cuppa:1.6"
}
command {
set -e
mkdir -p sampleData ~{outputDir}
ln -s -t sampleData ~{sep=" " linxOutput} ~{sep=" " purpleOutput}
cuppa -Xmx~{javaXmx} \
-output_dir ~{outputDir} \
-output_id ~{sampleName} \
-categories '~{sep="," categories}' \
-ref_data_dir ~{sub(referenceData[0], basename(referenceData[0]), "")} \
-sample_data_dir sampleData \
-sample_data ~{sampleName} \
-sample_sv_file ~{purpleSvVcf} \
-sample_somatic_vcf ~{purpleSomaticVcf}
}
output {
File cupData = "~{outputDir}/~{sampleName}.cup.data.csv"
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
}
parameter_meta {
linxOutput: {description: "The files produced by linx.", category: "required"}
purpleOutput: {description: "The files produced by purple.", category: "required"}
sampleName: {description: "The name of the sample.", category: "required"}
categories: {description: "The classifiers to use.", category: "advanced"}
referenceData : {description: "The reference data.", category: "required"}
purpleSvVcf: {description: "The VCF file produced by purple which contains structural variants.", category: "required"}
purpleSvVcfIndex: {description: "The index of the structural variants VCF file produced by purple.", category: "required"}
purpleSomaticVcf: {description: "The VCF file produced by purple which contains somatic variants.", category: "required"}
purpleSomaticVcfIndex: {description: "The index of the somatic VCF file produced by purple.", category: "required"}
outputDir: {description: "The directory the ouput will be placed in.", category: "common"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task CuppaChart {
input {
String sampleName
File cupData
String outputDir = "./cuppa"
String memory = "4GiB"
Int timeMinutes = 5
String dockerImage = "quay.io/biowdl/cuppa:1.6"
}
command {
set -e
mkdir -p ~{outputDir}
cuppa-chart \
-sample ~{sampleName} \
-sample_data ~{cupData} \
-output_dir ~{outputDir}
}
output {
File cuppaChart = "~{outputDir}/~{sampleName}.cuppa.chart.png"
File cuppaConclusion = "~{outputDir}/~{sampleName}.cuppa.conclusion.txt"
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
}
parameter_meta {
sampleName: {description: "The name of the sample.", category:"common"}
cupData: {description: "The cuppa output.", category: "required"}
outputDir: {description: "The directory the output will be written to.", category:"common"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task Gripss {
input {
File referenceFasta
File referenceFastaFai
File referenceFastaDict
File knownFusionPairBedpe
File breakendPon
File breakpointPon
String referenceName
String tumorName
File vcf
File vcfIndex
String outputDir = "./"
String memory = "17GiB"
String javaXmx = "16G"
Int timeMinutes = 50
String dockerImage = "quay.io/biocontainers/hmftools-gripss:2.0--hdfd78af_0"
}
command {
set -e
mkdir -p ~{outputDir}
gripss -Xmx~{javaXmx} -XX:ParallelGCThreads=1 \
-ref_genome ~{referenceFasta} \
-known_hotspot_file ~{knownFusionPairBedpe} \
-pon_sgl_file ~{breakendPon} \
-pon_sv_file ~{breakpointPon} \
-reference ~{referenceName} \
-sample ~{tumorName} \
-vcf ~{vcf} \
-output_dir ~{outputDir} \
-output_id somatic
}
output {
File fullVcf = "~{outputDir}/~{tumorName}.gripss.somatic.vcf.gz"
File fullVcfIndex = "~{outputDir}/~{tumorName}.gripss.somatic.vcf.gz.tbi"
File filteredVcf = "~{outputDir}/~{tumorName}.gripss.filtered.somatic.vcf.gz"
File filteredVcfIndex = "~{outputDir}/~{tumorName}.gripss.filtered.somatic.vcf.gz.tbi"
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
}
parameter_meta {
referenceFasta: {description: "The reference fasta file.", category: "required"}
referenceFastaDict: {description: "The sequence dictionary associated with the reference fasta file.",
category: "required"}
referenceFastaFai: {description: "The index for the reference fasta file.", category: "required"}
knownFusionPairBedpe: {description: "Equivalent to the `-known_hotspot_file` option.", category: "required"}
breakendPon: {description: "Equivalent to the `-pon_sgl_file` option.", category: "required"}
breakpointPon: {description: "Equivalent to the `-pon_sv_file` option.", category: "required"}
tumorName: {description: "The name of the tumor sample.", category: "required"}
referenceName: {description: "The name of the normal sample.", category: "required"}
vcf: {description: "The input VCF.", category: "required"}
vcfIndex: {description: "The index for the input VCF.", category: "required"}
outputDir: {description: "The path the output will be written to.", category:"required"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task GripssApplicationKt {
# Obsolete
input {
File inputVcf
String outputPath = "gripss.vcf.gz"
String tumorName
String referenceName
File referenceFasta
File referenceFastaFai
File referenceFastaDict
File breakpointHotspot
File breakendPon
File breakpointPon
String memory = "32GiB"
String javaXmx = "31G"
Int timeMinutes = 45
String dockerImage = "quay.io/biocontainers/hmftools-gripss:1.11--hdfd78af_0"
}
command {
java -Xmx~{javaXmx} -XX:ParallelGCThreads=1 \
-cp /usr/local/share/hmftools-gripss-1.11-0/gripss.jar \
com.hartwig.hmftools.gripss.GripssApplicationKt \
-tumor ~{tumorName} \
-reference ~{referenceName} \
-ref_genome ~{referenceFasta} \
-breakpoint_hotspot ~{breakpointHotspot} \
-breakend_pon ~{breakendPon} \
-breakpoint_pon ~{breakpointPon} \
-input_vcf ~{inputVcf} \
-output_vcf ~{outputPath} \
-paired_normal_tumor_ordinals
}
output {
File outputVcf = outputPath
File outputVcfIndex = outputPath + ".tbi"
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
}
parameter_meta {
inputVcf: {description: "The input VCF.", category: "required"}
outputPath: {description: "The path where th eoutput VCF will be written.", category: "common"}
referenceName: {description: "The name of the normal sample.", category: "required"}
tumorName: {description: "The name of the tumor sample.", category: "required"}
referenceFasta: {description: "The reference fasta file.", category: "required"}
referenceFastaDict: {description: "The sequence dictionary associated with the reference fasta file.",
category: "required"}
referenceFastaFai: {description: "The index for the reference fasta file.", category: "required"}
breakpointHotspot: {description: "Equivalent to the `-breakpoint_hotspot` option.", category: "required"}
breakendPon: {description: "Equivalent to the `-breakend_pon` option.", category: "required"}
breakpointPon: {description: "Equivalent to the `-breakpoint_pon` option.", category: "required"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task GripssHardFilterApplicationKt {
# Obsolete
input {
File inputVcf
String outputPath = "gripss_hard_filter.vcf.gz"
String memory = "3GiB"
String javaXmx = "2G"
Int timeMinutes = 15
String dockerImage = "quay.io/biocontainers/hmftools-gripss:1.11--hdfd78af_0"
}
command {
java -Xmx~{javaXmx} -XX:ParallelGCThreads=1 \
-cp /usr/local/share/hmftools-gripss-1.11-0/gripss.jar \
com.hartwig.hmftools.gripss.GripssHardFilterApplicationKt \
-input_vcf ~{inputVcf} \
-output_vcf ~{outputPath}
}
output {
File outputVcf = outputPath
File outputVcfIndex = outputPath + ".tbi"
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
}
parameter_meta {
inputVcf: {description: "The input VCF.", category: "required"}
outputPath: {description: "The path where th eoutput VCF will be written.", category: "common"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task HealthChecker {
input {
String outputDir = "."
String referenceName
File referenceFlagstats
File referenceMetrics
String tumorName
File tumorFlagstats
File tumorMetrics
Array[File]+ purpleOutput
String javaXmx = "2G"
String memory = "3GiB"
Int timeMinutes = 1
String dockerImage = "quay.io/biowdl/health-checker:3.2"
}
command {
set -e
mkdir -p ~{outputDir}
health-checker -Xmx~{javaXmx} -XX:ParallelGCThreads=1 \
-reference ~{referenceName} \
-ref_flagstat_file ~{referenceFlagstats} \
-ref_wgs_metrics_file ~{referenceMetrics} \
-tumor ~{tumorName} \
-tum_flagstat_file ~{tumorFlagstats} \
-tum_wgs_metrics_file ~{tumorMetrics} \
-purple_dir ~{sub(purpleOutput[0], basename(purpleOutput[0]), "")} \
-output_dir ~{outputDir}
if [ -e '~{outputDir}/~{tumorName}.HealthCheckSucceeded' ]
then
echo 'true' > '~{outputDir}/succeeded'
fi
if [ -e '~{outputDir}/~{tumorName}.HealthCheckFailed' ]
then
echo 'false' > '~{outputDir}/succeeded'
fi
}
output {
Boolean succeeded = read_boolean("succeeded")
File outputFile = if succeeded
then "~{outputDir}/~{tumorName}.HealthCheckSucceeded"
else "~{outputDir}/~{tumorName}.HealthCheckFailed"
}
runtime {
memory: memory
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
}
parameter_meta {
outputDir: {description: "The path the output will be written to.", category:"required"}
referenceName: {description: "The name of the normal sample.", category: "required"}
referenceFlagstats: {description: "The flagstats for the normal sample.", category: "required"}
referenceMetrics: {description: "The picard WGS metrics for the normal sample.", category: "required"}
tumorName: {description: "The name of the tumor sample.", category: "required"}
tumorFlagstats: {description: "The flagstats for the tumor sample.", category: "required"}
tumorMetrics: {description: "The picard WGS metrics for the tumor sample.", category: "required"}
purpleOutput: {description: "The files from purple's output directory.", category: "required"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task Linx {
input {
String sampleName
File svVcf
File svVcfIndex
Array[File]+ purpleOutput
String refGenomeVersion
String outputDir = "./linx"
File fragileSiteCsv
File lineElementCsv
File knownFusionCsv
File driverGenePanel
Boolean writeAllVisFusions = false
#The following should be in the same directory.
File geneDataCsv
File proteinFeaturesCsv
File transExonDataCsv
File transSpliceDataCsv
String memory = "9GiB"
String javaXmx = "8G"
Int timeMinutes = 10
String dockerImage = "quay.io/biocontainers/hmftools-linx:1.18--hdfd78af_0"
}
command {
linx -Xmx~{javaXmx} -XX:ParallelGCThreads=1 \
-sample ~{sampleName} \
-sv_vcf ~{svVcf} \
-purple_dir ~{sub(purpleOutput[0], basename(purpleOutput[0]), "")} \
-ref_genome_version ~{refGenomeVersion} \
-output_dir ~{outputDir} \
-fragile_site_file ~{fragileSiteCsv} \
-line_element_file ~{lineElementCsv} \
-ensembl_data_dir ~{sub(geneDataCsv, basename(geneDataCsv), "")} \
-check_fusions \
-known_fusion_file ~{knownFusionCsv} \
-check_drivers \
-driver_gene_panel ~{driverGenePanel} \
-chaining_sv_limit 0 \
-write_vis_data \
~{if writeAllVisFusions then "-write_all_vis_fusions" else ""}
}
output {
File driverCatalog = "~{outputDir}/~{sampleName}.linx.driver.catalog.tsv"
File linxBreakend = "~{outputDir}/~{sampleName}.linx.breakend.tsv"
File linxClusters = "~{outputDir}/~{sampleName}.linx.clusters.tsv"
File linxDrivers = "~{outputDir}/~{sampleName}.linx.drivers.tsv"
File linxFusion = "~{outputDir}/~{sampleName}.linx.fusion.tsv"
File linxLinks = "~{outputDir}/~{sampleName}.linx.links.tsv"
File linxSvs = "~{outputDir}/~{sampleName}.linx.svs.tsv"
File linxVisCopyNumber = "~{outputDir}/~{sampleName}.linx.vis_copy_number.tsv"
File linxVisFusion = "~{outputDir}/~{sampleName}.linx.vis_fusion.tsv"
File linxVisGeneExon = "~{outputDir}/~{sampleName}.linx.vis_gene_exon.tsv"
File linxVisProteinDomain = "~{outputDir}/~{sampleName}.linx.vis_protein_domain.tsv"
File linxVisSegments = "~{outputDir}/~{sampleName}.linx.vis_segments.tsv"
File linxVisSvData = "~{outputDir}/~{sampleName}.linx.vis_sv_data.tsv"
File linxVersion = "~{outputDir}/linx.version"
Array[File] outputs = [driverCatalog, linxBreakend, linxClusters, linxDrivers, linxFusion,
linxLinks, linxSvs, linxVisCopyNumber, linxVisFusion,
linxVisGeneExon, linxVisProteinDomain, linxVisSegments, linxVisSvData,
linxVersion]
}
runtime {
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
memory: memory
}
parameter_meta {
sampleName: {description: "The name of the sample.", category: "required"}
svVcf: {description: "A VCF file containing structural variants, produced using GRIDSS, annotated for viral insertions and postprocessed with GRIPSS.", category: "required"}
svVcfIndex: {description: "Index for the structural variants VCf file.", category: "required"}
purpleOutput: {description: "The files produced by PURPLE.", category: "required"}
refGenomeVersion: {description: "The version of the genome assembly used for alignment. Either \"37\" or \"38\".", category: "required"}
outputDir: {description: "The directory the outputs will be written to.", category: "required"}
fragileSiteCsv: {description: "A list of known fragile sites.", category: "required"}
lineElementCsv: {description: "A list of known LINE source regions.", category: "required"}
knownFusionCsv: {description: "A CSV file describing known fusions.", category: "required"}
driverGenePanel: {description: "A TSV file describing the driver gene panel.", category: "required"}
writeAllVisFusions: {description: "Equivalent to the -write_all_vis_fusions flag.", category: "advanced"}
geneDataCsv: {description: "A CSV file containing gene information, must be in the same directory as `proteinFeaturesCsv`, `transExonDataCsv` and `transSpliceDataCsv`.", category: "required"}
proteinFeaturesCsv: {description: "A CSV file containing protein feature information, must be in the same directory as `geneDataCsv`, `transExonDataCsv` and `transSpliceDataCsv`.", category: "required"}
transExonDataCsv: {description: "A CSV file containing transcript exon information, must be in the same directory as `geneDataCsv`, `proteinFeaturesCsv` and `transSpliceDataCsv`.", category: "required"}
transSpliceDataCsv: {description: "A CSV file containing transcript splicing information, must be in the same directory as `geneDataCsv`, `proteinFeaturesCsv` and `transExonDataCsv`.", category: "required"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task LinxVisualisations {
input {
String outputDir = "./linx_visualisation"
String sample
String refGenomeVersion
Array[File]+ linxOutput
Boolean plotReportable = true
String memory = "9GiB"
String javaXmx = "8G"
Int timeMinutes = 1440
String dockerImage = "quay.io/biocontainers/hmftools-linx:1.18--hdfd78af_0"
}
command {
set -e
mkdir -p ~{outputDir}
java -Xmx~{javaXmx} -XX:ParallelGCThreads=1 \
-cp /usr/local/share/hmftools-linx-1.18-0/sv-linx.jar \
com.hartwig.hmftools.linx.visualiser.SvVisualiser \
-sample ~{sample} \
-ref_genome_version ~{refGenomeVersion} \
-circos /usr/local/bin/circos \
-vis_file_dir ~{sub(linxOutput[0], basename(linxOutput[0]), "")} \
-data_out ~{outputDir}/circos \
-plot_out ~{outputDir}/plots \
~{if plotReportable then "-plot_reportable" else ""}
}
output {
Array[File] circos = glob("~{outputDir}/circos/*")
Array[File] plots = glob("~{outputDir}/plots/*")
}
runtime {
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
memory: memory
}
parameter_meta {
outputDir: {description: "The directory the outputs will be written to.", category: "required"}
sample: {description: "The sample's name.", category: "required"}
refGenomeVersion: {description: "The version of the genome assembly used for alignment. Either \"37\" or \"38\".", category: "required"}
linxOutput: {description: "The directory containing the linx output.", category: "required"}
plotReportable: {description: "Equivalent to the -plot_reportable flag.", category: "advanced"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task Orange {
input {
String outputDir = "./orange"
File doidJson
Array[String] sampleDoids
String tumorName
String referenceName
File referenceMetrics
File tumorMetrics
File referenceFlagstats
File tumorFlagstats
File sageGermlineGeneCoverageTsv
File sageSomaticRefSampleBqrPlot
File sageSomaticTumorSampleBqrPlot
File purpleGeneCopyNumberTsv
File purpleGermlineDriverCatalogTsv
File purpleGermlineVariantVcf
File purpleGermlineVariantVcfIndex
Array[File]+ purplePlots
File purplePurityTsv
File purpleQcFile
File purpleSomaticDriverCatalogTsv
File purpleSomaticVariantVcf
File purpleSomaticVariantVcfIndex
File linxFusionTsv
File linxBreakendTsv
File linxDriverCatalogTsv
File linxDriverTsv
Array[File]+ linxPlots
File cuppaResultCsv
File cuppaSummaryPlot
File? cuppaFeaturePlot
File chordPredictionTxt
File peachGenotypeTsv
File protectEvidenceTsv
File annotatedVirusTsv
#File pipelineVersionFile
File cohortMappingTsv
File cohortPercentilesTsv
String memory = "17GiB"
String javaXmx = "16G"
Int timeMinutes = 10
String dockerImage = "quay.io/biowdl/orange:v1.6"
}
command {
set -e
mkdir -p ~{outputDir}
orange -Xmx~{javaXmx} -XX:ParallelGCThreads=1 \
-output_dir ~{outputDir} \
-doid_json ~{doidJson} \
-primary_tumor_doids '~{sep=";" sampleDoids}' \
-max_evidence_level C \
-tumor_sample_id ~{tumorName} \
-reference_sample_id ~{referenceName} \
-ref_sample_wgs_metrics_file ~{referenceMetrics} \
-tumor_sample_wgs_metrics_file ~{tumorMetrics} \
-ref_sample_flagstat_file ~{referenceFlagstats} \
-tumor_sample_flagstat_file ~{tumorFlagstats} \
-sage_germline_gene_coverage_tsv ~{sageGermlineGeneCoverageTsv} \
-sage_somatic_ref_sample_bqr_plot ~{sageSomaticRefSampleBqrPlot} \
-sage_somatic_tumor_sample_bqr_plot ~{sageSomaticTumorSampleBqrPlot} \
-purple_gene_copy_number_tsv ~{purpleGeneCopyNumberTsv} \
-purple_germline_driver_catalog_tsv ~{purpleGermlineDriverCatalogTsv} \
-purple_germline_variant_vcf ~{purpleGermlineVariantVcf} \
-purple_plot_directory ~{sub(purplePlots[0], basename(purplePlots[0]), "")} \
-purple_purity_tsv ~{purplePurityTsv} \
-purple_qc_file ~{purpleQcFile} \
-purple_somatic_driver_catalog_tsv ~{purpleSomaticDriverCatalogTsv} \
-purple_somatic_variant_vcf ~{purpleSomaticVariantVcf} \
-linx_fusion_tsv ~{linxFusionTsv} \
-linx_breakend_tsv ~{linxBreakendTsv} \
-linx_driver_catalog_tsv ~{linxDriverCatalogTsv} \
-linx_driver_tsv ~{linxDriverTsv} \
-linx_plot_directory ~{sub(linxPlots[0], basename(linxPlots[0]), "")} \
-cuppa_result_csv ~{cuppaResultCsv} \
-cuppa_summary_plot ~{cuppaSummaryPlot} \
~{"-cuppa_feature_plot " + cuppaFeaturePlot} \
-chord_prediction_txt ~{chordPredictionTxt} \
-peach_genotype_tsv ~{peachGenotypeTsv} \
-protect_evidence_tsv ~{protectEvidenceTsv} \
-annotated_virus_tsv ~{annotatedVirusTsv} \
-cohort_mapping_tsv ~{cohortMappingTsv} \
-cohort_percentiles_tsv ~{cohortPercentilesTsv}
}
#TODO may need to be added: -pipeline_version_file ~{pipelineVersionFile}
output {
File orangeJson = "~{outputDir}/~{tumorName}.orange.json"
File orangePdf = "~{outputDir}/~{tumorName}.orange.pdf"
}
runtime {
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
memory: memory
}
parameter_meta {
outputDir: {description: "The directory the outputs will be written to.", category: "common"}
doidJson: {description: "A json with the DOID (Human Disease Ontology) tree.", category: "required"}
sampleDoids: {description: "The DOIDs (Human Disease Ontology) for the primary tumor.", category: "required"}
tumorName: {description: "The name of the tumor sample.", category: "required"}
referenceName: {description: "The name of the normal sample.", category: "required"}
referenceMetrics: {description: "The picard WGS metrics for the normal sample.", category: "required"}
tumorMetrics: {description: "The picard WGS metrics for the tumor sample.", category: "required"}
referenceFlagstats: {description: "The flagstats for the normal sample.", category: "required"}
tumorFlagstats: {description: "The flagstats for the tumor sample.", category: "required"}
sageGermlineGeneCoverageTsv: {description: "Gene coverage file produced by the germline sage run.", category: "required"}
sageSomaticRefSampleBqrPlot: {description: "The reference bqr plot produced by the somatic sage run.", category: "required"}
sageSomaticTumorSampleBqrPlot: {description: "The reference bqr plot produced by the somatic sage run.", category: "required"}
purpleGeneCopyNumberTsv: {description: "Copy number tsv produced by purple.", category: "required"}
purpleGermlineDriverCatalogTsv: {description: "Germline driver catalog produced by purple.", category: "required"}
purpleGermlineVariantVcf: {description: "Germline variant vcf produced by purple.", category: "required"}
purplePlots: {description: "The plots generated by purple.", category: "required"}
purplePurityTsv: {description: "The purity file produced by purple.", category: "required"}
purpleQcFile: {description: "The qc file produced by purple.", category: "required"}
purpleSomaticDriverCatalogTsv: {description: "Somatic driver catalog produced by purple.", category: "required"}
purpleSomaticVariantVcf: {description: "Somatic variant vcf produced by purple.", category: "required"}
linxFusionTsv: {description: "The fusions tsv produced by linx.", category: "required"}
linxBreakendTsv: {description: "The breakend tsv produced by linx.", category: "required"}
linxDriverCatalogTsv: {description: "The driver catalog produced by linx.", category: "required"}
linxDriverTsv: {description: "The driver tsv produced by linx.", category: "required"}
linxPlots: {description: "The plots generated by linx.", category: "required"}
cuppaResultCsv: {description: "The cuppa results csv.", category: "required"}
cuppaSummaryPlot: {description: "The cuppa summary plot.", category: "required"}
cuppaFeaturePlot: {description: "The cuppa feature plot.", category: "common"}
chordPredictionTxt: {description: "Chord prediction results.", category: "required"}
peachGenotypeTsv: {description: "Genotype tsv produced by peach.", category: "required"}
protectEvidenceTsv: {description: "Evidence tsv produced by protect.", category: "required"}
annotatedVirusTsv: {description: "Annotated virus tsv produced by virus-interpreter.", category: "required"}
#pipelineVersionFile: {description: "", category: "required"}
cohortMappingTsv: {description: "Cohort mapping file from the HMFTools resources.", category: "required"}
cohortPercentilesTsv: {description: "Cohort percentile file from the HMFTools resources.", category: "required"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task Pave {
input {
String outputDir = "./"
String sampleName
File vcfFile
File vcfFileIndex
File referenceFasta
File referenceFastaFai
File referenceFastaDict
String refGenomeVersion
File driverGenePanel
#The following should be in the same directory.
File geneDataCsv
File proteinFeaturesCsv
File transExonDataCsv
File transSpliceDataCsv
Int timeMinutes = 50
String javaXmx = "8G"
String memory = "9GiB"
String dockerImage = "quay.io/biowdl/pave:v1.0"
}
command {
set -e
mkdir -p ~{outputDir}
pave -Xmx~{javaXmx} -XX:ParallelGCThreads=1 \
-sample ~{sampleName} \
-vcf_file ~{vcfFile} \
-output_dir ~{outputDir} \
-ensembl_data_dir ~{sub(geneDataCsv, basename(geneDataCsv), "")} \
-ref_genome ~{referenceFasta} \
-ref_genome_version ~{refGenomeVersion} \
-driver_gene_panel ~{driverGenePanel}
}
output {
File outputVcf = "~{outputDir}/~{sub(basename(vcfFile), 'vcf.gz$', 'pave.vcf.gz')}"
File outputVcfIndex = "~{outputDir}/~{sub(basename(vcfFile), 'vcf.gz$', 'pave.vcf.gz.tbi')}"
}
runtime {
time_minutes: timeMinutes # !UnknownRuntimeKey
docker: dockerImage
memory: memory
}
parameter_meta {
outputDir: {description: "The directory the outputs will be written to.", category: "required"}
sampleName: {description: "The name of the sample.", category: "required"}
vcfFile: {description: "The input VCF file.", category: "required"}
vcfFileIndex: {description: "The index for the input vcf file.", category: "required"}
referenceFasta: {description: "The reference fasta file.", category: "required"}
referenceFastaDict: {description: "The sequence dictionary associated with the reference fasta file.",
category: "required"}
referenceFastaFai: {description: "The index for the reference fasta file.", category: "required"}
refGenomeVersion: {description: "The version of the genome assembly used for alignment. Either \"HG19\" or \"HG38\".", category: "required"}
driverGenePanel: {description: "A TSV file describing the driver gene panel.", category: "required"}
geneDataCsv: {description: "A CSV file containing gene information, must be in the same directory as `proteinFeaturesCsv`, `transExonDataCsv` and `transSpliceDataCsv`.", category: "required"}
proteinFeaturesCsv: {description: "A CSV file containing protein feature information, must be in the same directory as `geneDataCsv`, `transExonDataCsv` and `transSpliceDataCsv`.", category: "required"}
transExonDataCsv: {description: "A CSV file containing transcript exon information, must be in the same directory as `geneDataCsv`, `proteinFeaturesCsv` and `transSpliceDataCsv`.", category: "required"}
transSpliceDataCsv: {description: "A CSV file containing transcript splicing information, must be in the same directory as `geneDataCsv`, `proteinFeaturesCsv` and `transExonDataCsv`.", category: "required"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.",
category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
}
task Protect {
input {
String refGenomeVersion
String tumorName
String referenceName
Array[String]+ sampleDoids
String outputDir = "."
Array[File]+ serveActionability
File doidJson
File purplePurity
File purpleQc
File purpleDriverCatalogSomatic
File purpleDriverCatalogGermline
File purpleSomaticVariants
File purpleSomaticVariantsIndex
File purpleGermlineVariants
File purpleGermlineVariantsIndex
File purpleGeneCopyNumber
File linxFusion
File linxBreakend
File linxDriversCatalog
File chordPrediction
File annotatedVirus
String memory = "9GiB"
String javaXmx = "8G"
Int timeMinutes = 60
String dockerImage = "quay.io/biowdl/protect:v2.0"
}
command {
protect -Xmx~{javaXmx} \
-ref_genome_version ~{refGenomeVersion} \
-tumor_sample_id ~{tumorName} \
-reference_sample_id ~{referenceName} \
-primary_tumor_doids '~{sep=";" sampleDoids}' \
-output_dir ~{outputDir} \
-serve_actionability_dir ~{sub(serveActionability[0], basename(serveActionability[0]), "")} \
-doid_json ~{doidJson} \
-purple_purity_tsv ~{purplePurity} \
-purple_qc_file ~{purpleQc} \
-purple_somatic_driver_catalog_tsv ~{purpleDriverCatalogSomatic} \
-purple_germline_driver_catalog_tsv ~{purpleDriverCatalogGermline} \