Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue running Biowdl Germline-DNA v4.1.0: unusable runtime struct initializer

See original GitHub issue

Full error:

workflow Germline (germline.wdl Ln 34 Col 1) failed :: dir: "/exports/sasc/rhpvorderman/testminiwdl/germline-dna/20220802_153134_Germline", error: "EvalError", message: "unusable runtime struct initializer (member type mismatch, lacking required member, or extra member)", node: "call-sampleWorkflow-0", pos: {"source": "/exports/sasc/rhpvorderman/testminiwdl/germline-dna/germline.wdl", "line": 119, "column": 26}

The WDL file and its imports can be downloaded here: (germline_v4.1.0.wdl and its accompanying imports zip).

It works fine in Cromwell. There are some optional members in the structs that we use. Apparently miniwdl cannot handle that properly. Unfortunately I cannot get a more descriptive error message regarding which member.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

rhpvordermancommented, Aug 5, 2022

Hi, sorry to reopen this. I have a similar error now with the gender member of the struct. That is not defined in the JSON. As a result MiniWDL crashes on gender = select_first([sample.gender, "unknown"]), in the wdl file. So miniwdl does not complain about undefined Struct members in the JSON if they are optional, but also does not add them to the struct and set them to None. The latter option is preferred to complaining in my opinion.

EDIT: I did some further debugging. It seems it goes wrong in the value.from_json function. Where the struct for the SampleConfig is correctly loaded yet the nested struct types are inferred from json (_infer_from_json) rather than serialized to their native struct types.

EDIT2: Have been able to fix it in the wdl with the following code:

    scatter (sample_obj in sampleConfig.samples) {
        Sample sample = sample_obj

Where previously scatter (sample in sampleConfig.samples) was used. So I made the coercion explicit. However, since the struct fields have explicit Sample types, the coercion should also happen in the simpler scatter example. I am also happy to report the workaround does not break cromwell, so at least I have a good workaround now for this issue.

rhpvordermancommented, Aug 8, 2022

Yes #581 Solved this particular issue on the germline-dna pipeline. Great, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · openwdl/wdl - GitHub
runtime struct initialization from select_first(). #491 opened on Jan 24 by Melkaz ... Proposal: add required runtime-like section for execution engine.
Read more >
Home | BioWDL: germline-DNA
A BioWDL variantcalling pipeline for germline DNA data. Starting with FASTQ files to produce VCF files. Category:Multi-Sample.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found