nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Add config option to control DAG level of detail

Open bentsherman opened this issue 1 year ago • 6 comments

See this Slack thread: https://nextflow.slack.com/archives/C02T98A23U7/p1662981608103629

It would be nice for the dag config scope to have a verbose option to control whether extra details like channel names and operators are displayed.

I should note however that toggling operators is not so trivial. Each operator is a node, so you would need to connect it's inputs to it's outputs. Easy enough to implement, but in cases where an operator has multiple inputs and multiple outputs, you might make things messier than before. So consider hiding the operator name but leaving an empty node to preserve the overall shape of the dataflow.

@mribeirodantas Should be a good issue for you when you have time.

bentsherman avatar Sep 12 '22 13:09 bentsherman

When you say hiding the operator name but leaving an empty node, the DAG structure wouldn't change. Only the label for operator/channels would be hidden, right?

mribeirodantas avatar Sep 12 '22 13:09 mribeirodantas

Right

bentsherman avatar Sep 12 '22 13:09 bentsherman

Probably a separate effort, but I think we should also be able to collapse subworkflows into single nodes. That would make the DAG actually usable for real workflows.

As an example, I generated the Mermaid diagram for rnaseq: rnaseq

It's like looking at the logic diagram of an entire CPU -- hilariously impossible. What you really want is something more coarse-grained by default, that you can optionally make more fine-grained as you need it. A config option called e.g. dag.depth could control how many levels to show, just like the depth of a TOC tree.

nf-core/rnaseq is a bit weird because the top-level workflow calls NFCORE_RNASEQ, which calls RNASEQ, which implements the actual workflow. So for rnaseq you would set dag.depth = 3 to get a level of detail comparable to the diagram here.

Related issues: #1056 #1543

bentsherman avatar Sep 15 '22 22:09 bentsherman

LOL. what pipeline is this?

pditommaso avatar Sep 15 '22 22:09 pditommaso

nf-core rnaseq !

bentsherman avatar Sep 16 '22 14:09 bentsherman

pditommaso avatar Sep 16 '22 14:09 pditommaso

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 18 '23 09:03 stale[bot]