/
wf_self_consistency_ratio.cwl
executable file
·103 lines (84 loc) · 2.45 KB
/
wf_self_consistency_ratio.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
#!/usr/bin/env cwltool
doc: |
Computes the self-consistency ratio (see Gabe's protocols paper, or CHIP SEQ).
Given two replicates, split each and perform IDR on each fragment.
Returns the ratio of max(N1, N2)/min(N1, N2) where N1, N2 are
the numbers of reproducible peaks found between each rep split pair.
cwlVersion: v1.0
class: Workflow
requirements:
- class: SubworkflowFeatureRequirement
- class: MultipleInputFeatureRequirement
- class: InlineJavascriptRequirement
inputs:
rep1_name:
type: string
rep1_clip_bam_file:
type: File
rep1_input_bam_file:
type: File
rep2_name:
type: string
rep2_clip_bam_file:
type: File
rep2_input_bam_file:
type: File
species:
type: string
### DEFAULTS (optional) ###
rep1_merged_peaks_bed:
type: string
default: "rep1_split_reproducible_peaks.bed"
rep1_merged_peaks_custombed:
type: string
default: "rep1_split_reproducible_peaks.custombed"
rep2_merged_peaks_bed:
type: string
default: "rep2_split_reproducible_peaks.bed"
rep2_merged_peaks_custombed:
type: string
default: "rep2_split_reproducible_peaks.custombed"
outputs:
self_consistency_ratio:
type: File
outputSource: step_self_consistency/ratio
rep1_reproducing_peaks_count:
type: int
outputSource: step_split_rep1_and_idr/reproducing_peaks_count
rep2_reproducing_peaks_count:
type: int
outputSource: step_split_rep2_and_idr/reproducing_peaks_count
steps:
step_split_rep1_and_idr:
run: wf_split_self_and_idr.cwl
in:
clip_bam: rep1_clip_bam_file
input_bam: rep1_input_bam_file
species: species
merged_peaks_bed: rep1_merged_peaks_bed
merged_peaks_custombed: rep1_merged_peaks_custombed
out:
- reproducing_peaks_count
step_split_rep2_and_idr:
run: wf_split_self_and_idr.cwl
in:
clip_bam: rep2_clip_bam_file
input_bam: rep2_input_bam_file
species: species
merged_peaks_bed: rep2_merged_peaks_bed
merged_peaks_custombed: rep2_merged_peaks_custombed
out:
- reproducing_peaks_count
step_self_consistency:
run: max_over_min.cwl
in:
count1: step_split_rep1_and_idr/reproducing_peaks_count
count2: step_split_rep2_and_idr/reproducing_peaks_count
output_file:
source: [rep1_name, rep2_name]
valueFrom: |
${
return self[0] + ".vs." + self[1] + ".consistency";
}
out:
- ratio