question-mark
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.

Cromwell fails to return struct as output!

See original GitHub issue

Cromwell cannot handle any output that is struct base. I enclose a workflow where it is very clear to see that even though both latest development versions (as well as latest releases) of Cromwell and Womtool validated and executed the workflow for some strange reason at runtime Cromwell consider that it is a Map and not a struct and crashes in the very end of execution

 QuantifiedRun quantified_run = {"run": srr, "folder": quant_folder, "quant": quant, "lib": quant_lib}

screenshot_2019-02-15 screenshot crashes_at_runtime.zip

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
antonkulagacommented, Feb 16, 2019

@aednichols I managed to get it working with:

    output {
        QuantifiedRun quantified_run = object {run: srr, folder: quant_folder, quant: quant, lib: quant_lib, metadata: info}
    }

However, I am very confused why it is working as object is supposed to be deprecated in development and because you have

Person a = {"name": "John","age": 30}

as a suggested syntax and you never mention that it does not work anymore. I think it is a documentation issue that you have

0reactions
AsierGonzalezcommented, Nov 4, 2022

@aednichols I managed to get it working with:

    output {
        QuantifiedRun quantified_run = object {run: srr, folder: quant_folder, quant: quant, lib: quant_lib, metadata: info}
    }

However, I am very confused why it is working as object is supposed to be deprecated in development and because you have

Person a = {"name": "John","age": 30}

as a suggested syntax and you never mention that it does not work anymore. I think it is a documentation issue that you have

This also worked for me. I had issues with a workflow that tried to use this struct:

struct SampleAndUnmappedBams {
  String base_file_name
  Array[File] flowcell_unmapped_bams
  String unmapped_bam_suffix
}

This wouldn’t work:

SampleAndUnmappedBams alignment_analysis_struct = {
    "base_file_name": sequencing_metadata.readgroup_name,
    "flowcell_unmapped_bams": [ Preprocessing.output_unmapped_bam ],
    "unmapped_bam_suffix": "unmapped.bam"
  }

But changing it to this did the trick:

SampleAndUnmappedBams alignment_analysis_struct = object {
    base_file_name: sequencing_metadata.readgroup_name,
    flowcell_unmapped_bams: [ Preprocessing.output_unmapped_bam ],
    unmapped_bam_suffix: "unmapped.bam"
  }

@Coppini, you can see that I am using an array of files in the struct and it worked, so at least that is solved now if it was really the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

output directory is missing? /cromwell_root/script: line 103
The return code is 137. I am following up with the Salmon team to figure out what that error code means. I notice...
Read more >
Code Snippets to Answer Common WDL Design Problems
How can I output a file that has been named dynamically as a bash variable ... How to run a wdl on cori...
Read more >
Handling failed blocks within scattered WDL workflow
Optional outputs should work in WDL 1.0. Here is an example that runs without issue through cromwell (version 74).
Read more >
(How to) Execute Workflows from the gatk-workflows Git ...
Download latest release of Cromwell, the java excutable that will run the WDL. ... At this point your directory structure should look like...
Read more >
Running a Bioinformatics Software Pipeline with Wdl/Cromwell
The outputs of the workflow will be written to <workflow_root>/call-<call_name>/execution/ folder! Please explore the directory structure for ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found