Skip to content

nf-metro

nf-metro generates transit-style SVG diagrams from Mermaid definitions using %%metro directives. Like a real metro map, the layout isn't necessarily geographic, nor a verbatim trace of every step. Use it to convey what a workflow means scientifically, not just what it runs, with every line, colour, and position a deliberate choice. A natural fit for nf-core and other Nextflow pipelines.

1 2 4 3 5 cat fastq STAR SAMtools RSeQC HISAT2 Salmon Kallisto FastQC RSEM Picard Preseq UMI-tools dedup MultiQC infer strandedness BEDTools Qualimap Salmon UMI-tools extract bedGraphToBigWig dupRadar FastP StringTie DESeq2 PCA Trim Galore! FastQC Kraken2/Bracken BBSplit MultiQC SortMeRNA Aligner: STAR, Quantification: RSEM Aligner: STAR, Quantification: Salmon (default) Aligner: HISAT2, Quantification: None Pseudo-aligner: Salmon, Quantification: Salmon Pseudo-aligner: Kallisto, Quantification: Kallisto created with nf-metro v1.1.0+dev

Install

nf-metro is a Python package. Pick your channel - it requires Python 3.10+.

Install the latest release from PyPI.

pip install nf-metro

Quick start

Render, validate, and inspect a .mmd file. The CLI reference documents every flag.

# Render a .mmd definition into a standalone SVG metro map
nf-metro render examples/simple_pipeline.mmd -o pipeline.svg

# Check a file for errors without producing any output
nf-metro validate examples/simple_pipeline.mmd

# Print the parsed structure: sections, lines, stations, edges
nf-metro info examples/simple_pipeline.mmd

# Or emit a self-contained interactive HTML page (pan, zoom, line isolation)
nf-metro render examples/simple_pipeline.mmd --format html -o pipeline.html

Go further