Skip to content
Snippets Groups Projects
seqtk.wdl 695 B
Newer Older
Ruben Vorderman's avatar
Ruben Vorderman committed
version 1.0

Ruben Vorderman's avatar
Ruben Vorderman committed
task sample {
Ruben Vorderman's avatar
Ruben Vorderman committed
    input {
        File sequenceFile
        String? outFilePath = "subsampledReads.fq.gz"
        String? preCommand
        Int? seed
        Boolean? twoPassMode
        Float? fraction
        Int? number
        Boolean? zip = true
    }
Ruben Vorderman's avatar
Ruben Vorderman committed

    command {
Ruben Vorderman's avatar
Ruben Vorderman committed
        set -e -o pipefail
        ~{'mkdir -p $(dirname ' + outFilePath + ')'}
        ~{preCommand}
        seqtk sample \
        ~{"-s " + seed} \
        ~{true="-2 " false="" twoPassMode} \
        ~{sequenceFile} \
        ~{number} ~{fraction} \
        ~{true="| gzip" false="" zip} \
        ~{"> " + outFilePath}
Ruben Vorderman's avatar
Ruben Vorderman committed
    output {
Ruben Vorderman's avatar
Ruben Vorderman committed
        File subsampledReads= select_first([outFilePath])