Why does this work on command line but not when executed via cromwell?

Hello,
I have the following commands wrapped in a WDL task:

        source /broad/software/scripts/useuse
        use BWA
        use Samtools
        bwa mem -t 8 -R ${read_group} ${ref} ${fq1} ${fq2} | samtools view -bS - > ${sample_name}.aligned.bam

The above is trying to generate an aligned BAM without the hard-disk overhead of an intermediary SAM file. It works when I do it manually on command line. However, when executed as part of a WDL, I get a truncated BAM that's only 93 bytes in size.The stderr doesn't show anything informative except I noticed that BWA reports a shorter CPU time than when I do it manually, which makes sense.

Any clue as to what might be happening or alternate ways to do this?

Tagged:

Answers

Sign In or Register to comment.