Skip to content

Conversation

@bentsherman
Copy link
Member

Render the task graph as an HTML document, originally developed in nextflow-io/nextflow#3802

@samuell I was originally going to add your visualizer script, but then I realized we could just render the DAG directly in the plugin! I already wrote the code in a Nextflow PR but i think it fits better here. The task DAG is a sort of provenance report after all... anyway, want to give it a try and let me know if it can be improved at all?

Here is an example diagram for an rnaseq-nf run:

<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
</head>
<body>
<pre class="mermaid" style="text-align: center;">
flowchart TD
    subgraph " "
    in0["ggal_gut_1.fq"]
    click in0 href "https://github.com/nextflow-io/rnaseq-nf/tree/d910312506c6539365ed70aacda5068dea9152dd/data/ggal/ggal_gut_1.fq" _blank
    in1["ggal_gut_2.fq"]
    click in1 href "https://github.com/nextflow-io/rnaseq-nf/tree/d910312506c6539365ed70aacda5068dea9152dd/data/ggal/ggal_gut_2.fq" _blank
    in2["ggal_1_48850000_49020000.Ggal71.500bpflank.fa"]
    click in2 href "https://github.com/nextflow-io/rnaseq-nf/tree/d910312506c6539365ed70aacda5068dea9152dd/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" _blank
    in3["multiqc"]
    click in3 href "https://github.com/nextflow-io/rnaseq-nf/tree/d910312506c6539365ed70aacda5068dea9152dd/multiqc" _blank
    end
    subgraph RNASEQ
    t0(["FASTQC (FASTQC on ggal_gut)"])
    t1(["INDEX (ggal_1_48850000_49020000)"])
    t2(["QUANT (ggal_gut)"])
    end
    t3(["MULTIQC"])
    in0 --> t0
    in1 --> t0
    in2 --> t1
    t1 -->|index| t2
    in0 --> t2
    in1 --> t2
    t2 -->|ggal_gut| t3
    t0 -->|fastqc_ggal_gut_logs| t3
    in3 --> t3
    t3 --> out0
    subgraph " "
    out0[multiqc_report.html]
    end
</pre>
<script type="module">
  import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
  mermaid.initialize({ startOnLoad: true });
</script>
</body>
</html>

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@samuell
Copy link

samuell commented Sep 30, 2023

@bentsherman Cool, hope to have a look in the beginning of next week!

@bentsherman
Copy link
Member Author

I'm gonna move this forward, but feel free to share any feedback here at your convenience. Not an urgent thing by any means

@bentsherman bentsherman merged commit a0f0dd4 into master Oct 10, 2023
@bentsherman bentsherman deleted the task-dag branch October 10, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants