Skip to content
Snippets Groups Projects
macs2.wdl 697 B
Newer Older
version 1.0
task PeakCalling {
    input {
        String? preCommand
        Array[File] bamFiles
        String outDir
        String sampleName
        Int? threads
        Int? memory
        Boolean? nomodel
    }
    command {
        set -e -o pipefail
        ~{preCommand}
Moustakas's avatar
Moustakas committed
        macs2 callpeak \
        --treatment ~{sep = ' ' bamFiles} \
        --outdir ~{outDir} \
        --name ~{sampleName} \
        ~{default=false true='--nomodel' false='' nomodel}
Moustakas's avatar
Moustakas committed
        File peakFile = outDir + "/" + sampleName + "/macs2/" + sampleName + "_peaks.narrowPeak"
    }

    runtime {
        cpu: select_first([threads,1])
        memory: select_first([memory,8])
    }
}