CWL Classic Dag is having issues when referencing a packed CWL File

Hello,

Seeing the packed workflow diagram as follows:

The image should instead look like diagram in the link below (note there are way too many inputs for this diagram to look any good anyway)

raw.githubusercontent.com/umccr/cwl-ica/dragen-somatic-with-germline-pipeline/4.2.4__20231026101213/.github/releases/dragen-somatic-with-germline-pipeline__4.2.4__20231026101213/workflow.svg

The CWL Viewer option also breaks

The error being:

The Common Workflow Language Viewer was unable to process the CWL. It returned the following error:
Http failure response for https://view.commonwl.org/workflows?url=https%3A%2F%2Fgithub.com%2Fumccr%2Fcwl-ica%2Fblob%2Fdockstore%2Fdragen-somatic-with-germline-pipeline%2F4.2.4__20231026101213%2F.dockstore%2Fdragen-somatic-with-germline-pipeline%2F4.2.4%2Fdragen-somatic-with-germline-pipeline__4.2.4.packed.cwl.json: 400 OK

Hi,

Regarding the CWL Viewer issues, as you can probably tell by the error message, we’re calling out to an external service to generate the diagram. I skimmed their issues and found two that might be applicable, one regarding packed CWL, and one regarding .json file extensions:

You might want to vote or add comments to those issues. Be forewarned, they’ll probably ask you to contribute a PR to fix it :).

We’ll follow up separately on the classic DAG issue – that one is our code.

How did you generate your diagram? It looks neat, but yeah, that’s a lot of inputs!

Charles

Yes sorry, I also put in a comment here regarding the external viewer - support output from cwltool's `--pack` · Issue #103 · common-workflow-language/cwlviewer · GitHub

How did you generate your diagram? It looks neat, but yeah, that’s a lot of inputs!

From here - cwl-ica-cli/classes/cwl_workflow.py at 5d63863bd095079ce58c64cdcc3d6d0fbdb267e0 · umccr/cwl-ica-cli · GitHub

Essentially running

cwltool --debug --print-dot /path/to/packed-cwl | dot -Gratio {ratio_value} -Tsvg -oOutPut.svg /dev/stdin

where ratio_value is equal to round(min(1 / math.log(inputs_len), 1.0), 3) if inputs_len > 1 else 1 (no commentary on this, I did the maths on it a really long time ago).

Previously there was a lot of internal magic inside the svg where nodes would contain links to the relevant tool / subworkflow in the catalogue and the hover would trigger the documentation attribute to pop up. Doesn’t seem to be working at the moment. But the colouring of subworkflows in orange seems to still be working

Hello,

Following up on the classic DAG issue, I have created a GitHub issue to improve our diagrams.

Thank you!
Nayeon