Skip to content
Snippets Groups Projects
htseq.wdl 717 B
version 1.0

task HTSeqCount {
    input {
        String? preCommand
        Array[File] alignmentFiles
        File gtfFile
        String outputTable
        String? format
        String? order
        String? stranded

        Int? memory
    }

    command {
        set -e -o pipefail
        mkdir -p ~{sub(outputTable, basename(outputTable), "")}
        ~{preCommand}
        htseq-count \
        -f ~{default="bam" format} \
        -r ~{default="pos" order} \
        -s ~{default="no" stranded} \
        ~{sep=" " alignmentFiles} \
        ~{gtfFile} \
        > ~{outputTable}
    }

    output {
        File counts = outputTable
    }

    runtime {
        memory: select_first([memory, 3])
    }
}