Skip to content
Snippets Groups Projects
Commit de411900 authored by Cats's avatar Cats
Browse files

Merge branch 'BIOWDL-25' of https://github.com/biowdl/tasks into BIOWDL-25

parents 8b27e8aa ca68fbdc
No related branches found
No related tags found
1 merge request!17Caching related changes
...@@ -70,25 +70,24 @@ task BaseCounter { ...@@ -70,25 +70,24 @@ task BaseCounter {
task FastqSplitter { task FastqSplitter {
String? preCommand String? preCommand
File inputFastq File inputFastq
String outputPath Array[String] outputPaths
Int numberChunks String toolJar
String tool_jar
Array[Int] chunks = range(numberChunks)
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
mkdir -p ${sep=' ' prefix(outputPath + "/chunk_", chunks)} mkdir -p $(dirname ${sep=') $(dirname ' outputPaths})
if [ ${numberChunks} -gt 1 ]; then if [ ${length(outputPaths)} -gt 1 ]; then
SEP="/${basename(inputFastq)} -o " java -jar ${toolJar} \
java -jar ${tool_jar} -I ${inputFastq} -o ${sep='$SEP' prefix(outputPath + "/chunk_", chunks)}/${basename(inputFastq)} -I ${inputFastq} \
else -o ${sep=' -o ' outputPaths}
ln -sf ${inputFastq} ${outputPath}/chunk_0/${basename(inputFastq)} else
fi ln -sf ${inputFastq} ${outputPaths[0]}
fi
} }
output { output {
Array[File] outputFastqFiles = glob(outputPath + "/chunk_*/" + basename(inputFastq)) Array[File] chunks = outputPaths
} }
} }
......
...@@ -106,7 +106,9 @@ task appendToStringArray { ...@@ -106,7 +106,9 @@ task appendToStringArray {
} }
task createLink { task createLink {
File inputFile # Making this of type File will create a link to the copy of the file in the execution
# folder, instead of the actual file.
String inputFile
String outputPath String outputPath
command { command {
......
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