Skip to content
Snippets Groups Projects
flash.wdl 1.13 KiB
Newer Older
Pappas's avatar
Pappas committed
task flash {
    String? preCommand
    File inputR1
    File inputR2
    String outdirPath
Pappas's avatar
Pappas committed
    String? outPrefix = "flash"
    Int? minOverlap
    Int? maxOverlap
    Boolean? compress = true
Pappas's avatar
Pappas committed
    Int? threads
    Int? memory
Pappas's avatar
Pappas committed

    command {
        set -e -o pipefail
        mkdir -p ${outdirPath}
Pappas's avatar
Pappas committed
        ${preCommand}
        flash \
        ${"--threads=" + threads} \
        ${"--output-directory=" + outdirPath} \
Pappas's avatar
Pappas committed
        ${"--output-prefix=" + outPrefix} \
        ${true="--compress " false="" defined(compress)} \
        ${"--min-overlap=" + minOverlap} \
        ${"--max-overlap=" + maxOverlap} \
Pappas's avatar
Pappas committed
        ${inputR1} ${inputR2}
Pappas's avatar
Pappas committed
    }

    output {
        File extendedFrags = outdirPath + "/" + outPrefix + ".extendedFrags.fastq.gz"
        File notCombined1 = outdirPath + "/" + outPrefix + ".notCombined_1.fastq.gz"
        File notCombined2 = outdirPath + "/" + outPrefix + ".notCombined_2.fastq.gz"
        File hist = outdirPath + "/" + outPrefix + ".hist"
        File histogram = outdirPath + "/" + outPrefix + ".histogram"
Pappas's avatar
Pappas committed
    }

    runtime {
Pappas's avatar
Pappas committed
        cpu: select_first([threads, 2])
        memory: select_first([memory, 2])
Pappas's avatar
Pappas committed
    }

}