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

add preCommand

parent 6cccf353
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ task download {
String libraryPath
Array[String]? domain
String? executable = "centrifuge-download"
File? condaEnvironment
String? preCommand
String? seqTaxMapPath
String? database = "refseq"
String? assemblyLevel
......@@ -22,11 +22,12 @@ task download {
# The bash statement at the beginning is to make sure
# the directory for the SeqTaxMapPath exists.
command {
set -e -o pipefail
${preCommand}
${'if [ ! -f ' + seqTaxMapPath +
' ]; then mkdir -p ' + seqTaxMapPath +
'; rm -d ' + seqTaxMapPath +
'; fi' }
${"source activate " + condaEnvironment}
${executable} \
-o ${libraryPath} \
${true='-d ' false='' defined(domain)}${sep=',' domain} \
......@@ -50,9 +51,10 @@ task download {
task downloadTaxonomy {
String centrifugeTaxonomyDir
String? executable = "centrifuge-download"
File? condaEnvironment
String? preCommand
command {
${"source activate " + condaEnvironment}
set -e -o pipefail
${preCommand}
${executable} \
-o ${centrifugeTaxonomyDir} \
taxonomy
......@@ -69,7 +71,7 @@ task build {
File taxonomyTree
File inputFasta
String centrifugeIndexBase
File? condaEnvironment
String? preCommand
String? centrifugeBuildExecutable = "centrifuge-build"
#Boolean? c = false
Boolean? largeIndex = false
......@@ -88,9 +90,10 @@ task build {
Int? kmerCount
command {
set -e -o pipefail
${preCommand}
mkdir -p ${centrifugeIndexBase}
rm -d ${centrifugeIndexBase}
${"source activate " + condaEnvironment}
${centrifugeBuildExecutable} \
${true='--large-index' false='' largeIndex} \
${true='--noauto' false='' noAuto} \
......
......@@ -4,7 +4,7 @@ task cutadapt {
String read1output
String? read2output
String? format
String? condaEnv
String? preCommand
Int? cores = 1
Array[String]? adapter
Array[String]? front
......@@ -57,7 +57,7 @@ task cutadapt {
command {
set -e -o pipefail
${"source activate " + condaEnv}
${preCommand}
cutadapt \
${"--cores=" + cores} \
${true="-a " false="" defined(adapter)} ${sep=" -a " adapter} \
......
task fastqc {
File seqFile
String outdirPath
String? condaEnv
String? preCommand
Boolean? casava
Boolean? nano
Boolean? noFilter
......@@ -18,7 +18,7 @@ task fastqc {
command {
set -e -o pipefail
${"source activate " + condaEnv}
${preCommand}
mkdir -p ${outdirPath}
fastqc \
${"--outdir " + outdirPath} \
......
......@@ -14,11 +14,11 @@ task genomeDownload {
String? domain = "all"
String? executable = "ncbi-genome-download"
File? condaEnvironment
String? preCommand
command {
set -e -o pipefail
${"source activate " + condaEnvironment}
${preCommand}
${executable} \
${"--section " + section} \
${"--format " + format} \
......
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