Need Help?

Search our documentation and community forum

Terra is a cloud-native platform for biomedical researchers to access data, run analysis tools, and collaborate.
Terra powers important scientific projects like FireCloud, AnVIL, and BioData Catalyst. Learn more.

Calling tools in wdl

Comments

9 comments

  • Avatar
    Jason Cerrato

    Hi Alex,

    Happy to see if I can help here! If your tool is installed in the docker provided for the runtime, you should be able to run the command directly in the WDL.

    Do you have access to a docker with this binary installed? Here is an example I found in the FireCloud method repository that uses fastqc you can take a look at for reference: https://portal.firecloud.org/#methods/sanand/FastQC/1/wdl

    Kind regards,

    Jason

    0
    Comment actions Permalink
  • Avatar
    Alex O

    Can the container be hosted anywhere, like quay? Or are there specific locations I have to pull from?

    0
    Comment actions Permalink
  • Avatar
    Jason Cerrato

    HI Alex,

    We've seen dockers hosted in DockerHub, Quay, and GCR. Any of these three should work. If you are thinking of using something else, I can check to see if it would work.

    Kind regards,

    Jason

    0
    Comment actions Permalink
  • Avatar
    Alex O

    Excellent, thank you Jason. One more question, though. Is it possible to call a wdl file inside of another wdl file? For example, generating a workflow made from several tools, but using an existing workflow as one of the steps in the new one.

    0
    Comment actions Permalink
  • Avatar
    Jason Cerrato

    Hi Alex,

    Definitely! Here is the documentation for how to import other WDLs to use their tasks: https://github.com/openwdl/wdl/blob/master/versions/1.0/SPEC.md#import-statements

    And here are some examples, pulled from the the Terra Featured Workspaces:

    ExomeGermlineSingleSample.wdl (workspace)

    Optimus.wdl (workspace)

    mutect2.wdl (workspace)

    If you have any questions, please let me know.

    Kind regards,

    Jason

    0
    Comment actions Permalink
  • Avatar
    Alex O

    Hey Jason,

    Thanks again, I was able to get one of the workflows I wanted to import. The other one returns

    ```

    Failed to import 'https://api.firecloud.org/ga4gh/v1/tools/kbi:salmon_quant_singlebam/versions/1/plain-WDL/descriptor' (reason 1 of 1): Unrecognized token on line 1, column 1:

    workflow salmon_quant_singlebam {
    ^

    ```

    I can build the rest of the wdl inputs file without a problem, but this keeps being an issue. The only real differences I can see in that file are that there's no version string, and no true "inputs" section labeled in the workflow section of the salmon file. Any idea what I'm doing wrong?

     

    Thank you!

    0
    Comment actions Permalink
  • Avatar
    Jason Cerrato

    Hi Alex,

    Can you point me to where the master workflow that imports the others lives so I can take a closer look at it? If it's just a file, can you email it to jcerrato@broadinstitute.org?

    If it exists in the FireCloud methods repository and is not public, please add jcerrato@broadinstitute.org in addition to providing the link.

    Many thanks,

    Jason

    0
    Comment actions Permalink
  • Avatar
    Alex O

    I am having the same issue with another workflow (https://api.firecloud.org/ga4gh/v1/tools/margolis:run_kallisto/versions/5/plain-WDL/descriptor). The main difference that I see is the wdl file version -- I think they both use an older version of the format, where, for example, input sections are formatted as
    ```

    workflow helloworld {

        Int asdf

        call tool {

            inputs:

                asdf=asdf

    }

    ```
    rather than

    ```

    version 1.0

    workflow helloworld{

        inputs{

            Int asdf

        }

        call tool {

            input {

                asdf = asdf

            }

        }

    }

    ```

    0
    Comment actions Permalink
  • Avatar
    Jason Cerrato

    Hi Alex,

    After speaking with one of my colleagues who specializes in WDL, I believe your observations reveal the reason this is showing an error. Because the parent WDL is using version 1.0, the subworkflows are being treated as if they are as well, and thus you are seeing an error with the WDLs that are not using version 1.0 (implicitly, they are using an older version of WDL).

    To use them you will either have to:

    • Edit the WDLs for the subworkflows so that they use version 1.0 syntax
    • Edit the parent WDL to use older syntax.

    In essence, you will need to ensure that the parent workflow and subworkflows are all using the same version of the language.

    I hope this helps!

    Kind regards,

    Jason

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk