From 734c4037e642bf318b249f8835f2042c40ff328d Mon Sep 17 00:00:00 2001 From: JasperBoom <jboom@infernum.nl> Date: Mon, 14 Jun 2021 15:49:53 +0200 Subject: [PATCH] Try another approach. --- bam2fastx.wdl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bam2fastx.wdl b/bam2fastx.wdl index b09f7a0..110441e 100644 --- a/bam2fastx.wdl +++ b/bam2fastx.wdl @@ -103,16 +103,26 @@ task Bam2Fastq { String dockerImage = "quay.io/biocontainers/bam2fastx:1.3.1--hf05d43a_1" } - command { + command <<< set -e mkdir -p "$(dirname ~{outputPrefix})" + + # Localise the bam and pbi files so they are next to each other in the + # current folder. + bamFiles="" + for bamFile in ~{sep=" " bam} + do + fullPathBam=$(readlink -f ${bamFile}) + bamFiles=${bamFiles}" ${fullPathBam}" + done + bam2fastq \ --output ~{outputPrefix} \ -c ~{compressionLevel} \ ~{true="--split-barcodes" false="" splitByBarcode} \ ~{"--seqid-prefix " + seqIdPrefix} \ - ~{sep=" " bam} - } + ${bamFiles} + >>> output { File fastqFile = outputPrefix + ".fastq.gz" -- GitLab