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

Merge branch 'spades' of git.lumc.nl:sasc/wdl-tasks into spades

parents 264c68bc e63040a8
No related branches found
No related tags found
2 merge requests!9Changes for virus assembly pipeline,!10Extra tasks required for assembly.
...@@ -41,6 +41,7 @@ task mem { ...@@ -41,6 +41,7 @@ task mem {
String? I String? I
command { command {
set -e -o pipefail set -e -o pipefail
${"mkdir -p $(dirname " + outputFile + ")"}
${preCommand} ${preCommand}
bwa mem \ bwa mem \
${"-t " + threads } \ ${"-t " + threads } \
......
...@@ -24,10 +24,7 @@ task download { ...@@ -24,10 +24,7 @@ task download {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
${'if [ ! -f ' + seqTaxMapPath + ${"mkdir -p $(dirname " + seqTaxMapPath + ")"}
' ]; then mkdir -p ' + seqTaxMapPath +
'; rm -d ' + seqTaxMapPath +
'; fi' }
${executable} \ ${executable} \
-o ${libraryPath} \ -o ${libraryPath} \
${true='-d ' false='' defined(domain)}${sep=',' domain} \ ${true='-d ' false='' defined(domain)}${sep=',' domain} \
...@@ -92,8 +89,7 @@ task build { ...@@ -92,8 +89,7 @@ task build {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
mkdir -p ${centrifugeIndexBase} ${"mkdir -p $(dirname " + centrifugeIndexBase + ")"}
rm -d ${centrifugeIndexBase}
${centrifugeBuildExecutable} \ ${centrifugeBuildExecutable} \
${true='--large-index' false='' largeIndex} \ ${true='--large-index' false='' largeIndex} \
${true='--noauto' false='' noAuto} \ ${true='--noauto' false='' noAuto} \
......
...@@ -35,7 +35,7 @@ task concatenateTextFiles { ...@@ -35,7 +35,7 @@ task concatenateTextFiles {
Boolean? unzip=false Boolean? unzip=false
command { command {
set -e -o pipefail set -e -o pipefail
mkdir $(dirname ${combinedFilePath}) ${"mkdir -p $(dirname " + combinedFilePath + ")"}
${true='zcat' false= 'cat' unzip} ${sep=' ' fileList} \ ${true='zcat' false= 'cat' unzip} ${sep=' ' fileList} \
> ${combinedFilePath} > ${combinedFilePath}
} }
......
...@@ -59,7 +59,9 @@ task cutadapt { ...@@ -59,7 +59,9 @@ task cutadapt {
command { command {
set -e -o pipefail set -e -o pipefail
mkdir -p $(dirname ${read1output}) ${"mkdir -p $(dirname " + read1output + ")"}
${"mkdir -p $(dirname " + read2output + ")"}
${"mkdir -p $(dirname " + reportPath + ")"}
${preCommand} ${preCommand}
cutadapt \ cutadapt \
${"--cores=" + cores} \ ${"--cores=" + cores} \
......
task sample { task sample {
File sequenceFile File sequenceFile
File? outFilePath = "subsampledReads" String? outFilePath = "subsampledReads.fq.gz"
String? preCommand String? preCommand
Int? seed Int? seed
Boolean? twoPassMode Boolean? twoPassMode
Float? fraction Float? fraction
Int? number Int? number
Boolean? zip Boolean? zip = true
command { command {
set -e -o pipefail set -e -o pipefail
...@@ -20,6 +20,6 @@ task sample { ...@@ -20,6 +20,6 @@ task sample {
${"> " + outFilePath} ${"> " + outFilePath}
} }
output { output {
File subsampledReads=select_first([outFilePath]) File subsampledReads= select_first([outFilePath])
} }
} }
\ No newline at end of file
...@@ -39,8 +39,7 @@ task spades { ...@@ -39,8 +39,7 @@ task spades {
${true="--rna" false="" rna} \ ${true="--rna" false="" rna} \
${true="--plasmid" false="" plasmid} \ ${true="--plasmid" false="" plasmid} \
${true="--iontorrent" false="" ionTorrent} \ ${true="--iontorrent" false="" ionTorrent} \
${"--12 " + interlacedReads } ${"--12 " + interlacedReads } \
${"--threads " + threads } \
${"-1 " + read1 } \ ${"-1 " + read1 } \
${"-2 " + read2 } \ ${"-2 " + read2 } \
${"-s " + singleRead } \ ${"-s " + singleRead } \
...@@ -66,12 +65,12 @@ task spades { ...@@ -66,12 +65,12 @@ task spades {
Array[File] correctedReads = glob(outputDir + "/corrected/*.fastq*") Array[File] correctedReads = glob(outputDir + "/corrected/*.fastq*")
File scaffolds = outputDir + "/scaffolds.fasta" File scaffolds = outputDir + "/scaffolds.fasta"
File contigs = outputDir + "/contigs.fasta" File contigs = outputDir + "/contigs.fasta"
File assemblyGraphGfa = outputDir + "/assembly_graph.gfa" File assemblyGraphWithScaffoldsGfa = outputDir + "/assembly_graph_with_scaffolds.gfa"
File assemblyGraphFastg = outputDir + "/assembly_graph.fastq" File assemblyGraphFastg = outputDir + "/assembly_graph.fastg"
File contigsPaths = outputDir + "/contigs.paths" File contigsPaths = outputDir + "/contigs.paths"
File scaffoldsPaths = outputDir + "/scaffolds.paths" File scaffoldsPaths = outputDir + "/scaffolds.paths"
File params = outputDir + "/params.txt" File params = outputDir + "/params.txt"
File log = outputDir + "/spades/log" File log = outputDir + "/spades.log"
} }
runtime { runtime {
cpu: select_first([threads]) cpu: select_first([threads])
......
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