diff --git a/samtools.wdl b/samtools.wdl index a1192ac3a08419a8584c01a005cd785649a7d60d..ecff136925c9640cd196883a870549296379788f 100644 --- a/samtools.wdl +++ b/samtools.wdl @@ -117,3 +117,31 @@ task fastq { } } + +task view { + String? preCommand + File inFile + File? referenceFasta + String? outputFileName + Boolean? outputBam + Boolean? uncompressedBamOutput + Int? includeFilter + Int? excludeFilter + Int? excludeSpecificFilter + Int? threads + + command { + set -e -o pipefail + ${preCommand} + samtools view \ + ${"-T " + referenceFasta} \ + ${"-o " + outputFileName} \ + ${true="-b " false="" outputBam} \ + ${true="-u " false="" uncompressedBamOutput} \ + ${"-f " + includeFilter} \ + ${"-F " + excludeFilter} \ + ${"-G " + excludeSpecificFilter} \ + ${"--threads " + threads - 1} \ + ${inFile} + } +}