Newer
Older
#TODO needs to be extended for all possible output extensions
Map[String, String] samOutputNames = {"BAM SortedByCoordinate": "sortedByCoord.out.bam"}
command {
set -e -o pipefail
mkdir -p ${sub(outFileNamePrefix, basename(outFileNamePrefix) + "$", "")}
${preCommand}
STAR \
--outFileNamePrefix ${outFileNamePrefix} \
--genomeDir ${genomeDir} \
--outSAMtype ${default="BAM SortedByCoordinate" outSAMtype} \
--readFilesCommand ${default="zcat" readFilesCommand} \
${"--runThreadN " + runThreadN} \
${"--outStd " + outStd} \
${"--twopassMode " + twopassMode} \
${true="--outSAMattrRGline " false="" defined(outSAMattrRGline)} ${sep=" , " outSAMattrRGline}
}
output {
File bamFile = outFileNamePrefix + "Aligned." + samOutputNames["${outSAMtype}"]
}
threads: select_first([runThreadN, 1])
memory: select_first([memory, 10])