Feature request: Nested scatter loops #71

Open
awacs opened this Issue Nov 10, 2016 · 2 comments

Comments

Projects
None yet
2 participants

awacs commented Nov 10, 2016

Please add the ability to do nested scatter loops. The current single sample workflow runs HaplotypeCaller in parallel by scattering over interval. I would like to add a scattering by sample step so it can handle multiple samples.

Collaborator

vdauwera commented Nov 10, 2016

We have a ticket to implement "workflows of workflows", which will effectively provide the functionality you need.

awacs commented Dec 13, 2016

I've tried to implement this with sub_workflows but I'm still having trouble.
Example:
inputTSV.txt

a\tb
c\td

doublesplit.wdl

import "null.wdl" as other
workflow doublesplit{
File inputSamplesFile
Array[Array[String]] inputFiles = read_tsv(inputSamplesFile)
scatter (inputstring in inputFiles){
call other.nullscatter{input: inputLine=inputstring}

}
}

null.wdl

workflow nullscatter{
Array[String] FileList=inputLine
# String inputLine
# Array[Array[String]] FileList=read_tsv(inputLine)
scatter (FileName in FileList){
call nulltask {input: Name=FileName}
}

}
task nulltask{
String Name
command {echo ${Name}}
output {String N="${Name}"}
}

The stdout is attached here

test.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment