This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkfdrc_combined_somatic_wgs_cnv_wf.cwl
2516 lines (2367 loc) · 90 KB
/
kfdrc_combined_somatic_wgs_cnv_wf.cwl
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
class: Workflow
cwlVersion: v1.0
id: kfdrc_combined_somatic_wgs_cnv_wf
$namespaces:
sbg: 'https://sevenbridges.com'
inputs:
- id: annotation_file
type: File
doc: refFlat.txt file
'sbg:x': 296.890625
'sbg:y': 1165.5
- id: b_allele
type: File?
doc: >-
germline calls, needed for BAF. GATK HC VQSR input recommended. Tool
will prefilter for germline and pass if expression given
secondaryFiles:
- .tbi
'sbg:x': 0
'sbg:y': 1712
- id: capture_regions
type: File?
doc: 'If not WGS, provide this bed file'
'sbg:x': 296.890625
'sbg:y': 909.5
- id: cfree_sex
type:
- 'null'
- type: enum
symbols:
- XX
- XY
name: sex
doc: 'If known, XX for female, XY for male'
'sbg:x': 596.5790405273438
'sbg:y': 1268
- id: chr_len
type: File
doc: file with chromosome lengths
'sbg:x': 596.5790405273438
'sbg:y': 1161
- id: cnvkit_cnn_input
type: File?
doc: 'If running using an existing .cnn, supply here'
'sbg:x': 0
'sbg:y': 1605
- id: cnvkit_sex
type: string?
doc: 'If known, choices are m,y,male,Male,f,x,female,Female'
'sbg:x': 0
'sbg:y': 1498
- id: coeff_var
type: float?
doc: Coefficient of variation to set window size. Default 0.05 recommended
default: 0.05
'sbg:x': 596.5790405273438
'sbg:y': 793
- id: combined_exclude_expression
type: string?
doc: 'Filter expression if vcf has non-PASS combined calls, use as-needed'
'sbg:x': 0
'sbg:y': 1391
- id: combined_include_expression
type: string?
doc: 'Filter expression if vcf has non-PASS combined calls, use as-needed'
'sbg:x': 0
'sbg:y': 1284
- id: contamination_adjustment
type: boolean?
doc: TRUE or FALSE to have ControlFreec estimate normal contam
'sbg:x': 596.5790405273438
'sbg:y': 686
- id: indexed_reference_fasta
type: File
secondaryFiles:
- .fai
- ^.dict
'sbg:x': 0
'sbg:y': 1177
- id: input_normal_aligned
type: File
doc: normal BAM or CRAM
secondaryFiles:
- |
${
var dpath = self.location.replace(self.basename, "")
if(self.nameext == '.bam'){
return {"location": dpath+self.nameroot+".bai", "class": "File"}
}
else{
return {"location": dpath+self.basename+".crai", "class": "File"}
}
}
'sbg:x': 0
'sbg:y': 1070
- id: input_normal_name
type: string
'sbg:x': 0
'sbg:y': 963
- id: input_tumor_aligned
type: File
doc: tumor BAM or CRAM
secondaryFiles:
- |
${
var dpath = self.location.replace(self.basename, "")
if(self.nameext == '.bam'){
return {"location": dpath+self.nameroot+".bai", "class": "File"}
}
else{
return {"location": dpath+self.basename+".crai", "class": "File"}
}
}
'sbg:x': 0
'sbg:y': 856
- id: input_tumor_name
type: string
'sbg:x': 0
'sbg:y': 749
- id: mate_orientation_control
type:
- 'null'
- type: enum
symbols:
- '0'
- FR
- RF
- FF
name: mate_orientation_control
doc: >-
0 (for single ends), RF (Illumina mate-pairs), FR (Illumina paired-ends),
FF (SOLiD mate-pairs)
default: FR
'sbg:x': 0
'sbg:y': 642
- id: mate_orientation_sample
type:
- 'null'
- type: enum
symbols:
- '0'
- FR
- RF
- FF
name: mate_orientation_sample
doc: >-
0 (for single ends), RF (Illumina mate-pairs), FR (Illumina paired-ends),
FF (SOLiD mate-pairs)
default: FR
'sbg:x': 0
'sbg:y': 535
- id: min_theta2_frac
type: float?
doc: >-
Minimum fraction of genome with copy umber alterations. Default is 0.05,
recommend 0.01
default: 0.01
'sbg:x': 1018.6522216796875
'sbg:y': 355.5
- id: output_basename
type: string
'sbg:x': 1018.6522216796875
'sbg:y': 248.5
- id: paired_vcf
type: File
doc: Combined somatic and germline call file. VarDict input recommended.
'sbg:x': 0
'sbg:y': 428
- id: ploidy
type: 'int[]'
doc: Array of ploidy possibilities for ControlFreeC to try
'sbg:x': 0
'sbg:y': 321
- id: reference_fai
type: File
'sbg:x': 0
'sbg:y': 214
- id: threads
type: int?
doc: >-
For ControlFreeC. Recommend 16 max, as I/O gets saturated after that
losing any advantage.
default: 16
'sbg:x': 0
'sbg:y': 107
- id: wgs_mode
type: string?
doc: 'for WGS mode, input Y. leave blank for hybrid mode'
default: 'Y'
'sbg:x': 0
'sbg:y': 0
outputs:
- id: cnvkit_calls
outputSource:
- cnvkit/output_calls
type: File
'sbg:x': 1018.6522216796875
'sbg:y': 1463.5
- id: cnvkit_cnn_output
outputSource:
- cnvkit/output_cnn
type: File?
'sbg:x': 1018.6522216796875
'sbg:y': 1356.5
- id: cnvkit_cnr
outputSource:
- cnvkit/output_cnr
type: File
'sbg:x': 1018.6522216796875
'sbg:y': 1249.5
- id: cnvkit_gainloss
outputSource:
- cnvkit/output_gainloss
type: File
'sbg:x': 1018.6522216796875
'sbg:y': 979.5
- id: cnvkit_metrics
outputSource:
- cnvkit/output_metrics
type: File
'sbg:x': 1018.6522216796875
'sbg:y': 872.5
- id: cnvkit_seg
outputSource:
- cnvkit/output_seg
type: File
'sbg:x': 1018.6522216796875
'sbg:y': 765.5
- id: ctrlfreec_baf
outputSource:
- rename_outputs/ctrlfreec_baf
type: File
'sbg:x': 1979.84619140625
'sbg:y': 1149
- id: ctrlfreec_bam_ratio
outputSource:
- rename_outputs/ctrlfreec_bam_ratio
type: File
'sbg:x': 1979.84619140625
'sbg:y': 1042
- id: ctrlfreec_bam_seg
outputSource:
- convert_ratio_to_seg/ctrlfreec_ratio2seg
type: File
'sbg:x': 1979.84619140625
'sbg:y': 935
- id: ctrlfreec_config
outputSource:
- rename_outputs/ctrlfreec_config
type: File
'sbg:x': 1979.84619140625
'sbg:y': 828
- id: ctrlfreec_info
outputSource:
- rename_outputs/ctrlfreec_info
type: File
'sbg:x': 1979.84619140625
'sbg:y': 721
- id: ctrlfreec_pngs
outputSource:
- rename_outputs/ctrlfreec_pngs
type: 'File[]'
'sbg:x': 1979.84619140625
'sbg:y': 614
- id: ctrlfreec_pval
outputSource:
- rename_outputs/ctrlfreec_pval
type: File
'sbg:x': 1979.84619140625
'sbg:y': 507
- id: theta2_calls
outputSource:
- cnvkit_import_theta2/theta2_adjusted_cns
type: File
'sbg:x': 2335.287109375
'sbg:y': 1016.5
- id: theta2_seg
outputSource:
- cnvkit_import_theta2/theta2_adjusted_seg
type: File
'sbg:x': 2335.287109375
'sbg:y': 909.5
- id: theta2_subclonal_cns
outputSource:
- cnvkit_import_theta2/theta2_subclone_cns
type: 'File[]'
'sbg:x': 2335.287109375
'sbg:y': 802.5
- id: theta2_subclonal_results
outputSource:
- run_theta2/n3_graph
- run_theta2/n2_results
- run_theta2/best_results
type: 'File[]'
'sbg:x': 1979.84619140625
'sbg:y': 400
- id: theta2_subclone_seg
outputSource:
- cnvkit_import_theta2/theta2_subclone_seg
type: 'File[]'
'sbg:x': 2335.287109375
'sbg:y': 695.5
steps:
- id: bcftools_filter_combined_vcf
in:
- id: exclude_expression
source: combined_exclude_expression
- id: include_expression
source: combined_include_expression
- id: input_vcf
source: paired_vcf
- id: output_basename
source: output_basename
out:
- id: filtered_vcf
run:
class: CommandLineTool
cwlVersion: v1.0
id: bcftools_filter_vcf
baseCommand: []
inputs:
- id: exclude_expression
type: string?
- id: include_expression
type: string?
- id: input_vcf
type: File
- id: output_basename
type: string?
outputs:
- id: filtered_vcf
type: File
outputBinding:
glob: '*.vcf.gz'
secondaryFiles:
- .tbi
doc: >-
More generic tool to take in an include expression and optionally an
exclude expresssion to filter a vcf
arguments:
- position: 1
shellQuote: false
valueFrom: |-
${
var out_base = inputs.output_basename;
if (out_base == null){
out_base = inputs.input_vcf.nameroot + ".bcf_filtered"
}
var cmd = "bcftools view ";
if (inputs.include_expression != null){
cmd += "--include '" + inputs.include_expression + "' " + inputs.input_vcf.path;
if (inputs.exclude_expression != null){
cmd += " | bcftools view --exclude '" + inputs.exclude_expression + "' -O z > " + out_base + ".vcf.gz;";
} else {
cmd += " -O z > " + out_base + ".vcf.gz;";
}
} else if (inputs.include_expression == null && inputs.exclude_expression != null){
cmd += "--exclude '" + inputs.exclude_expression + "' " + inputs.input_vcf.path + " -O z > " + out_base + ".vcf.gz;";
} else if (inputs.include_expression == null && inputs.exclude_expression == null){
cmd = "cp " + inputs.input_vcf.path + " ./" + out_base + ".vcf.gz;";
}
cmd += "tabix " + out_base + ".vcf.gz;"
return cmd;
}
requirements:
- class: ShellCommandRequirement
- class: ResourceRequirement
ramMin: 1000
coresMin: 1
- class: DockerRequirement
dockerPull: 'kfdrc/bvcftools:latest'
- class: InlineJavascriptRequirement
'sbg:x': 296.890625
'sbg:y': 1037.5
- id: cnvkit
in:
- id: annotation_file
source: annotation_file
- id: b_allele_vcf
source: gatk_filter_germline/filtered_pass_vcf
- id: capture_regions
source: capture_regions
- id: cnvkit_cnn
source: cnvkit_cnn_input
- id: input_control
source: samtools_normal_cram2bam/bam_file
- id: input_sample
source: samtools_tumor_cram2bam/bam_file
- id: output_basename
source: output_basename
- id: reference
source: indexed_reference_fasta
- id: sex
source: cnvkit_sex
- id: threads
source: threads
- id: tumor_sample_name
source: input_tumor_name
- id: wgs_mode
source: wgs_mode
out:
- id: output_calls
- id: output_cnn
- id: output_cnr
- id: output_diagram
- id: output_gainloss
- id: output_metrics
- id: output_scatter
- id: output_seg
run:
class: CommandLineTool
cwlVersion: v1.0
id: cnvkit_batch
baseCommand: []
inputs:
- id: annotation_file
type: File?
doc: 'refFlat.txt file, needed if cnv kit cnn not already built'
- id: b_allele_vcf
type: File?
doc: 'b allele germline vcf, if available'
- id: capture_regions
type: File?
doc: target regions for WES
- id: cnvkit_cnn
type: File?
doc: 'If running using an existing .cnn, supply here'
- id: input_control
type: File?
doc: normal bam file
secondaryFiles:
- ^.bai
- id: input_sample
type: File
doc: tumor bam file
secondaryFiles:
- ^.bai
- id: output_basename
type: string
- id: reference
type: File?
doc: 'fasta file, needed if cnv kit cnn not already built'
secondaryFiles:
- .fai
- id: sex
type: string
doc: Set sample sex. CNVkit isn't always great at guessing it
- default: 16
id: threads
type: int?
- id: tumor_sample_name
type: string
- id: wgs_mode
type: string?
doc: 'for WGS mode, input Y. leave blank for hybrid mode'
outputs:
- id: output_calls
type: File
outputBinding:
glob: '*.call.cns'
- id: output_cnn
doc: >-
Output if starting from cnn scratch. Should not appear if an
existing .cnn was given as input.
type: File?
outputBinding:
glob: '*_reference.cnn'
- id: output_cnr
type: File
outputBinding:
glob: '*.cnr'
- id: output_diagram
type: File
outputBinding:
glob: '*.diagram.pdf'
- id: output_gainloss
type: File
outputBinding:
glob: '*.gainloss.txt'
- id: output_metrics
type: File
outputBinding:
glob: '*.metrics.txt'
- id: output_scatter
type: File
outputBinding:
glob: '*.scatter.pdf'
- id: output_seg
type: File
outputBinding:
glob: '*.seg'
arguments:
- position: 1
shellQuote: false
valueFrom: >-
ln -s $(inputs.input_sample.path) .; ln -s
$(inputs.input_sample.secondaryFiles[0].path)
./$(inputs.input_sample.basename).bai
${
var cmd = "";
if (inputs.input_control != null) {
cmd = "ln -s " + inputs.input_control.path + " .; ln -s " + inputs.input_control.secondaryFiles[0].path + " ./" + inputs.input_control.basename + ".bai"
}
return cmd;
}
cnvkit.py batch -p $(inputs.threads) ${
var cmd = "";
if (inputs.wgs_mode == 'Y') {
cmd = " -m wgs ";
}
return cmd;
} $(inputs.input_sample.path) ${
var cmd = "";
if (inputs.capture_regions != null) {
cmd = "--targets " + inputs.capture_regions.path;
}
return cmd;
} ${
if (inputs.cnv_kit_cnn == null){
var arg = "--output-reference " + inputs.output_basename + "_cnvkit_reference.cnn --fasta " + inputs.reference.path + " --annotate " + inputs.annotation_file.path;
if (inputs.input_control != null) {
arg += " --normal " + inputs.input_control.path;
}
}
else{
var arg = "--reference " + inputs.cnv_kit_cnn.path;
var msex = ['m','y','male','Male']
if (msex.indexOf(inputs.sex) >= 0){
arg += " --male-reference";
}
}
return arg;
} --diagram --scatter
cnvkit.py call $(inputs.input_sample.nameroot).cns ${
var arg = "";
if (inputs.b_allele_vcf != null){
arg = "--vcf " + inputs.b_allele_vcf.path;
}
return arg;
} ${
var arg = "--sample-sex " + inputs.sex;
var msex = ['m','y','male','Male']
if (msex.indexOf(inputs.sex) >= 0){
arg += " --male-reference";
}
return arg;
} -o $(inputs.output_basename).call.cns
ln -s $(inputs.output_basename).call.cns
$(inputs.tumor_sample_name).cns
cnvkit.py export seg $(inputs.tumor_sample_name).cns -o
$(inputs.output_basename).call.seg
rm $(inputs.tumor_sample_name).cns
cnvkit.py metrics $(inputs.input_sample.nameroot).cnr -s
$(inputs.input_sample.nameroot).cns -o
$(inputs.output_basename).metrics.txt
cnvkit.py gainloss $(inputs.input_sample.nameroot).cnr -o
$(inputs.output_basename).gainloss.txt
mv $(inputs.input_sample.nameroot).cnr $(inputs.output_basename).cnr
mv $(inputs.input_sample.nameroot)-diagram.pdf
$(inputs.output_basename).diagram.pdf
mv $(inputs.input_sample.nameroot)-scatter.pdf
$(inputs.output_basename).scatter.pdf
requirements:
- class: ShellCommandRequirement
- class: ResourceRequirement
ramMin: 32000
coresMin: $(inputs.threads)
- class: DockerRequirement
dockerPull: 'images.sbgenomics.com/milos_nikolic/cnvkit:0.9.3'
- class: InlineJavascriptRequirement
'sbg:x': 596.5790405273438
'sbg:y': 977
- id: cnvkit_export_theta2
in:
- id: normal_ID
source: input_normal_name
- id: paired_vcf
source: bcftools_filter_combined_vcf/filtered_vcf
- id: reference_cnn
source: cnvkit/output_cnn
- id: tumor_ID
source: input_tumor_name
- id: tumor_cns
source: cnvkit/output_calls
out:
- id: call_interval_count
- id: call_normal_snp
- id: call_tumor_snp
run:
class: CommandLineTool
cwlVersion: v1.0
id: cnvkit_export_theta2
baseCommand:
- cnvkit.py
- export
- theta
inputs:
- id: normal_ID
type: string
- id: paired_vcf
type: File
- id: reference_cnn
type: File
- id: tumor_ID
type: string
- id: tumor_cns
type: File
outputs:
- id: call_interval_count
type: File
outputBinding:
glob: '*.call.interval_count'
- id: call_normal_snp
type: File
outputBinding:
glob: '*.call.normal.snp_formatted.txt'
- id: call_tumor_snp
type: File
outputBinding:
glob: '*.call.tumor.snp_formatted.txt'
arguments:
- position: 1
shellQuote: false
valueFrom: >-
-r $(inputs.reference_cnn.path) -v $(inputs.paired_vcf.path) -i
$(inputs.tumor_ID) -n $(inputs.normal_ID) $(inputs.tumor_cns.path)
requirements:
- class: ShellCommandRequirement
- class: ResourceRequirement
ramMin: 16000
coresMin: 4
- class: DockerRequirement
dockerPull: 'images.sbgenomics.com/milos_nikolic/cnvkit:0.9.3'
- class: InlineJavascriptRequirement
'sbg:x': 1018.6522216796875
'sbg:y': 1114.5
- id: cnvkit_import_theta2
in:
- id: output_basename
source: output_basename
- id: theta2_best_results
source: run_theta2/best_results
- id: theta2_n2_results
source: run_theta2/n2_results
- id: tumor_cns
source: cnvkit/output_calls
- id: tumor_sample_name
source: input_tumor_name
out:
- id: theta2_adjusted_cns
- id: theta2_adjusted_seg
- id: theta2_subclone_cns
- id: theta2_subclone_seg
run:
class: CommandLineTool
cwlVersion: v1.0
id: cnvkit_import_theta2
baseCommand:
- cnvkit.py
- import-theta
inputs:
- id: output_basename
type: string
- id: theta2_best_results
type: File
- id: theta2_n2_results
type: File
- id: tumor_cns
type: File
- id: tumor_sample_name
type: string
outputs:
- id: theta2_adjusted_cns
type: File
outputBinding:
glob: '*.theta2.total.cns'
- id: theta2_adjusted_seg
type: File
outputBinding:
glob: '*.theta2.total.seg'
- id: theta2_subclone_cns
type: 'File[]'
outputBinding:
glob: '*.theta2.subclone*.cns'
- id: theta2_subclone_seg
type: 'File[]'
outputBinding:
glob: '*.theta2.subclone*.seg'
arguments:
- position: 1
shellQuote: false
valueFrom: >-
$(inputs.tumor_cns.path) $(inputs.theta2_n2_results.path) -d ./
mv $(inputs.output_basename).call-1.cns
$(inputs.output_basename).theta2.total.cns
ln -s $(inputs.output_basename).theta2.total.cns
$(inputs.tumor_sample_name).cns
cnvkit.py export seg $(inputs.tumor_sample_name).cns -o
$(inputs.output_basename).theta2.total.seg
rm $(inputs.tumor_sample_name).cns
cnvkit.py import-theta $(inputs.tumor_cns.path)
$(inputs.theta2_best_results.path) -d ./
mv $(inputs.output_basename).call-1.cns
$(inputs.output_basename).theta2.subclone1.cns
ln -s $(inputs.output_basename).theta2.subclone1.cns
$(inputs.tumor_sample_name).cns
cnvkit.py export seg $(inputs.tumor_sample_name).cns -o
$(inputs.output_basename).theta2.subclone1.seg
rm $(inputs.tumor_sample_name).cns
SC2=$(inputs.output_basename).call-2.cns;
if [ -f "$SC2" ]; then
mv $(inputs.output_basename).call-2.cns $(inputs.output_basename).theta2.subclone2.cns;
ln -s $(inputs.output_basename).theta2.subclone2.cns $(inputs.tumor_sample_name).cns;
cnvkit.py export seg $(inputs.tumor_sample_name).cns -o $(inputs.output_basename).theta2.subclone2.seg;
rm $(inputs.tumor_sample_name).cns;
else
echo "second subclone file not found. skipping!";
fi
requirements:
- class: ShellCommandRequirement
- class: ResourceRequirement
ramMin: 8000
coresMin: 4
- class: DockerRequirement
dockerPull: 'images.sbgenomics.com/milos_nikolic/cnvkit:0.9.3'
- class: InlineJavascriptRequirement
'sbg:x': 1979.84619140625
'sbg:y': 1284
- id: control_free_c
in:
- id: capture_regions
source: capture_regions
- id: chr_len
source: chr_len
- id: coeff_var
source: coeff_var
- id: contamination_adjustment
source: contamination_adjustment
- id: mate_file_control
source: samtools_normal_cram2bam/bam_file
- id: mate_file_sample
source: samtools_tumor_cram2bam/bam_file
- id: mate_orientation_control
source: mate_orientation_control
- id: mate_orientation_sample
source: mate_orientation_sample
- id: max_threads
source: threads
- id: mini_pileup_control
source: controlfreec_normal_mini_pileup/pileup
- id: mini_pileup_sample
source: controlfreec_tumor_mini_pileup/pileup
- id: ploidy
source:
- ploidy
- id: reference
source: indexed_reference_fasta
- id: sex
source: cfree_sex
- id: snp_file
source: gatk_filter_germline/filtered_pass_vcf
out:
- id: GC_profile
- id: cnvs
- id: cnvs_pvalue
- id: config_script
- id: control_cpn
- id: control_pileup
- id: info_txt
- id: pngs
- id: ratio
- id: ratio_BedGraph
- id: sample_BAF
- id: sample_cpn
- id: sample_pileup
run:
class: CommandLineTool
cwlVersion: v1.0
$namespaces:
sbg: 'https://sevenbridges.com'
id: brownm28/mb-controlfreec-troubleshoot/control-freec-11-6-sbg/0
baseCommand: []
inputs:
- 'sbg:category': General
id: GC_content_profile
type: File?
label: GC content profile
doc: GC-content profile for a given window-size.
'sbg:fileTypes': CNP
- 'sbg:category': General
'sbg:toolDefaultValue': 'FALSE'
id: bed_graph_output
type: boolean?
label: Bed Graph output
doc: >-
Set "BedGraphOutput=TRUE" if you want an additional output in
BedGraph format for the UCSC genome browser.
- 'sbg:category': General
'sbg:toolDefaultValue': '0.8'
id: break_point_threshold
type: float?
label: Break point threshold
doc: >-
Positive value of threshold for segmentation of normalized profiles.
The closer it is to zero, the more breakpoints will be called. Its
recommended value is between 0.1 and 1.2.
- 'sbg:category': General
'sbg:toolDefaultValue': '2'
id: break_point_type
type:
- 'null'
- type: enum
symbols:
- '0'
- '1'
- '2'
- '3'
- '4'
name: break_point_type
label: Break point type
doc: >-
Desired behavior in the ambiguous regions (poly-N or low mappability
regions between two different copy number values). 0: the "unknown"
region is attached to the "known" region on the right 1: make a
separate fragment of this “unknown” region and then attaches it to
the left or to the right region choosing the longer one 2: make a
separate fragment of this “unknown” region and then attaches it to
the left or to the right region but the “ploidy” copy number has a
priority 3: make a separate fragment of this “unknown” region and
then attaches it to the left or to the right region choosing the
longer one but this “known” region should make at least half-size of
the “unknown” region 4: make a separate fragment of this “unknown”
region and do not assign any copy number to this region at all
- 'sbg:category': Target
id: capture_regions
type: File?
label: Capture regions
doc: >-
Capture regions in .bed format; sorted .bed file should contain the
following colomns: chr 0-based start 1-based end.
'sbg:fileTypes': BED
- 'sbg:category': File Input
id: chr_len
type: File
label: Chromosomes length file
doc: Chromosome length file in a tab-delimited format.
'sbg:fileTypes': 'TXT, LEN, SIZES'
- 'sbg:toolDefaultValue': '0.05'
id: coeff_var
type: float?
label: Coefficient of variation
doc: Coefficient of variation to evaluate necessary window size.
- 'sbg:category': General
'sbg:toolDefaultValue': '0'
id: contamination
type: float?
label: Contamination
doc: >-
A priori known value of tumor sample contamiantion by normal cells.
Set "contaminationAdjustment=TRUE" to correct for the contamination.
- 'sbg:category': General
'sbg:toolDefaultValue': 'FALSE'
id: contamination_adjustment
type: boolean?
label: Contamination adjustment
doc: >-
Set TRUE to correct for contamination by normal cells. If
"contamination" is not provided, it will automatically evaluate the
level of contamination.
- 'sbg:category': General
'sbg:toolDefaultValue': >-
3&4 (GC-content based normalization, WGS) or 1
(control-read-count-based normalization, WES)
id: degree
type: float?
label: Degree
doc: Degree of polynomial.
- 'sbg:category': General
'sbg:toolDefaultValue': 'WGS: 0, WES: 1'
id: force_GC_content_normalization
type:
- 'null'
- type: enum
symbols:
- '0'
- '1'
- '2'
name: force_GC_content_normalization
label: Force GC content normalization
doc: >-
Set 1 or 2 to correct the Read Count (RC) for GC-content bias and
low mappability even when you have a control sample. 0: simply model
"sample RC ~ Control RC" 1: normalize the sample and the control RC
using GC-content and then calculate the ratio "Sample RC/contol RC"
2: model "sample RC ~ Control RC" bias, and then normalize for
GC-content.
- 'sbg:category': File Input
id: gem_mappability_file
type: File?
label: GEM mappability file
doc: Mappability file in GEM format.
'sbg:fileTypes': GEM
- 'sbg:category': Execution
'sbg:toolDefaultValue': '1 - with GC-content, 0 - with a control dataset'
id: intercept
type: float?
label: Intercept
doc: Intercept of polynomial.
- 'sbg:category': Control
id: mate_copynumber_file_control
type: File?
label: Mate copy number file control
doc: >-
Raw copy number profile for a given window-size (higher priority
than mateFile) (don't need to provide a mateFile if
mateCopyNumberFile is provided).
'sbg:fileTypes': CPN
- 'sbg:category': Sample
id: mate_copynumber_file_sample
type: File?
label: Mate copy number file sample
doc: >-
Raw copy number profile for a given window-size (higher priority
than mateFile) (don't need to provide a mateFile if
mateCopyNumberFile is provided).
'sbg:fileTypes': CPN
- 'sbg:category': Control
id: mate_file_control
type: File?
label: Mate file Control
doc: >-
Mapped reads (can be single end reads, mate-pairs or paired-end
reads).
'sbg:fileTypes': 'SAM, BAM, PILEUP, PILEUP.GZ'
- 'sbg:category': Sample
id: mate_file_sample
type: File?
label: Mate file Sample
doc: >-
Mapped reads (can be single end reads, mate-pairs or paired-end
reads).
'sbg:fileTypes': 'SAM, BAM, PILEUP, PILEUP.GZ'
- 'sbg:category': Control
id: mate_orientation_control
type:
- 'null'
- type: enum
symbols:
- '0'
- RF
- FR
- FF
name: mate_orientation_control
label: Mate orientation control
doc: >-
Format of reads (in mateFile). 0 (for single ends), RF (Illumina
mate-pairs), FR (Illumina paired-ends), FF (SOLiD mate-pairs).
- 'sbg:category': Sample
id: mate_orientation_sample
type:
- 'null'
- type: enum
symbols:
- '0'
- RF
- FR
- FF
name: mate_orientation_sample
label: Mate orientation sample
doc: >-
Format of reads (in mateFile). 0 (for single ends), RF (Illumina
mate-pairs), FR (Illumina paired-ends), FF (SOLiD mate-pairs).
- 'sbg:category': General
'sbg:toolDefaultValue': 0.55 (change only if you run Control-FREEC on a bacterial genome)
id: max_expected_GC
type: float?
label: Maximum expected GC
doc: >-