Skip to content

Commit

Permalink
added macs2 to CUTnRUN pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
KerstenBreuer committed Aug 2, 2020
1 parent e2f3e99 commit 0cee439
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
72 changes: 72 additions & 0 deletions CWL/tools/macs2_callpeak.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
cwlVersion: v1.0
class: CommandLineTool
requirements:
InlineJavascriptRequirement: {}
StepInputExpressionRequirement: {}
hints:
ResourceRequirement:
coresMin: 1
ramMin: 10000
DockerRequirement:
dockerPull: genomicpariscentre/macs2:2.1.0.20140616

### BASE COMMAND AND ARGUMENTS:
##################################################
baseCommand: ["macs2", "callpeak"]
arguments:
- valueFrom: |
${
if ( inputs.is_paired_end ){
return "BAMPE";
}
else {
return "BAM";
}
}
prefix: --format
position: 1
- valueFrom: "--nomodel"
position: 2
- valueFrom: "all"
prefix: "--keep-dup"
position: 2
- valueFrom: $(inputs.bam.nameroot + ".macs2")
prefix: "--name"
position: 100

inputs:
bam:
type: File
inputBinding:
position: 101
prefix: "--treatment"
genome_size:
type: long
inputBinding:
position: 3
prefix: "--gsize"
broad:
type: boolean
inputBinding:
position: 3
prefix: "--broad"
qvalue:
type: float
inputBinding:
position: 3
prefix: "--qvalue"
is_paired_end:
type: boolean
default: true

outputs:
peaks_bed:
type:
type: array
items: File
outputBinding:
glob: "*Peak"
peaks_xls:
type: File
outputBinding:
glob: "*_peaks.xls"
36 changes: 36 additions & 0 deletions CWL/workflows/CUTnRUN.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ inputs:
Default: "chrX chrY chrM"
type: string?
default: "chrX chrY chrM"
macs2_qvalue:
doc: |
Q-value cutoff used for peak calling by MACS2.
The default is 0.05.
type: float
broad_peaks:
doc: |
Determines whether the "--broad" flag
should be used by MACS2 for peak calling.
type: boolean
default: false

### WORKFLOW STEPS:
##################################################
Expand Down Expand Up @@ -230,6 +241,22 @@ steps:
out:
- bigwig

peak_calling_macs2:
doc: peak calling using macs2
run: "../tools/macs2_callpeak.cwl"
in:
bam:
source: merge_filter/bam
genome_size:
source: effective_genome_size
broad:
source: broad_peaks
qvalue:
source: macs2_qvalue
out:
- peaks_bed
- peaks_xls

create_summary_qc_report:
doc: |
multiqc summarizes the qc results from fastqc
Expand Down Expand Up @@ -358,6 +385,15 @@ outputs:
qc_phantompeakqualtools_stderr:
type: File?
outputSource: chip_qc/qc_phantompeakqualtools_stderr

peaks_bed_macs2:
type:
type: array
items: File
outputSource: peak_calling_macs2/peaks_bed
peaks_xls_macs2:
type: File
outputSource: peak_calling_macs2/peaks_xls

multiqc_zip:
type: File
Expand Down

0 comments on commit 0cee439

Please sign in to comment.