Skip to content

Add pipeline metro map - #83

Merged
RaqManzano merged 11 commits into
devfrom
add-metro-map
Jul 23, 2026
Merged

Add pipeline metro map#83
RaqManzano merged 11 commits into
devfrom
add-metro-map

Conversation

@adamrtalbot

@adamrtalbot adamrtalbot commented Jun 30, 2026

Copy link
Copy Markdown

Summary

Adds an nf-metro diagram visualizing the full rnadnavar pipeline flow, replaces the old PNG in the README, and adds CI automation to keep the SVG in sync.

Details

The original image didn't look very good on dark mode:

CleanShot 2026-06-30 at 11 55 47

So I decided to try @pinin4fjords's nf-metro and refine it a bit. This should also be straightforward to maintain from a mermaid diagram (code) instead of an image.

  • Source: assets/metro_map.mmd (nf-metro Mermaid-extended format)
  • Rendered: assets/metro_map.svg (nf-core dark theme, embedded fonts)

Changes

  • assets/metro_map.mmd — new nf-metro source file
  • assets/metro_map.svg — rendered SVG (nf-core dark theme, embedded fonts)
  • README.md — replaced docs/images/rnadnavar_schemav3.png reference with assets/metro_map.svg
  • Removed docs/images/rnadnavar_schemav3.png (superseded)
  • .github/workflows/metro-map.yml — CI workflow to auto-render the SVG on changes

CI Automation (.github/workflows/metro-map.yml)

  • On push to dev/master: re-renders the SVG from assets/metro_map.mmd and auto-commits if it changed (with [skip ci])
  • On PR: emits a warning annotation if the SVG is stale, so reviewers know it will be re-rendered on merge
  • Uses astral-sh/setup-uv + uv tool install nf-metro for fast, reproducible installs

Pipeline coverage

Line Color Description
DNA Blue (#4a90d9) Tumor + Normal DNA path
RNA Red (#e63946) RNA Tumor path
Realignment Gold (#f5c542) HISAT2 realignment loop

6 sections across 2 rows, 45 stations, 75 edges:

  1. Pre-processing & Alignment (FastQC, fastp, BWA-mem, STAR, SAMtools Merge)
  2. GATK Preprocessing (MarkDuplicates, SplitNCigarReads, BQSR, SAMtools Stats, Mosdepth)
  3. Variant Calling (Mutect2, Strelka2, SAGE)
  4. Normalization & Annotation (VT Decompose/Normalize, Ensembl VEP)
  5. Consensus & Filtering (vcf2MAF, Consensus, MAF Filtering)
  6. Realignment & RNA Filtering (MAF2BED → HISAT2 → full re-processing loop → RNA MAF Filtering → MultiQC)

Rendering

nf-metro render assets/metro_map.mmd -o assets/metro_map.svg --theme nfcore --embed-font --fold-threshold 20

Add nf-metro diagram showing the full rnadnavar pipeline flow:
- 3 lines: DNA (blue), RNA (red), Realignment (gold)
- 6 sections: Pre-processing, GATK Preprocessing, Variant Calling,
  Normalization & Annotation, Consensus & Filtering, Realignment & RNA Filtering
- 45 stations covering all pipeline tools from FastQC through MultiQC
- SVG rendered with nf-core theme and embedded fonts
Triggers on changes to assets/metro_map.mmd:
- On push to dev/master: re-renders SVG and auto-commits if changed
- On PR: warns if the SVG is stale (will be updated on merge)
- Remove docs/images/rnadnavar_schemav3.png
- Update README.md to reference assets/metro_map.svg
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit e3cec35

+| ✅ 238 tests passed       |+
#| ❔  10 tests were ignored |#
#| ❔   1 tests had warnings |#
!| ❗   6 tests had warnings |!
Details

❗ Test warnings:

  • pipeline_todos - TODO string in awsfulltest.yml: You can customise AWS full pipeline tests as required
  • pipeline_todos - TODO string in nextflow.config: Specify any additional parameters here
  • pipeline_todos - TODO string in CONTRIBUTING.md: Add any pipeline specific contribution guidelines here, such as coding styles, procedures, checklists etc.
  • pipeline_todos - TODO string in base.config: Check the defaults for all processes
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • schema_lint - Input mimetype is missing or empty

❔ Tests ignored:

❔ Tests fixed:

✅ Tests passed:

Run details

  • nf-core/tools version 4.0.2
  • Run at 2026-07-23 14:02:10

fold-threshold 18 was too tight for the 'realign' section's bundle
routing. 20 gives the router enough room while keeping the map compact.
@adamrtalbot

adamrtalbot commented Jun 30, 2026

Copy link
Copy Markdown
Author

screenshot of the new readme:

CleanShot 2026-06-30 at 13 32 04

Comment thread .github/workflows/metro-map.yml
Mutect2, Strelka2, and SAGE run in parallel (not serially) in the
pipeline. Updated the metro map to fan out from a fork node and
converge at a join node before normalization.
Rendered at 2011px wide (down from 3104px) to fit a single screen.
@maxulysse

Copy link
Copy Markdown
Member

I love it <3

@adamrtalbot
adamrtalbot marked this pull request as draft June 30, 2026 11:33
@adamrtalbot

adamrtalbot commented Jun 30, 2026

Copy link
Copy Markdown
Author

The idea is solid but the mermaid is a bit mangled - converting to draft while I fix.

[update] Done

Split the oversized Consensus/Realignment section into Consensus &
Filtering, Realignment, and Reporting so nf-metro auto-folds the chain
into a horseshoe (top row L->R, bottom row R->L) that fits a vertical
README. Show Mutect2/Strelka2/SAGE as parallel branches. Render at
--fold-threshold 15.

Generated by Claude Code
@adamrtalbot
adamrtalbot requested a review from RaqManzano June 30, 2026 12:32
@adamrtalbot
adamrtalbot marked this pull request as ready for review June 30, 2026 12:32
@RaqManzano

Copy link
Copy Markdown
Collaborator

@adamrtalbot this is AMAZING!!! thank you, looking beautiful. I am doing some edits, will get back to you.

This was referenced Jun 30, 2026
@pinin4fjords

Copy link
Copy Markdown
Member

Had a go at some improvements and bug fixes - opened #87 against this branch. Folds the map into a compact layout, fixes the logo path, makes it light/dark adaptive. Note it relies on a few nf-metro fixes that'll be in the next release; the committed SVG is pre-rendered so the README's fine now, and CI re-render will match once nf-metro updates.

Comment thread .github/workflows/metro-map.yml Outdated
@RaqManzano

Copy link
Copy Markdown
Collaborator

This is WOW!! I didn't have time to work on this until now. Thank you both looks great. I just changed a couple of things to dashed so it is clear what is optional and what is the main pipeline.

@RaqManzano RaqManzano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I guess we are just waiting for a new release of nf-metro and the tests should work?

Update logo path from non-existent examples/ to docs/images/.
nf-metro 1.1.0 errors on missing logo where 1.0.0 ignored it.

Generated by Claude Code
@adamrtalbot

Copy link
Copy Markdown
Author

LGTM

I guess we are just waiting for a new release of nf-metro and the tests should work?

My fault, should be fixed now. Check the metro map and make sure you like it.

@RaqManzano
RaqManzano merged commit 3279bf4 into dev Jul 23, 2026
9 checks passed
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.

4 participants