Implementing Subworkflows

Post author
Alisa Manning

I'm looking for documentation on implementing subworkflows in Terra. What is the correct syntax for the WDL -- the specification (https://software.broadinstitute.org/wdl/documentation/spec#sub-workflows) states that an 'import' is needed... how is this implemented in Terra?

 

Thanks!

Comments

4 comments

  • Comment author
    Sushma Chaluvadi

    Hi Alisa,

    Here is an example of a Featured Workspace (HCA Optimus) that implements sub-workflows in the WDL! https://app.terra.bio/#workspaces/featured-workspaces-hca/HCA_Optimus_Pipeline/workflows/help-gatk/Optimus

    You can see that at the top of the WDL, they use an import statement to call to other workflows from within the larger one. In this example the the authors used http imports, and pushed it to Terra through Dockstore.

    I hope this helps clarify things a bit more.

    Sushma

     

    0
  • Comment author
    Alisa Manning
    • Edited

    This begins to clarify things. I think I understand from this example how the inputs to subworkflows work.

    I write my own WDLs, and I am tried to implement a "double scatter" which resulted in a Terra error message: "Nested Scatters are not supported (yet) ... but you might try a sub workflow to achieve the same effect!"

    Do I need to put the imported workflow into an http accessible location? Where should I put this within the 'Broad Method Repository' ? Or more specifically, how do I reference a 'Broad Repository' workflow by URL ?

    0
  • Comment author
    Sushma Chaluvadi

    Alisa,

    From the Broad Repository, you can click into your Workflow and if you scroll all the way to the bottom of the WDL tab you should see a URL:

    The Import URL that you see is what you would add. A note about this - the Workflow needs to be publicly accessible for the URL to show up.

    Sushma

    0
  • Comment author
    Alisa Manning

    Thank you!

    0

Please sign in to leave a comment.