Skip to content
Snippets Groups Projects
Commit 1c1f8955 authored by Ruben Vorderman's avatar Ruben Vorderman
Browse files

bwa.wdl to 1.0

parent 2de46d0a
No related branches found
No related tags found
1 merge request!34Move all files to version 1.0
task mem {
String? preCommand
File inputR1
File? inputR2
File referenceFasta
Array[File] indexFiles # These indexFiles need to be added, otherwise cromwell will not find them.
String outputPath
String? readgroup
version 1.0
Int? threads
Int? memory
task mem {
input {
String? preCommand
File inputR1
File? inputR2
File referenceFasta
Array[File] indexFiles # These indexFiles need to be added, otherwise cromwell will not find them.
String outputPath
String? readgroup
Int? threads
Int? memory
}
command {
set -e -o pipefail
mkdir -p $(dirname ${outputPath})
${preCommand}
bwa mem ${"-t " + threads} \
${"-R '" + readgroup + "'"} \
${referenceFasta} ${inputR1} ${inputR2} | samtools sort --output-fmt BAM - > ${outputPath}
mkdir -p $(dirname ~{outputPath})
~{preCommand}
bwa mem ~{"-t " + threads} \
~{"-R '" + readgroup + "'"} \
~{referenceFasta} ~{inputR1} ~{inputR2} | samtools sort --output-fmt BAM - > ~{outputPath}
}
output {
......@@ -30,26 +33,29 @@ task mem {
}
task index {
File fasta
String? preCommand
String? constructionAlgorithm
Int? blockSize
String? outputDir
input {
File fasta
String? preCommand
String? constructionAlgorithm
Int? blockSize
String? outputDir
}
String fastaFilename = basename(fasta)
String outputFile = if (defined(outputDir)) then outputDir + "/" + fastaFilename else fasta
command {
set -e -o pipefail
${"mkdir -p " + outputDir}
${preCommand}
if [[ ! '${outputDir}' = '' ]]
~{"mkdir -p " + outputDir}
~{preCommand}
if [[ ! '~{outputDir}' = '' ]]
then
ln -sf ${fasta} ${outputDir + "/"}${fastaFilename}
ln -sf ~{fasta} ~{outputDir + "/"}~{fastaFilename}
fi
bwa index \
${"-a " + constructionAlgorithm} \
${"-b" + blockSize} \
${outputFile}
~{"-a " + constructionAlgorithm} \
~{"-b" + blockSize} \
~{outputFile}
}
output {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment