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

fix glob issue

parent 89ae5c27
No related branches found
No related tags found
1 merge request!17Caching related changes
...@@ -70,26 +70,25 @@ task BaseCounter { ...@@ -70,26 +70,25 @@ 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)} for
if [ ${numberChunks} -gt 1 ]; then mkdir -p $(dirname ${sep=') $(dirname ' outputPaths})
SEP="/${basename(inputFastq)} -o " if [ ${length(outputPaths)} -gt 1 ]; then
java -jar ${tool_jar} -I ${inputFastq} -o ${sep='$SEP' prefix(outputPath + "/chunk_", chunks)}/${basename(inputFastq)} java -jar ${toolJar} \
else -I ${inputFastq} \
ln -sf ${inputFastq} ${outputPath}/chunk_0/${basename(inputFastq)} -o ${sep=' -o ' outputPaths}
fi else
ln -sf ${inputFastq} ${outputPaths[0]}
fi
} }
output { output {
Array[File] chunkDirs = prefix(outputPath + "/chunk_", chunks) Array[File] chunks = outputPaths
String filename = basename(inputFastq)
} }
} }
......
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