How do I run gnu parallel in wdl?

I need to run this in wdl:

command {
    seq 0 4 | \
    parallel --eta --halt 2 \
    python /home/bin/make_examples.zip \
    --mode calling \
    --ref ${ReferenceFasta} \
    --reads ${InputBam} \
    --examples ${Examples}[email protected] \
    --regions "1:1-90,010,000" \
    --task {}
}
output {
    File ExamplesOutput1 = "${Examples}.tfrecord1.gz"
    File ExamplesOutput2 = "${Examples}.tfrecord2.gz"
    File ExamplesOutput3 = "${Examples}.tfrecord3.gz"
    File ExamplesOutput4 = "${Examples}.tfrecord4.gz"
}

Without parallelization it would be run like this, skipping the wdl part:
python bin/make_examples.zip --mode calling --ref reference.fasta --reads input.bam --examples output.tfrecord.gz"

And the problem, from what I can understand is the {} in "--task {}", the error message is
ERROR: Finished parsing without consuming all tokens.
output {
^

Is is possible to reconcile this conflict between parallel and wdl?

Best Answers

Answers

Sign In or Register to comment.