From a8a06cd70cfd14eff770da4c04878635932794c8 Mon Sep 17 00:00:00 2001 From: DavyCats <davycats.dc@gail.com> Date: Tue, 13 Mar 2018 15:36:15 +0100 Subject: [PATCH] add star task --- .gitignore | 1 + star.wdl | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .gitignore create mode 100644 star.wdl diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/star.wdl b/star.wdl new file mode 100644 index 0000000..7c8c4c9 --- /dev/null +++ b/star.wdl @@ -0,0 +1,37 @@ +task Star { + String? preCommand + + File inputR1 + File? inputR2 + String genomeDir + String outFileNamePrefix + + String? outSAMtype = "BAM SortedByCoordinate" + String? readFilesCommand = "zcat" + Int? runThreadN + String? outStd + String? twopassMode + String? outSAMattrRGline + + Map[String, String] samOutputNames = {"BAM SortedByCoordinate": "sortedByCoord.out.bam"} #needs to be extended for all possible values + + command { + set -e -o pipefail + mkdir -p ${sub(outFileNamePrefix, basename(outFileNamePrefix) + "$", "")} + ${preCommand} + STAR \ + --readFilesIn ${inputR1} ${inputR2} \ + --outFileNamePrefix ${outFileNamePrefix} \ + --genomeDir ${genomeDir} \ + ${"--readFilesCommand " + readFilesCommand} \ + ${"--outSAMtype " + outSAMtype} \ + ${"--runThreadN " + runThreadN} \ + ${"--outStd " + outStd} \ + ${"--twopassMode " + twopassMode} \ + ${"--outSAMattrRGline " + outSAMattrRGline} + } + + output { + File bamFile = outFileNamePrefix + "Aligned." + samOutputNames["${outSAMtype}"] + } +} \ No newline at end of file -- GitLab