Map output array to samples in set?

Post author
Mark Walker

We have a workflow in WDL that consumes an array of files corresponding to a set of samples, performs a joint calling task, and returns another array of files, each of which correspond to the input file, like this:

```

workflow Workflow {

  input {

    Array[File] gvcfs

  }

  call JointTask {

    input:

      gvcfs=gvcfs

  }

  output {

    Array[File] result_files = JointTask.output_array

  }

}

```

So that `results_files[i]` corresponds to `gvcfs[i]` for the i-th sample. My question is about how to make this work with the data model. In Terra, if `gvcfs` is provided using a sample set, e.g. `this.samples.gvcf`, can the `result_files` be assigned back to the individual sample entities? That is, can I just specify the output as `this.samples.result_file`?

Comments

2 comments

  • Comment author
    Jason Cerrato

    Hi Mark,

    Thank you for your inquiry. We'll take a look and get back to you as soon as we are able.

    Kind regards,

    Jason

    0
  • Comment author
    Jason Cerrato

    Hi Mark,

    After a discussion with my colleagues, it appears to be the case that this isn't natively supported in Terra at this time. A wonky workaround a colleague of mine came up with that might work is having a task in the workflow that creates a csv file based on the sample names and output file. You would then use this output file to manually upload it to the data table.

    Kind regards,

    Jason

    1

Please sign in to leave a comment.