Possible bug in write_lines()

ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭

I showed this to some folks from the Cromwell team and they said it looked suspicious enough that I should post it here.

On a recent workflow (7ccafab8-72c5-4f1c-8a09-0cbcb4855c47) that Sam N ran, the GatherMetrics task failed with a weird error:

{u'failures': [{u'message': u"Couldn't resolve all inputs for JointGenotyping.GatherMetrics at index None.", u'causedBy': [{u'message': u'Input evaluation for Call JointGenotyping.GatherMetrics failed.', u'causedBy': [{u'message': u'input_details_fofn', u'causedBy': [{u'message': u'Cannot TSV serialize a Array[File?] (valid types are Array[Primitive], Array[Array[Primitive]], or Array[Object])', u'causedBy': []}]}, {u'message': u'input_summaries_fofn', u'causedBy': [{u'message': u'Cannot TSV serialize a Array[File?] (valid types are Array[Primitive], Array[Array[Primitive]], or Array[Object])', u'causedBy': []}]}]}]}], u'attempt': 1, u'shardIndex': -1, u'executionStatus': u'Failed'}

The WDL has the following call:

call GatherMetrics {
input:
input_details_fofn = write_lines(CollectMetricsSharded.detail_metrics_file),
input_summaries_fofn = write_lines(CollectMetricsSharded.summary_metrics_file),
output_prefix = callset_name,
disk_size = medium_disk
}

So it's looking like Cromwell doesn't like invoking write_lines with an Array[File] as input (as opposed to Array[String]. I think that's a bug (assuming this is the correct diagnosis).

Please let me know if you need any more info.
Thanks!

Best Answer

Answers

  • ThibThib CambridgeMember, Broadie, Dev

    Do you know which version of Cromwell this was run with ?

  • ThibThib CambridgeMember, Broadie, Dev

    I ran this WDL successfully on Cromwell 29_hotfix which makes me think this might have been fixed already

    task cat_file {
        File f
        command {
            cat ${f}
        }
        runtime {
            docker: "ubuntu:latest"
        }
        output {
            String o = read_string(stdout())
        }
    }
    
    task make_file {
        command {
            echo "hello"
        }
        runtime {
            docker: "ubuntu:latest"
        }
        output {
            File o = stdout()
        }
    }
    
    workflow w {
        scatter (i in range(2)) {
            call make_file
        }
    
        call cat_file { input: f = write_lines(make_file.o) } 
    }
    
Sign In or Register to comment.