Skip to content
Snippets Groups Projects
seqtk.wdl 591 B
Newer Older
Ruben Vorderman's avatar
Ruben Vorderman committed
task sample {
    File sequenceFile
Ruben Vorderman's avatar
Ruben Vorderman committed
    String? outFilePath = "subsampledReads.fq.gz"
Ruben Vorderman's avatar
Ruben Vorderman committed
    String? preCommand
    Int? seed
    Boolean? twoPassMode
    Float? fraction
    Int? number
Ruben Vorderman's avatar
Ruben Vorderman committed
    Boolean? zip = true
Ruben Vorderman's avatar
Ruben Vorderman committed

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