Skip to content
Snippets Groups Projects
macs2.wdl 606 B
Newer Older
Moustakas's avatar
Moustakas committed
task PeakCalling {
    String? preCommand
    Array[File] bamFiles
    String outDir
    String sampleName
    Int? threads
    Int? memory
    Boolean nomodel = false

    command {
        set -e -o pipefail
        ${preCommand}
Moustakas's avatar
Moustakas committed
        macs2 callpeak \
        --treatment ${sep = ' ' bamFiles} \
Moustakas's avatar
Moustakas committed
        --outdir ${outDir} \
        --name ${sampleName} \
Moustakas's avatar
Moustakas committed
        ${true='--nomodel' false='' nomodel}
Moustakas's avatar
Moustakas committed
        File peakFile = outDir + "/" + sampleName + "_peaks.narrowPeak"
    }

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