/
cnvkit_single_sample.cwl
93 lines (89 loc) · 2.62 KB
/
cnvkit_single_sample.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
#! /usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
label: "Subworkflow that runs cnvkit in single sample mode and returns a vcf file"
requirements:
- class: StepInputExpressionRequirement
inputs:
fasta_reference:
type:
- string
- File
secondaryFiles: [.fai]
tumor_bam:
type: File
method:
type:
- "null"
- type: enum
symbols: ["hybrid", "amplicon", "wgs"]
diagram:
type: boolean?
scatter_plot:
type: boolean?
drop_low_coverage:
type: boolean?
male_reference:
type: boolean?
reference_cnn:
type: File?
cnvkit_vcf_name:
type: string
default: "cnvkit.vcf"
segment_filter:
type:
- "null"
- type: enum
symbols: ["ampdel", "ci", "cn", "sem"]
outputs:
cn_diagram:
type: File?
outputSource: cnvkit_main/cn_diagram
cn_scatter_plot:
type: File?
outputSource: cnvkit_main/cn_scatter_plot
tumor_antitarget_coverage:
type: File
outputSource: cnvkit_main/tumor_antitarget_coverage
tumor_target_coverage:
type: File
outputSource: cnvkit_main/tumor_target_coverage
tumor_bin_level_ratios:
type: File
outputSource: cnvkit_main/tumor_bin_level_ratios
tumor_segmented_ratios:
type: File
outputSource: cnvkit_main/tumor_segmented_ratios
cnvkit_vcf:
type: File
outputSource: cns_to_vcf/cnvkit_vcf
steps:
cnvkit_main:
run: ../tools/cnvkit_batch.cwl
in:
tumor_bam: tumor_bam
method: method
diagram: diagram
scatter_plot: scatter_plot
drop_low_coverage: drop_low_coverage
male_reference: male_reference
reference:
source: [reference_cnn, fasta_reference]
valueFrom: |
${
var cnn = self[0];
var fasta = self[1];
return {'cnn_file': cnn, 'fasta_file': fasta};
}
out:
[cn_diagram, cn_scatter_plot, tumor_antitarget_coverage, tumor_target_coverage, tumor_bin_level_ratios, tumor_segmented_ratios]
cns_to_vcf:
run: ../tools/cnvkit_vcf_export.cwl
in:
segment_filter: segment_filter
cns_file: cnvkit_main/tumor_segmented_ratios
male_reference: male_reference
cnr_file: cnvkit_main/tumor_bin_level_ratios
output_name: cnvkit_vcf_name
out:
[cnvkit_vcf]