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 {
task FastqSplitter {
String? preCommand
File inputFastq
String outputPath
Int numberChunks
String tool_jar
Array[Int] chunks = range(numberChunks)
Array[String] outputPaths
String toolJar
command {
set -e -o pipefail
${preCommand}
mkdir -p ${sep=' ' prefix(outputPath + "/chunk_", chunks)}
if [ ${numberChunks} -gt 1 ]; then
SEP="/${basename(inputFastq)} -o "
java -jar ${tool_jar} -I ${inputFastq} -o ${sep='$SEP' prefix(outputPath + "/chunk_", chunks)}/${basename(inputFastq)}
else
ln -sf ${inputFastq} ${outputPath}/chunk_0/${basename(inputFastq)}
fi
mkdir -p $(dirname ${sep=') $(dirname ' outputPaths})
if [ ${length(outputPaths)} -gt 1 ]; then
java -jar ${toolJar} \
-I ${inputFastq} \
-o ${sep=' -o ' outputPaths}
else
ln -sf ${inputFastq} ${outputPaths[0]}
fi
}
output {
Array[File] outputFastqFiles = glob(outputPath + "/chunk_*/" + basename(inputFastq))
Array[File] chunks = outputPaths
}
}
......
......@@ -106,7 +106,9 @@ task appendToStringArray {
}
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
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