Forum Login Issue:
Currently the "Log in with Google" button redirects you to a "Page not found." This is an issue that our forum vendors are working on fixing. In the meantime, while on the "Page not found" you can edit the URL to delete the second gatk, firecloud, or wdl (depending on what subforum you are acessing).

Use complex bash inside cromwell?

I'm trying to use bash arrays inside a command block, but I think this confuses womtool because the validation failes. Did I make some mistake I'm overlooking or is this a known limitation of wdl?

(As background: I'm trying to make an htmlOverview task that uses iframes to put multiple html files inside a single page to make it easier to view html results)

$ womtool validate shared.wdl 
Unrecognized token on line 80, column 23:

        for ((i=0;i<${#files[@]};++i)); do
task htmlOverview {
    Array[File] htmlFiles
    Array[String] samplenames
    String name

    String image

    command {
        set -e

        files=( ${sep=" " htmlFiles} )
        names=( ${sep=" " samplenames} )
        # Print the iframes
        for ((i=0;i<${#files[@]};++i)); do
            local=`basename "${files[i]}"`
            cp "$i" "$filename"
            echo "<h2>${names[i]}</h2>"
            echo "<iframe id="myFrame" src=\"$filename\" style=width:100%;height:100%></iframe>"
        done > "${name}_overview.html"

    runtime {
        docker: "${image}"

    output {
        File overview = "${name}_overview.html"
        Array[File] subplots = glob("*.html")
Sign In or Register to comment.