Encapsulate sets of inputs #102

Open
davidbenjamin opened this Issue Apr 9, 2017 · 0 comments

Comments

Projects
None yet
1 participant

For Mutect we use a lot of sub-workflows, and it's tedious to pass a large set of parameters repeatedly. For example:

import "single_sample.wdl" as SingleSample
workflow MultiSample {
  #these are the parameters of the single-sample subworkflow
  File param1
  File param2
  . . .
  Int param20

  #other parameters

  scatter (sample in samples) {
    call SingleSample.single_sample {
      input:
        File param1
        File param2
        . . .
       Int param20
    }
  }
}

In this case, the same list of parameters is copied 5 times: the single-sample task inputs, the single-sample workflow inputs, the single-sample workflow's call to the task, the multi-sample workflow inputs, and the multi-sample workflow's call to the single-sample workflow. It would be really nice to be able to encapsulate all these parameters, eg

params MyParams {
  File param1
  File param2
  . . .
  Int param20
}

task MyTask {
  MyParams params

  command {
    java -jar ${params.gatk} -R ${params.reference} -L ${params.intervals} . . .
  }
}

workflow MyWorkflow {
  MyParams params

  call MyTask { input params = params }
}

kshakir referenced this issue in broadinstitute/cromwell Jul 25, 2017

Open

Secondary index files and directories in WDL #2269

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