Skip to content

Commit 08681ba

Browse files
author
Nuwah12
committed
update
1 parent 1f4f9f4 commit 08681ba

2 files changed

Lines changed: 21 additions & 37 deletions

File tree

wdl_tasks/peak_calling.wdl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ task MACS2_CallPeaks {
6060

6161
# Fragment size handling
6262
Int? estimated_fragment_size
63-
Int default_extsize = 200
64-
Int shift = 0
6563

6664
# Runtime
6765
Int cpu = 4
@@ -88,7 +86,7 @@ task MACS2_CallPeaks {
8886
~{if call_summits then "--call-summits" else ""} \
8987
~{broad_flag} \
9088
~{if defined(estimated_fragment_size) then "--nomodel" else ""} \
91-
~{if defined(HALF_FRAG) then ("--shiftsize="+HALF_FRAG) else ""} \
89+
~{if defined(estimated_fragment_size) then ("--shiftsize="+HALF_FRAG) else ""} \
9290
~{if defined(estimated_fragment_size) then ("--bw="+Bandwidth) else ""} \
9391
~{if paired_end then "--format BAMPE" else "--format BAM"} \
9492
--keep-dup=1 \

workflows/peak_calling/peakcalling.wdl

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -36,47 +36,33 @@ workflow MACS2_CallPeaks {
3636
String bam = sample[1]
3737

3838
if (HomerFragmentSizeEstimation) {
39-
call peakcall.EstimateFragSize {
39+
call peakcall.EstimateFragSize as FragmentSizeEstimator {
4040
input:
4141
bam = bam,
4242
sample_name = sample_id
4343
}
44-
45-
46-
call peakcall.MACS2_CallPeaks {
47-
input:
48-
treatment_bam = bam,
49-
sample_name = sample_id,
50-
control_bam = control_bam,
51-
genome_size = genome_size,
52-
q_value = q_value,
53-
call_summits = call_summits,
54-
paired_end = paired_end,
55-
peak_type = peak_type,
56-
cpu = cpu,
57-
mem = mem
58-
}
5944
}
60-
if (!HomerFragmentSizeEstimation) {
61-
call peakcall.MACS2_CallPeaks {
62-
input:
63-
treatment_bam = bam,
64-
sample_name = sample_id,
65-
control_bam = control_bam,
66-
genome_size = genome_size,
67-
q_value = q_value,
68-
call_summits = call_summits,
69-
paired_end = paired_end,
70-
peak_type = peak_type,
71-
cpu = cpu,
72-
mem = mem
73-
}
45+
46+
call peakcall.MACS2_CallPeaks as PeakCaller {
47+
input:
48+
treatment_bam = bam,
49+
sample_name = sample_id,
50+
control_bam = control_bam,
51+
genome_size = genome_size,
52+
q_value = q_value,
53+
estimated_fragment_size = FragmentSizeEstimator.estimated_fragment_size,
54+
call_summits = call_summits,
55+
paired_end = paired_end,
56+
peak_type = peak_type,
57+
cpu = cpu,
58+
mem = mem
7459
}
75-
7660
}
61+
62+
7763
output {
78-
Array[File] narrowPeak = MACS2_CallPeaks.narrowPeak
79-
Array[File?] summits = MACS2_CallPeaks.summits
80-
Array[File] xls = MACS2_CallPeaks.xls
64+
Array[File] narrowPeak = PeakCaller.narrowPeak
65+
Array[File?] summits = PeakCaller.summits
66+
Array[File] xls = PeakCaller.xls
8167
}
8268
}

0 commit comments

Comments
 (0)