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

solved index problem

parent 47035fb2
No related branches found
No related tags found
2 merge requests!9Changes for virus assembly pipeline,!10Extra tasks required for assembly.
task mem {
File read1
File referenceFile
File indexBase
Array[File] indexFiles # Not used by the command, but needed so cromwell does provide the proper links.
File? read2
String? outputFile = "aligned.bam"
String? preCommand
......@@ -39,6 +40,9 @@ task mem {
Boolean? Y
Boolean? M
String? I
parameter_meta {
referenceFiles: "Should contain all the index files from the index task"
}
command {
set -e -o pipefail
${"mkdir -p $(dirname " + outputFile + ")"}
......@@ -79,7 +83,7 @@ task mem {
${true="-Y" false="" Y } \
${true="-M" false="" M } \
${"-I " + I } \
${referenceFile} ${read1} ${read2} \
${indexBase} ${read1} ${read2} \
| picard SortSam CREATE_INDEX=TRUE TMP_DIR=null \
INPUT=/dev/stdin SORT_ORDER=coordinate OUTPUT=${outputFile}
}
......@@ -112,7 +116,9 @@ task index {
}
output {
File indexedFasta = if (defined(outputDir)) then select_first([outputDir]) + "/" + fastaFilename else fastaFilename
File indexBase = if (defined(outputDir)) then select_first([outputDir]) + "/" + fastaFilename else fastaFilename
File indexedFasta = indexBase
Array[File] indexFiles = [indexBase + ".bwt",indexBase + ".pac",indexBase + ".sa",indexBase + ".amb",indexBase + ".ann"]
}
parameter_meta {
fasta: "Fasta file to be indexed"
......
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