From 0c655aeb877af353043e6188e2d4fb6b440f4dfb Mon Sep 17 00:00:00 2001 From: Ruben Vorderman <r.h.p.vorderman@lumc.nl> Date: Wed, 3 Jul 2019 10:33:23 +0200 Subject: [PATCH] fix output bam --- samtools.wdl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/samtools.wdl b/samtools.wdl index b09f37b..0c3b589 100644 --- a/samtools.wdl +++ b/samtools.wdl @@ -31,26 +31,26 @@ task BgzipAndIndex { task Index { input { File bamFile - String? bamPath + String? outputBamPath String dockerImage = "quay.io/biocontainers/samtools:1.8--h46bd0b3_5" } - String bamIndexPath = sub(select_first([bamPath, basename(bamFile)]), "\.bam$", ".bai") + String bamIndexPath = sub(select_first([outputBamPath, basename(bamFile)]), "\.bam$", ".bai") command { bash -c ' set -e - # Make sure bamPath does not exist. - if [ ! -f ~{bamPath} ] + # Make sure outputBamPath does not exist. + if [ ! -f ~{outputBamPath} ] then - mkdir -p $(dirname ~{bamPath}) - ln ~{bamFile} ~{bamPath} + mkdir -p $(dirname ~{outputBamPath}) + ln ~{bamFile} ~{outputBamPath} fi - samtools index ~{bamPath} ~{bamIndexPath} + samtools index ~{outputBamPath} ~{bamIndexPath} ' } output { - File indexedBam = bamPath + File indexedBam = outputBamPath File index = bamIndexPath } -- GitLab