Gallery
Examples covering the full range of layout patterns.
Getting Started
Simple Pipeline
Minimal two-line pipeline with no sections.
Mermaid source
%%metro title: Simple Pipeline%%metro style: dark%%metro line: main | Main | #4CAF50%%metro line: qc | Quality Control | #2196F3 | dashed
graph LR input[Input] fastqc[FastQC] trim[Trimming] align[Alignment] quant[Quantification] multiqc[MultiQC]
input -->|main| trim trim -->|main| align align -->|main| quant input -->|qc| fastqc trim -->|qc| fastqc quant -->|qc| multiqc fastqc -->|qc| multiqcCLI command
nf-metro render examples/simple_pipeline.mmd -o simple_pipeline.svgRendered map
Rnaseq Auto
Demonstrates fully auto-inferred layout: no `%%metro grid:` directives needed. See [nf-core Pipelines](/nf-metro/pipelines/) for the full gallery.
Mermaid source
%%metro title: nf-core/rnaseq%%metro logo: examples/nf-core-rnaseq_logo_light.png | examples/nf-core-rnaseq_logo_dark.png%%metro style: dark%%metro line: star_rsem | Aligner: STAR, Quantification: RSEM | #0570b0%%metro line: star_salmon | Aligner: STAR, Quantification: Salmon (default) | #2db572%%metro line: hisat2 | Aligner: HISAT2, Quantification: None | #f5c542%%metro line: pseudo_salmon | Pseudo-aligner: Salmon, Quantification: Salmon | #e63946%%metro line: pseudo_kallisto | Pseudo-aligner: Kallisto, Quantification: Kallisto | #7b2d3b%%metro legend: bl%%metro logo_scale: 0.6
graph LR subgraph preprocessing [Pre-processing] cat_fastq[cat fastq] fastqc_raw[FastQC] infer_strandedness[infer strandedness] umi_tools_extract[UMI-tools extract] fastp[FastP] trimgalore[Trim Galore!] fastqc_trimmed[FastQC] bbsplit[BBSplit] sortmerna[SortMeRNA]
cat_fastq -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| fastqc_raw fastqc_raw -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| infer_strandedness infer_strandedness -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| umi_tools_extract
umi_tools_extract -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| fastp umi_tools_extract -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| trimgalore fastp -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| fastqc_trimmed trimgalore -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| fastqc_trimmed
fastqc_trimmed -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| bbsplit bbsplit -->|star_salmon,star_rsem,hisat2,pseudo_salmon,pseudo_kallisto| sortmerna end
subgraph genome_align [Genome alignment & quantification] star[STAR] hisat2_align[HISAT2] rsem[RSEM] salmon_quant[Salmon] umi_tools_dedup[UMI-tools dedup]
star -->|star_rsem| rsem star -->|star_salmon| umi_tools_dedup umi_tools_dedup -->|star_salmon| salmon_quant hisat2_align -->|hisat2| umi_tools_dedup end
subgraph postprocessing [Post-processing] samtools[SAMtools] picard[Picard] bedtools[BEDTools] bedgraph[bedGraphToBigWig] stringtie[StringTie]
samtools -->|star_salmon,star_rsem,hisat2| picard picard -->|star_salmon,star_rsem,hisat2| bedtools bedtools -->|star_salmon,star_rsem,hisat2| bedgraph bedgraph -->|star_salmon,star_rsem,hisat2| stringtie end
subgraph pseudo_align [Pseudo-alignment & quantification] salmon_pseudo[Salmon] kallisto[Kallisto] multiqc_pseudo[MultiQC]
salmon_pseudo -->|pseudo_salmon| multiqc_pseudo kallisto -->|pseudo_kallisto| multiqc_pseudo end
subgraph qc_report [Quality control & reporting] rseqc[RSeQC] preseq[Preseq] qualimap[Qualimap] dupradar[dupRadar] deseq2_pca[DESeq2 PCA] kraken2[Kraken2/Bracken] multiqc_final[MultiQC]
rseqc -->|star_salmon,star_rsem,hisat2| preseq preseq -->|star_salmon,star_rsem,hisat2| qualimap qualimap -->|star_salmon,star_rsem,hisat2| dupradar dupradar -->|star_salmon,star_rsem,hisat2| deseq2_pca deseq2_pca -->|star_salmon,star_rsem,hisat2| kraken2 kraken2 -->|star_salmon,star_rsem,hisat2| multiqc_final end
%% Inter-section edges sortmerna -->|star_salmon,star_rsem| star sortmerna -->|hisat2| hisat2_align sortmerna -->|pseudo_salmon| salmon_pseudo sortmerna -->|pseudo_kallisto| kallisto salmon_quant -->|star_salmon| samtools rsem -->|star_rsem| samtools umi_tools_dedup -->|hisat2| samtools stringtie -->|star_salmon,star_rsem,hisat2| rseqcCLI command
nf-metro render examples/rnaseq_auto.mmd -o rnaseq_auto.svgRendered map
Rnaseq Sections
Same pipeline with manual `%%metro grid:` overrides and file markers, showing how explicit directives can fine-tune placement.
Mermaid source
%%metro title: nf-core/rnaseq%%metro logo: examples/nf-core-rnaseq_logo_light.png | examples/nf-core-rnaseq_logo_dark.png%%metro style: dark%%metro file: fastq_in | FASTQ%%metro file: report_final | HTML%%metro file: report_quant | HTML%%metro file: report_bowtie2 | HTML%%metro line: star_rsem | Aligner: STAR, Quantification: RSEM | #0570b0%%metro line: star_salmon | Aligner: STAR, Quantification: Salmon (default) | #2db572%%metro line: hisat2 | Aligner: HISAT2, Quantification: None | #f5c542%%metro line: bowtie2_salmon | Aligner: Bowtie2, Quantification: Salmon | #ff8c00%%metro line: pseudo_salmon | Pseudo-aligner: Salmon, Quantification: Salmon | #e63946%%metro line: pseudo_kallisto | Pseudo-aligner: Kallisto, Quantification: Kallisto | #7b2d3b%%metro legend: bl
graph LR subgraph preprocessing [Pre-processing] %%metro exit: right | star_salmon, star_rsem, hisat2, bowtie2_salmon %%metro exit: bottom | pseudo_salmon, pseudo_kallisto fastq_in[ ] cat_fastq[Cat FASTQ] fastqc_raw[FastQC] infer_strandedness[Infer Strandedness] umi_tools_extract[UMI-tools Extract] fastp[fastp] trimgalore[Trim Galore!] fastqc_trimmed[FastQC] bbsplit[BBSplit] sortmerna[SortMeRNA] ribodetector[RiboDetector] fastqc_filtered[FastQC]
fastq_in -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| cat_fastq cat_fastq -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_raw fastqc_raw -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| infer_strandedness infer_strandedness -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| umi_tools_extract
umi_tools_extract -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastp umi_tools_extract -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| trimgalore fastp -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_trimmed trimgalore -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_trimmed
fastqc_trimmed -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| bbsplit fastqc_trimmed -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| sortmerna fastqc_trimmed -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| ribodetector bbsplit -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_filtered sortmerna -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_filtered ribodetector -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_filtered end
subgraph genome_align [Genome alignment & quantification] %%metro entry: left | star_salmon, star_rsem, hisat2, bowtie2_salmon %%metro exit: right | star_salmon, star_rsem %%metro exit: right | hisat2 star[STAR] hisat2_align[HISAT2] bowtie2_align[Bowtie2] rsem[RSEM] salmon_quant[Salmon] umi_tools_dedup[UMI-tools Dedup] tximport_ga[tximport] summarized_exp_ga[Sum. Exp.] multiqc_bowtie2[MultiQC] report_bowtie2[ ] _h1[hidden] _h2[hidden] _h3[hidden]
star -->|star_rsem| rsem star -->|star_salmon| umi_tools_dedup hisat2_align -->|hisat2| umi_tools_dedup bowtie2_align -->|bowtie2_salmon| umi_tools_dedup umi_tools_dedup -->|star_salmon| salmon_quant umi_tools_dedup -->|hisat2| _h1 _h1 -->|hisat2| _h2 _h2 -->|hisat2| _h3 salmon_quant -->|star_salmon| tximport_ga rsem -->|star_rsem| tximport_ga tximport_ga -->|star_salmon,star_rsem| summarized_exp_ga umi_tools_dedup -->|bowtie2_salmon| salmon_quant salmon_quant -->|bowtie2_salmon| multiqc_bowtie2 multiqc_bowtie2 -->|bowtie2_salmon| report_bowtie2 end
subgraph pseudo_align [Pseudo-alignment & quantification] %%metro entry: left | pseudo_salmon, pseudo_kallisto salmon_pseudo[Salmon] kallisto[Kallisto] tximport_pa[tximport] summarized_exp_pa[Sum. Exp.] multiqc_quant[MultiQC] report_quant[ ]
salmon_pseudo -->|pseudo_salmon| tximport_pa kallisto -->|pseudo_kallisto| tximport_pa tximport_pa -->|pseudo_salmon,pseudo_kallisto| summarized_exp_pa summarized_exp_pa -->|pseudo_salmon,pseudo_kallisto| multiqc_quant multiqc_quant -->|pseudo_salmon,pseudo_kallisto| report_quant end
subgraph postprocessing [Post-processing] %%metro direction: TB %%metro entry: left | star_salmon, star_rsem, hisat2 %%metro exit: bottom | star_salmon, star_rsem, hisat2 samtools[SAMtools] picard[Picard] bedtools[BEDTools] bedgraph[bedGraphToBigWig] stringtie[StringTie]
samtools -->|star_salmon,star_rsem,hisat2| picard picard -->|star_salmon,star_rsem,hisat2| bedtools bedtools -->|star_salmon,star_rsem,hisat2| bedgraph bedgraph -->|star_salmon,star_rsem,hisat2| stringtie end
subgraph qc_report [Quality control & reporting] %%metro direction: RL %%metro entry: top | star_salmon, star_rsem, hisat2 rseqc[RSeQC] preseq[Preseq] qualimap[Qualimap] dupradar[dupRadar] featurecounts[featureCounts] deseq2_pca[DESeq2 PCA] kraken2[Kraken2/Bracken] sylph[Sylph] multiqc_final[MultiQC] report_final[ ]
rseqc -->|star_salmon,star_rsem,hisat2| preseq preseq -->|star_salmon,star_rsem,hisat2| qualimap qualimap -->|star_salmon,star_rsem,hisat2| dupradar dupradar -->|star_salmon,star_rsem,hisat2| featurecounts featurecounts -->|star_salmon,star_rsem,hisat2| deseq2_pca deseq2_pca -->|star_salmon,star_rsem,hisat2| kraken2 deseq2_pca -->|star_salmon,star_rsem,hisat2| sylph kraken2 -->|star_salmon,star_rsem,hisat2| multiqc_final sylph -->|star_salmon,star_rsem,hisat2| multiqc_final multiqc_final -->|star_salmon,star_rsem,hisat2| report_final end
%% Inter-section edges fastqc_filtered -->|star_salmon,star_rsem| star fastqc_filtered -->|hisat2| hisat2_align fastqc_filtered -->|bowtie2_salmon| bowtie2_align fastqc_filtered -->|pseudo_salmon| salmon_pseudo fastqc_filtered -->|pseudo_kallisto| kallisto summarized_exp_ga -->|star_salmon,star_rsem| samtools _h3 -->|hisat2| samtools stringtie -->|star_salmon,star_rsem,hisat2| rseqcCLI command
nf-metro render examples/rnaseq_sections.mmd -o rnaseq_sections.svgRendered map
Feature Showcase
Directional Flow
Opt-in static flow chevrons via `%%metro directional: true` (CLI: `--directional`): periodic open chevrons ride each route pointing source to target. A three-line bundled trunk fans out to per-line analyses and converges again, so the chevrons make bundle, fan-out, and merge direction legible without the animated `--animate` balls. Marker size, spacing, opacity, and colour are `Theme` knobs.
Mermaid source
%%metro title: Directional Flow%%metro style: dark%%metro directional: true%%metro line: dna | DNA variants | #E64A19%%metro line: rna | RNA expression | #1E88E5%%metro line: meth | Methylation | #43A047
graph LR reads[Reads] qc[QC] trim[Trim] align[Align] callvar[Call variants] quant[Quantify] methcall[Call methylation] report[Report]
reads -->|dna| qc reads -->|rna| qc reads -->|meth| qc qc -->|dna| trim qc -->|rna| trim qc -->|meth| trim trim -->|dna| align trim -->|rna| align trim -->|meth| align align -->|dna| callvar align -->|rna| quant align -->|meth| methcall callvar -->|dna| report quant -->|rna| report methcall -->|meth| reportCLI command
nf-metro render examples/directional_flow.mmd -o directional_flow.svgRendered map
Line Spread
Demonstrates the `%%metro line_spread:` axis with one per-section override per section: `bundle` (default) merges shared lines onto one trunk that cascades downward, `centered` balances that bundle about the midline, and `rails` draws each line as a parallel rail with shared stations as interchanges.
Mermaid source
%%metro title: Line spread modes%%metro style: dark%%metro line: dna | DNA | #4CAF50%%metro line: rna | RNA | #2196F3%%metro line: cfdna | cfDNA | #E91E63
%%metro line_spread: bundle%%metro line_spread: centered | centered_sec%%metro line_spread: rails | rails_sec
%% Rail panel input/output files: the rails fan out from the CRAM terminus and%% fan back in to the VCF terminus (a fan-in), each meeting a buffer-stop marker.%% rna skips Filter, so Filter is a partial interchange: the rna rail bridges%% straight over its connector rather than stopping there.%%metro file: r_in | CRAM%%metro file: r_out | VCF
%%metro grid: bundle_sec | 0,0%%metro grid: centered_sec | 1,0%%metro grid: rails_sec | 2,0
graph LR subgraph bundle_sec [bundle] b_in[Input] b_dna[DNA] b_rna[RNA] b_cf[cfDNA] b_out[QC]
b_in -->|dna| b_dna b_in -->|rna| b_rna b_in -->|cfdna| b_cf b_dna -->|dna| b_out b_rna -->|rna| b_out b_cf -->|cfdna| b_out end
subgraph centered_sec [centered] c_in[Align] c_dna[DNA] c_rna[RNA] c_cf[cfDNA] c_out[Merge]
c_in -->|dna| c_dna c_in -->|rna| c_rna c_in -->|cfdna| c_cf c_dna -->|dna| c_out c_rna -->|rna| c_out c_cf -->|cfdna| c_out end
subgraph rails_sec [rails] r_in[ ] r_call[Call] r_filter[Filter] r_annotate[Annotate] r_out[ ]
r_in -->|dna,rna,cfdna| r_call r_call -->|dna,cfdna| r_filter r_call -->|rna| r_annotate r_filter -->|dna,cfdna| r_annotate r_annotate -->|dna,rna,cfdna| r_out end
b_out -->|dna,rna,cfdna| c_inCLI command
nf-metro render examples/line_spread.mmd -o line_spread.svgRendered map
Cross Track Interchange
Demonstrates `%%metro interchange:`: parallel tumour/normal lanes share one MarkDuplicates step without merging, drawn as a cross-track interchange so each lane stays straight on its own track instead of pinching together to a point. Auto-layout infers the same interchange for fully-parallel lanes even without the directive.
Mermaid source
%%metro title: Cross-track interchange%%metro style: dark%%metro directional: true%%metro legend: br%%metro line: tumor | Tumor | #d62728%%metro line: normal | Normal | #0570b0%%metro file: fastq_in | FASTQ%%metro file: out | VCF
%% The two lanes are NOT parallel everywhere: they share a pre-processing trunk%% (a real convergence), fan out to their own aligners, and merge again at%% Annotate (a real fan-in, where the lines pinch to a point). MarkDuplicates is%% the exception -- both lanes run it but never merge there, so it renders as a%% cross-track interchange that keeps each lane straight on its own track rather%% than pinching them together. (Auto-layout infers this same interchange even%% without the directive, since the lanes through MarkDuplicates are parallel;%% Annotate is left as a convergence because both lanes leave it for one MultiQC.)%%metro interchange: markduplicates | tumor | normal
graph LR subgraph prep [Pre-processing] fastq_in[ ] fastqc[FastQC] fastp[fastp] fastq_in -->|tumor,normal| fastqc fastqc -->|tumor,normal| fastp end
subgraph calling [Alignment & calling] bwa_t[BWA tumour] bwa_n[BWA normal] markduplicates[MarkDuplicates] mutect2[Mutect2] haplotypecaller[GATK HC] bwa_t -->|tumor| markduplicates bwa_n -->|normal| markduplicates markduplicates -->|tumor| mutect2 markduplicates -->|normal| haplotypecaller end
subgraph reporting [Annotation & reporting] annotate[VEP] multiqc[MultiQC] out[ ] annotate -->|tumor,normal| multiqc multiqc -->|tumor,normal| out end
fastp -->|tumor| bwa_t fastp -->|normal| bwa_n mutect2 -->|tumor| annotate haplotypecaller -->|normal| annotateCLI command
nf-metro render examples/cross_track_interchange.mmd -o cross_track_interchange.svgRendered map
Marker Styles
Per-station marker shapes & fills encoding tool attributes (mandatory/optional/accelerated/expanded-elsewhere) with a marker key alongside the line legend. Demonstrates `%%metro marker:` and `%%metro marker_legend:`.
Mermaid source
%%metro title: Per-station marker styles%%metro style: dark%%metro line: germline | Germline calling | #0570b0%%metro line: somatic | Somatic calling | #e63946%%metro legend: bl
%% Per-station marker shapes & fills: square = mandatory, circle = optional,%% coloured square = hardware-accelerated, pill = a step whose detail is%% expanded in a separate panel.%%metro marker: bwa | square, solid%%metro marker: markdup | square, solid%%metro marker: bqsr | square, #4CAF50%%metro marker: haplotypecaller | square, #4CAF50%%metro marker: mutect2 | square, #1f4e79%%metro marker: cnvkit | pill, open%%metro marker: vep | circle, open%%metro marker: snpeff | circle, open
%% Marker key captions.%%metro marker_legend: square, solid | Mandatory%%metro marker_legend: circle, open | Optional%%metro marker_legend: pill, open | Expanded elsewhere%%metro marker_legend: square, #4CAF50 | Parabricks accelerated%%metro marker_legend: square, #1f4e79 | Sentieon accelerated
graph LR subgraph alignment [Alignment & preprocessing] bwa[BWA-MEM] markdup[MarkDuplicates] bqsr[BQSR]
bwa -->|germline,somatic| markdup markdup -->|germline,somatic| bqsr end
subgraph calling [Variant calling & annotation] haplotypecaller[HaplotypeCaller] mutect2[Mutect2] cnvkit[CNVkit] snpeff[SnpEff] vep[VEP]
haplotypecaller -->|germline| snpeff mutect2 -->|somatic| vep mutect2 -->|somatic| cnvkit end
%% Inter-section edges bqsr -->|germline| haplotypecaller bqsr -->|somatic| mutect2CLI command
nf-metro render examples/marker_styles.mmd -o marker_styles.svgRendered map
Diagonal Labels
Opt-in diagonal station labels via `%%metro label_angle: 45`: a dense pre-processing trunk whose tilted names pack tighter than horizontal labels would, feeding a variant-calling section in the row below that fans out to three callers and back in -- the reserved vertical room keeps the hanging labels clear of the row beneath.
Mermaid source
%%metro title: Diagonal Labels (dense trunk)%%metro style: dark%%metro label_angle: 45%%metro line: germline | Germline | #0570b0%%metro line: tumor_only | Tumor only | #d62728%%metro line: somatic | Tumor-normal pair | #756bb1%%metro file: fastq_in | FASTQ%%metro file: vcf_out | VCF%%metro grid: preprocessing | 0,0%%metro grid: variant_calling | 0,1
graph LR subgraph preprocessing [Pre-processing] %%metro exit: right | germline, tumor_only, somatic fastq_in[ ] fastqc[FastQC] fastp[FastP] umi[UMI consensus] bwa[BWA-MEM] merge_index[samtools merge/index] markdup[MarkDuplicates] bqsr[BaseRecalibrator] applybqsr[ApplyBQSR] mosdepth[mosdepth] ngscheckmate[NGSCheckmate]
fastq_in -->|germline,tumor_only,somatic| fastqc fastqc -->|germline,tumor_only,somatic| fastp fastp -->|germline,tumor_only,somatic| umi umi -->|germline,tumor_only,somatic| bwa bwa -->|germline,tumor_only,somatic| merge_index merge_index -->|germline,tumor_only,somatic| markdup markdup -->|germline,tumor_only,somatic| bqsr bqsr -->|germline,tumor_only,somatic| applybqsr applybqsr -->|germline,tumor_only,somatic| mosdepth mosdepth -->|germline,tumor_only,somatic| ngscheckmate end
subgraph variant_calling [Variant calling] %%metro entry: left | germline, tumor_only, somatic split[split by analysis] deepvariant[GATK] mutect[Mutect2] strelka[Strelka2] merge_vcf[merge VCFs] vcf_out[ ]
split -->|germline| deepvariant split -->|tumor_only| mutect split -->|somatic| strelka deepvariant -->|germline| merge_vcf mutect -->|tumor_only| merge_vcf strelka -->|somatic| merge_vcf merge_vcf -->|germline,tumor_only,somatic| vcf_out end
%% The dense angled-label trunk feeds the variant-calling section in the %% row below, which fans out to three callers (one per line) and fans %% back in at merge VCFs -- exercising the vertical room the hanging %% angled labels need above the row below. ngscheckmate -->|germline,tumor_only,somatic| splitCLI command
nf-metro render examples/diagonal_labels.mmd -o diagonal_labels.svgRendered map
File Icons
Terminus icon variants: single-sheet `%%metro file:`, stacked `%%metro files:` for multiplicity, the `%%metro dir:` folder, and the optional `| banner` format strip.
Mermaid source
%%metro title: File Icon Variants (#532)%%metro style: dark%%metro line: main | Pipeline | #4CAF50
%%metro file: ref_in | FASTA | Reference%%metro files: reads_in | FASTQ | Reads%%metro files: aln_out | BAM | Alignments | banner%%metro file: report_out | HTML/PDF | Report%%metro dir: results_out | Results
graph LR subgraph inputs [Inputs] ref_in[ ] reads_in[ ] align[Align] ref_in -->|main| align reads_in -->|main| align end
subgraph outputs [Outputs] %%metro entry: left | main collect[Collect] aln_out[ ] report_out[ ] results_out[ ] collect -->|main| aln_out collect -->|main| report_out collect -->|main| results_out end
align -->|main| collectCLI command
nf-metro render examples/file_icons.mmd -o file_icons.svgRendered map
Legend Logo Placement
Demonstrates positioning the bundled legend+logo block: `%%metro legend: br | canvas` pins it to the empty lower-right canvas corner and `%%metro logo_scale:` enlarges the embedded logo. The directive also supports `| dx,dy` offsets and absolute `x,y` placement; the block auto-avoids sections and routes. The QC line shows a downward cross-column feeder dropping straight into its consumer section.
Mermaid source
%%metro title: Legend + logo placement%%metro style: dark%%metro logo: examples/placeholder_logo.png%%metro logo_scale: 1.5%%metro legend: br | canvas%%metro file: fq_in | FASTQ%%metro line: main | Main route | #3b82f6%%metro line: qc | QC route | #e6842a%%metro grid: input | 0,0%%metro grid: trim | 1,0%%metro grid: align | 2,0%%metro grid: call | 3,0%%metro grid: report | 4,0%%metro grid: qc | 2,1graph LR subgraph input [Input] %%metro exit: right | main %%metro exit: bottom | qc fq_in[ ] cat[Cat FASTQ] fq_in -->|main,qc| cat end subgraph trim [Trimming] %%metro entry: left | main %%metro exit: right | main trimg[Trim] end subgraph align [Alignment] %%metro entry: left | main %%metro exit: right | main bwa[BWA-MEM] sort[Sort] bwa -->|main| sort end subgraph call [Variant calling] %%metro entry: left | main %%metro exit: right | main caller[Caller] end subgraph report [Reporting] %%metro entry: left | main annot[Annotate] rep[Report] annot -->|main| rep end subgraph qc [Quality control] %%metro entry: left | qc fastqc[FastQC] multiqc[MultiQC] fastqc -->|qc| multiqc end cat -->|main| trimg trimg -->|main| bwa sort -->|main| caller caller -->|main| annot cat -->|qc| fastqcCLI command
nf-metro render examples/legend_logo_placement.mmd -o legend_logo_placement.svgRendered map
Legend Combo
Demonstrates `%%metro legend_combo:`: a normal (blue) and tumor (red) line travel together as a tumor-normal pair. The combo renders one legend row with a striped red+blue swatch. Normal travels only within the bundle so its individual row is suppressed, while tumor breaks away alone to Annotate and keeps its own row; the QC line is unaffected.
Mermaid source
%%metro title: Tumor-Normal Calling%%metro style: dark%%metro line: normal | Normal | #2196F3%%metro line: tumor | Tumor | #E53935%%metro line: qc | Quality Control | #4CAF50 | dashed%%metro legend_combo: normal, tumor | Tumor-normal pair
graph LR fastq[FASTQ] align[Alignment] markdup[MarkDuplicates] bqsr[BQSR] fastqc[FastQC] call[Somatic Calling] annotate[Annotate] multiqc[MultiQC]
fastq -->|normal,tumor| align align -->|normal,tumor| markdup markdup -->|normal,tumor| bqsr bqsr -->|normal,tumor| call call -->|tumor| annotate
fastq -->|qc| fastqc fastqc -->|qc| multiqcCLI command
nf-metro render examples/legend_combo.mmd -o legend_combo.svgRendered map
Group Labels
Annotative `%%metro group:` band captions labelling sarek-style sub-families of callers (SNPs & Indels / SV & CNV / MSI) within a single section, without splitting them apart.
Mermaid source
%%metro title: Variant Calling with Group Bands%%metro style: dark%%metro line: caller | Variant Calling | #2db572
%%metro group: SNPs & Indels | freebayes, haplotypecaller, mutect2%%metro group: SV & CNV | manta, cnvkit%%metro group: MSI | msisensorpro
graph LR subgraph preprocess [Pre-processing] markdup[MarkDuplicates] recal[BaseRecalibrator]
markdup -->|caller| recal end
subgraph calling [Variant Calling] freebayes[FreeBayes] haplotypecaller[HaplotypeCaller] mutect2[Mutect2] manta[Manta] cnvkit[CNVkit] msisensorpro[MSIsensorpro]
%% The callers sit in one horizontal row; the group bands beneath %% caption contiguous families along the x-axis (sarek-style). freebayes -->|caller| haplotypecaller haplotypecaller -->|caller| mutect2 mutect2 -->|caller| manta manta -->|caller| cnvkit cnvkit -->|caller| msisensorpro end
recal -->|caller| freebayesCLI command
nf-metro render examples/group_labels.mmd -o group_labels.svgRendered map
Off Track Outputs
Off-track file artefacts hung above a pre-processing trunk at the step that writes each one: `%%metro off_track:` on a producer-fed sink anchors it to its producer (not the section top), mirroring the off-track input mechanism for outputs. Each output gets its own column clear of the next station, and a step writing several files (MarkDup here) stacks them above it.
Mermaid source
%%metro title: Off-track outputs%%metro line: main | Pre-processing | #3b82f6%%metro off_track: bam_mapped, dedup_cram, recal_cram%%metro file: bam_mapped | BAM%%metro file: dedup_cram | CRAM%%metro file: recal_cram | CRAM
graph LR subgraph preprocess [Pre-processing] fastq[FASTQ] bwa[BWA-MEM] convert[convert] markdup[MarkDup] bqsr[BQSR] ready[Ready] bam_mapped[ ] dedup_cram[ ] recal_cram[ ]
fastq -->|main| bwa bwa -->|main| convert bwa -->|main| markdup convert -->|main| bqsr markdup -->|main| bqsr bqsr -->|main| ready
bwa -->|main| bam_mapped markdup -->|main| dedup_cram bqsr -->|main| recal_cram endCLI command
nf-metro render examples/off_track_outputs.mmd -o off_track_outputs.svgRendered map
Tb File Termini
A `%%metro direction: TB` reporting section whose file outputs are line termini. Regression fixture: terminus file icons orient to a vertical flow, with the connector entering from the top.
Mermaid source
%%metro title: TB section file outputs%%metro style: dark%%metro directional: true%%metro line: rna | RNA-seq | #1f9e89%%metro line: dna | Variant | #2c7fb8%%metro file: report_html | HTML | Report%%metro file: bundle_zip | ZIP | Bundle%%metro file: multiqc_html | HTML | MultiQC
graph LR subgraph analysis [Analysis] align[Align] call[Call] align -->|rna,dna| call end
subgraph reporting [Reporting] %%metro direction: TB %%metro entry: left | rna, dna report[Build report] bundle[Zip bundle] multiqc[MultiQC] report_html[ ] bundle_zip[ ] multiqc_html[ ]
report -->|rna,dna| report_html report -->|rna,dna| bundle bundle -->|rna,dna| bundle_zip report -->|rna,dna| multiqc multiqc -->|rna,dna| multiqc_html end
call -->|rna,dna| reportCLI command
nf-metro render examples/tb_file_termini.mmd -o tb_file_termini.svgRendered map
Disconnected Components
A connected three-section trunk plus a separate, wide disconnected section. Each weakly-connected component of the section graph is placed in its own local column grid and the components are stacked vertically, so the wide panel never inflates the trunk's columns or flings its later sections to the right.
Mermaid source
%%metro title: Disconnected Components%%metro style: dark%%metro line: main | Main Pipeline | #e63946%%metro line: aux | Auxiliary Report | #0570b0
graph LR subgraph ingest [Ingest] in1[Read Input] in2[Validate] in1 -->|main| in2 end
subgraph process [Process] pr1[Align] pr2[Filter] pr1 -->|main| pr2 end
subgraph results [Results] re1[Summarise] re2[Publish] re1 -->|main| re2 end
subgraph wide_report [Standalone QC Report] w1[Collect] w2[Aggregate] w3[Annotate] w4[Normalise] w5[Visualise] w6[Export] w1 -->|aux| w2 w2 -->|aux| w3 w3 -->|aux| w4 w4 -->|aux| w5 w5 -->|aux| w6 end
in2 -->|main| pr1 pr2 -->|main| re1CLI command
nf-metro render examples/disconnected_components.mmd -o disconnected_components.svgRendered map
Multi Section Cell
Multiple sections packed into one grid cell: a `%%metro grid:` directive names two comma-separated sections that share a cell and pack side-by-side along the flow axis. A short+long pair in one row aligns top-to-bottom with a long+short pair packed into the same column below it, freeing the bottom-left for the legend.
Mermaid source
%%metro title: Multi-section cell packing%%metro line: main | Main | #4477aa | solid
%%metro grid: pre | 0,0%%metro grid: short_a, long_a | 1,0%%metro grid: norm | 2,0%%metro grid: long_b, short_b | 1,1%%metro grid: cons | 2,1
graph LR subgraph pre [Preprocessing] p1[Input] -->|main| p2[Trim] end subgraph short_a [GATK] a1[Call] -->|main| a2[Filter] end subgraph long_a [Variant Calling] b1[Pileup] -->|main| b2[Genotype] b2 -->|main| b3[Phase] b3 -->|main| b4[Recal] b4 -->|main| b5[Score] b5 -->|main| b6[Emit] end subgraph norm [Normalize] n1[Norm] -->|main| n2[Annotate] end subgraph long_b [Realignment] c1[Index] -->|main| c2[Realign] c2 -->|main| c3[Dedup] c3 -->|main| c4[BQSR] c4 -->|main| c5[Merge] c5 -->|main| c6[Sort] end subgraph short_b [Reporting] d1[Report] -->|main| d2[Summary] end subgraph cons [Consensus] e1[Consensus] -->|main| e2[Final] end p2 -->|main| a1 a2 -->|main| b1 b6 -->|main| n1 p2 -->|main| c1 c6 -->|main| d1 d2 -->|main| e1CLI command
nf-metro render examples/topologies/multi_section_cell.mmd -o multi_section_cell.svgRendered map
Fanout Bundle Plus Spurs
A shared source fans out three ways at once: a same-column multi-line branch wrapping to the row below, plus single-line spurs peeling off the same junction. The branch bundle keeps its concentric fan order, each spur's descent fuses onto the bundle rather than crossing it, and the single-line spur sections ride their own trunks.
Mermaid source
%%metro title: Fan-out bundle plus spurs%%metro line: a | Line A | #e6007e%%metro line: b | Line B | #2db572%%metro line: c | Line C | #2b6cb0%%metro grid: trunk | 0,0%%metro grid: branch | 0,1%%metro grid: solo_a | 1,0%%metro grid: solo_b | 1,1
graph LR subgraph trunk [Trunk] %%metro exit: right | a, b, c x1[X1] x2[X2] x1 -->|a,b,c| x2 end
subgraph branch [Branch] %%metro entry: left | a, b, c y1[Y1] y2[Y2] y1 -->|a,b,c| y2 end
subgraph solo_a [SoloA] %%metro entry: left | a z1[Z1] z2[Z2] z1 -->|a| z2 end
subgraph solo_b [SoloB] %%metro entry: left | b w1[W1] w2[W2] w1 -->|b| w2 end
x2 -->|a,b,c| y1 x2 -->|a| z1 x2 -->|b| w1CLI command
nf-metro render examples/topologies/fanout_bundle_plus_spurs.mmd -o fanout_bundle_plus_spurs.svgRendered map
Folded Corridor Distinct Lanes
Two distinct lines share a folded RL return corridor: they co-travel the trunk and fold drop as adjacent lanes, diverge where one line bypasses a section while the other routes through it, and reconverge at the final section. Every shared channel keeps the two lines an OFFSET_STEP apart rather than collapsing one stroke onto the other.
Mermaid source
%%metro title: Folded Corridor Distinct Lanes%%metro style: dark%%metro line: dna | DNA | #4a90d9%%metro line: rna | RNA | #e63946%%metro grid: preprocessing | 0,0%%metro grid: gatk | 1,0%%metro grid: variant_calling | 2,0%%metro grid: normalization | 2,1%%metro grid: consensus | 1,1%%metro grid: realignment | 0,1
graph LR subgraph preprocessing [Pre-processing] %%metro exit: right | dna, rna pp1[Trim] pp2[Align] pp1 -->|dna,rna| pp2 end subgraph gatk [GATK] %%metro entry: left | dna, rna %%metro exit: right | dna, rna gk1[BQSR] gk2[Apply] gk1 -->|dna,rna| gk2 end subgraph variant_calling [Variant Calling] %%metro entry: left | dna, rna %%metro exit: bottom | dna, rna vc1[Call] vc2[Filter] vc1 -->|dna,rna| vc2 end subgraph normalization [Normalization] %%metro direction: RL %%metro entry: top | dna, rna %%metro exit: left | dna, rna nz1[Decompose] nz2[Norm] nz1 -->|dna,rna| nz2 end subgraph consensus [Consensus] %%metro direction: RL %%metro entry: right | dna %%metro exit: left | dna cs1[Merge] cs2[Vote] cs1 -->|dna| cs2 end subgraph realignment [Realignment] %%metro direction: RL %%metro entry: right | dna, rna rl1[Realign] rl2[Recall] rl1 -->|dna,rna| rl2 end pp2 -->|dna,rna| gk1 gk2 -->|dna,rna| vc1 vc2 -->|dna,rna| nz1 nz2 -->|dna| cs1 nz2 -->|rna| rl1 cs2 -->|dna| rl1CLI command
nf-metro render examples/topologies/folded_corridor_distinct_lanes.mmd -o folded_corridor_distinct_lanes.svgRendered map
Realistic Pipelines
Genomic Pipeline
Multi-section genomic variant-calling pipeline: same-direction sections stacked in one column (serpentine carriage-return) plus a multi-row QC collector fan-in descending a shared inter-column corridor.
Mermaid source
%%metro title: Variant Calling Pipeline%%metro style: dark%%metro legend: br%%metro line_order: definition%%metro center_ports: true%%metro compact_offsets: true%%metro file: fastq_in | FASTQ%%metro file: bam_in | BAM%%metro file: cram_in | CRAM%%metro file: vcf_out | VCF%%metro file: report_out | HTML%%metro line: germline | Germline | #0570b0%%metro line: tumor_only | Tumor only | #d62728%%metro line: somatic | Tumor-normal pair | #756bb1
graph LR subgraph preprocessing [Pre-processing] %%metro exit: right | germline, tumor_only, somatic fastq_in[ ] bam_in[ ] fastqc[FastQC] fastp[FastP] umi[UMI consensus] bwa[BWA-MEM] bwa2[BWA-MEM2] dragmap[DragMap] sentieon_bwa[Sentieon BWA] merge_index[samtools merge/index] markdup[MarkDuplicates] sentieon_dedup[Sentieon Dedup] bqsr[BaseRecalibrator] applybqsr[ApplyBQSR] mosdepth[mosdepth] ngscheckmate[NGSCheckmate]
fastq_in -->|germline,tumor_only,somatic| fastqc fastq_in -->|germline,tumor_only,somatic| fastp bam_in -->|germline,tumor_only,somatic| fastp fastp -->|germline,tumor_only,somatic| umi umi -->|germline,tumor_only,somatic| bwa umi -->|germline,tumor_only,somatic| bwa2 umi -->|germline,tumor_only,somatic| dragmap umi -->|germline,tumor_only,somatic| sentieon_bwa bwa -->|germline,tumor_only,somatic| merge_index bwa2 -->|germline,tumor_only,somatic| merge_index dragmap -->|germline,tumor_only,somatic| merge_index sentieon_bwa -->|germline,tumor_only,somatic| merge_index merge_index -->|germline,tumor_only,somatic| markdup merge_index -->|germline,tumor_only,somatic| sentieon_dedup markdup -->|germline,tumor_only,somatic| bqsr sentieon_dedup -->|germline,tumor_only,somatic| bqsr bqsr -->|germline,tumor_only,somatic| applybqsr applybqsr -->|germline,tumor_only,somatic| mosdepth applybqsr -->|germline,tumor_only,somatic| ngscheckmate end
subgraph variant_calling [Variant calling] %%metro entry: left | germline, tumor_only, somatic %%metro exit: right | germline, tumor_only, somatic cram_in[ ] haplotypecaller[HaplotypeCaller] deepvariant[DeepVariant] sentieon_dnascope[Sentieon DNAscope] sentieon_haplotyper[Sentieon Haplotyper] freebayes[FreeBayes] strelka[Strelka] mpileup[bcftools mpileup] mutect2[Mutect2] lofreq[LoFreq] muse[MuSE] sentieon_tnscope[Sentieon TNscope] manta[Manta] tiddit[TIDDIT] ascat[ASCAT] cnvkit[CNVkit] controlfreec[Control-FREEC] indexcov[indexcov] msisensor2[MSIsensor2] msisensorpro[MSIsensor-pro] vcfs[ ]
cram_in -->|germline| haplotypecaller cram_in -->|germline| deepvariant cram_in -->|germline| sentieon_dnascope cram_in -->|germline| sentieon_haplotyper cram_in -->|germline,tumor_only,somatic| freebayes cram_in -->|germline,somatic| strelka cram_in -->|germline,tumor_only,somatic| mpileup cram_in -->|tumor_only,somatic| mutect2 cram_in -->|tumor_only| lofreq cram_in -->|somatic| muse cram_in -->|tumor_only,somatic| sentieon_tnscope cram_in -->|germline,tumor_only,somatic| manta cram_in -->|germline,tumor_only,somatic| tiddit cram_in -->|somatic| ascat cram_in -->|germline,tumor_only,somatic| cnvkit cram_in -->|tumor_only,somatic| controlfreec cram_in -->|germline,somatic| indexcov cram_in -->|tumor_only| msisensor2 cram_in -->|somatic| msisensorpro
haplotypecaller -->|germline| vcfs deepvariant -->|germline| vcfs sentieon_dnascope -->|germline| vcfs sentieon_haplotyper -->|germline| vcfs freebayes -->|germline,tumor_only,somatic| vcfs strelka -->|germline,somatic| vcfs mpileup -->|germline,tumor_only,somatic| vcfs mutect2 -->|tumor_only,somatic| vcfs lofreq -->|tumor_only| vcfs muse -->|somatic| vcfs sentieon_tnscope -->|tumor_only,somatic| vcfs manta -->|germline,tumor_only,somatic| vcfs tiddit -->|germline,tumor_only,somatic| vcfs ascat -->|somatic| vcfs cnvkit -->|germline,tumor_only,somatic| vcfs controlfreec -->|tumor_only,somatic| vcfs indexcov -->|germline,somatic| vcfs msisensor2 -->|tumor_only| vcfs msisensorpro -->|somatic| vcfs end
subgraph post_vc [Post-processing] filter_vcfs[Filter VCFs] normalize[Normalize] concatenate[Concatenate] consensus[Consensus] varlociraptor[Varlociraptor] bcftools_stats[bcftools stats] vcftools[VCFtools]
filter_vcfs -->|germline,tumor_only,somatic| normalize normalize -->|germline,tumor_only,somatic| concatenate concatenate -->|germline,tumor_only,somatic| consensus consensus -->|germline,tumor_only,somatic| varlociraptor varlociraptor -->|germline,tumor_only,somatic| bcftools_stats bcftools_stats -->|germline,tumor_only,somatic| vcftools end
subgraph annotation [Annotation] snpeff[snpEff] vep[VEP] bcftools_ann[bcftools annotate] snpsift[SnpSift]
snpeff -->|germline,tumor_only,somatic| vep vep -->|germline,tumor_only,somatic| bcftools_ann bcftools_ann -->|germline,tumor_only,somatic| snpsift end
subgraph reporting [Reporting] multiqc[MultiQC] vcf_out[ ] report_out[ ]
multiqc -->|germline,tumor_only,somatic| report_out snpsift_to_vcf[ ] snpsift_to_vcf -->|germline,tumor_only,somatic| vcf_out end
%% Inter-section edges applybqsr -->|germline,tumor_only,somatic| cram_in vcfs -->|germline,tumor_only,somatic| filter_vcfs vcftools -->|germline,tumor_only,somatic| snpeff snpsift -->|germline,tumor_only,somatic| snpsift_to_vcf fastqc -->|germline,tumor_only,somatic| multiqc mosdepth -->|germline,tumor_only,somatic| multiqc bcftools_stats -->|germline,tumor_only,somatic| multiqcCLI command
nf-metro render examples/genomic_pipeline.mmd -o genomic_pipeline.svgRendered map
Longread Variant Calling
Dense long-read variant-calling pipeline (six lines, nine sections): exercises inter-section routing around non-connecting section boxes, cross-row feeds via the inter-row gap, same-line bundle coincidence, and a same-colour crossover bridge.
Mermaid source
%%metro title: Long-read Variant Calling%%metro style: dark%%metro directional: true%%metro files: fastq_in | FASTQ%%metro files: bam_in | BAM%%metro files: ubam_in | uBAM%%metro line: ubam | uBAM | #0570b0%%metro line: fastq | FASTQ | #2db572%%metro line: bam | BAM | #f5c542%%metro line: other | Other | #ff8c00%%metro line: snvvcf | SNV VCF | #e63946%%metro line: svvcf | SV VCF | #9d4edd%%metro legend: tl
graph LR subgraph preprocessing [Pre-processing]
fastq_in[ ] bam_in[ ] ubam_in[ ] cat_fastq[cat FASTQ] samtools_merge[samtools\nmerge] minimap2_align[minimap2] samtools_sort_index[samtools\nsort/index] mosdepth[mosdepth]
fastq_in -->|fastq| cat_fastq ubam_in -->|ubam| samtools_merge bam_in -->|bam| samtools_merge cat_fastq -->|fastq| minimap2_align samtools_merge -->|ubam| minimap2_align minimap2_align -->|bam| samtools_sort_index samtools_merge -->|bam| samtools_sort_index samtools_sort_index -->|bam| mosdepth end
subgraph small_variants [Small variant calling]
clair3[Clair3] deepvariant[Deepvariant] end
subgraph cnv_calling [CNVs]
ontspectre_cnvcaller[ont-spectre CNVCaller] end
subgraph tr_calling [Repeats]
longtr[LongTR] straglr[Straglr] trgt[TRGT] end
subgraph phasing [Phasing]
whatshap_phase[WhatsHap Phase] whatshap_haplotag[WhatsHap Haplotag]
whatshap_phase -->|bam,snvvcf| whatshap_haplotag end
subgraph structural_variants [Structural Variants]
sniffles[Sniffles] cutesv[CuteSV] jasminesv_callers[Jasmine merge callers]
sniffles -->|svvcf,bam| jasminesv_callers cutesv -->|svvcf,bam| jasminesv_callers end
subgraph jointcalling [Joint Calling]
jasminesv_samples[Jasmine merge samples] glnexus[GLNexus] end
subgraph annotation [Annotation]
vep[VEP] snpeff[SnpEff] annotsv[AnnotSV] end
subgraph reports [Reports]
geneyx[Geneyx] sv_report[SV Report] end
%% Inter-section edges samtools_sort_index -->|bam| clair3 samtools_sort_index -->|bam| deepvariant samtools_sort_index -->|bam| longtr samtools_sort_index -->|bam| straglr samtools_sort_index -->|bam| trgt
mosdepth -->|other| ontspectre_cnvcaller
straglr -->|other| geneyx
clair3 -->|snvvcf| ontspectre_cnvcaller deepvariant -->|snvvcf| ontspectre_cnvcaller
clair3 -->|bam,snvvcf| whatshap_phase deepvariant -->|bam,snvvcf| whatshap_phase
clair3 -->|snvvcf| glnexus deepvariant -->|snvvcf| glnexus
clair3 -->|snvvcf| vep deepvariant -->|snvvcf| vep
whatshap_haplotag -->|bam| sniffles whatshap_haplotag -->|bam| cutesv whatshap_haplotag -->|bam| jasminesv_samples
ontspectre_cnvcaller -->|other| geneyx
sniffles -->|svvcf| jasminesv_samples sniffles -->|svvcf| vep sniffles -->|svvcf| snpeff sniffles -->|svvcf| annotsv sniffles -->|svvcf| geneyx
cutesv -->|svvcf| jasminesv_samples cutesv -->|svvcf| vep cutesv -->|svvcf| snpeff cutesv -->|svvcf| annotsv cutesv -->|svvcf| geneyx
jasminesv_callers -->|svvcf| jasminesv_samples jasminesv_callers -->|svvcf| vep jasminesv_callers -->|svvcf| snpeff jasminesv_callers -->|svvcf| annotsv jasminesv_callers -->|svvcf| geneyx jasminesv_callers -->|svvcf| sv_report
snpeff -->|svvcf| sv_report annotsv -->|svvcf| sv_report
glnexus -->|snvvcf| vepCLI command
nf-metro render examples/longread_variant_calling.mmd -o longread_variant_calling.svgRendered map
Sarek Metro
Integration showcase: a sarek-style variant-calling pipeline drawn with diagonal (45-degree) labels for tight column packing, an off-track FASTQ input, file termini, marker styles, and a `%%metro line_spread: rails` panel where each caller keeps its own rail and shared stations render as interchanges.
Mermaid source
%%metro title: Example analysis pathways%%metro caption: Adapted from: Fellows Yates, James A., et al. PeerJ 9 (2021)%%metro style: dark%%metro logo: examples/nf-core-sarek_logo_light.png | examples/nf-core-sarek_logo_dark.png%%metro logo_scale: 1.0%%metro font_scale: 1.3%%metro legend_logo_gap: 40%%metro legend: br%%metro label_angle: 45%%metro line_spread: rails | calling%%metro grid: preprocessing | 0,0%%metro grid: variantcalling | 1,0%%metro grid: annotation | 2,0%%metro grid: calling | 0,1,1,3
%%metro line: core | Core workflow | #2db572%%metro line: germline | Germline | #0570b0%%metro line: tumor_only | Tumor only | #d62728%%metro line: pair_n | Tumor-normal (normal) | #0570b0%%metro line: pair_t | Tumor-normal (tumor) | #d62728
%% Tumor-normal pair is the normal + tumor lines bundled together; give the%% combination a single legend entry instead of two separate rows.%%metro legend_combo: pair_n, pair_t | Tumor-normal pair
%%metro files: ubam_in | uBAM%%metro files: spring_in | spring%%metro files: fastq_in | FASTQ%%metro file: vcf_ann | VCF%%metro file: vcf_vc | VCF%%metro files: cram_call | CRAM%%metro file: out | VCF%%metro file: out | TXT%%metro files: out | ...
%% Intermediate alignment artefacts written off the trunk at the step that%% produces them (mapping, samtools, recalibration prep, applybqsr).%%metro files: mapped_out | BAM/CRAM%%metro files: samtools_out | CRAM%%metro files: recalprep_out | CRAM%%metro files: recal_out | CRAM
%% ubam and spring need conversion, so they feed convert; fastq is already in%% the right format and joins the trunk at FastQC, past convert. spring and%% fastq lift off the trunk as off-track inputs with an S-curve. The bam/cram%% outputs hang off their producer the same way (off_track anchors a sink to%% its source).%%metro off_track: fastq_in%%metro off_track: spring_in%%metro off_track: mapped_out%%metro off_track: samtools_out%%metro off_track: recalprep_out%%metro off_track: recal_out%%metro off_track: vcf_vc
%% Marker key. Optional steps use the standard station pill (undistinguished);%% only mandatory / accelerated steps get a marker shape. Acceleration is shown%% by fill colour: Parabricks (green), Sentieon (navy), or both (teal) on%% whatever shape the step already carries.%%metro marker_legend: square, solid | Mandatory%%metro marker_legend: square, #4CAF50 | Parabricks accelerated%%metro marker_legend: square, #1b3a6b | Sentieon accelerated%%metro marker_legend: square, #2f7f74 | Parabricks & Sentieon accelerated%%metro marker_legend: pill, open | Expanded in pathways panel
%% Caller families along the pathways trunk.%%metro group: SNPs & Indels | deepvariant, freebayes, haplotypecaller, haplotyper, dnascope, tnscope, lofreq, muse, mpileup, mutect2, strelka2%%metro group: SV & CNV | indexcov, manta, tiddit, ascat, controlfreec, cnvkit%%metro group: MSI | msisensor2, msisensorpro
%% --- markers: mandatory steps get a square; acceleration is the fill colour.%% mapping and markduplicates are accelerable by both Parabricks and Sentieon%% (teal); the BQSR steps are Parabricks-only (green); the Sentieon callers in%% the pathways panel are Sentieon-only (navy).%%metro marker: convert | square, solid%%metro marker: bam_convert | square, solid%%metro marker: mapping | square, #2f7f74%%metro marker: markduplicates | square, #2f7f74%%metro marker: prepare_recal | circle, #4CAF50%%metro marker: applybqsr | circle, #4CAF50%%metro marker: vc_anchor | pill, open
%% Sentieon-accelerated callers in the pathways panel (navy circles). Single-rail%% callers (haplotyper, dnascope) show the marker; tnscope spans two rails and%% renders as a plain interchange (a marker on a spanning rail station is drawn%% as the interchange bar, not the glyph).%%metro marker: haplotyper | circle, #1b3a6b%%metro marker: dnascope | circle, #1b3a6b%%metro marker: tnscope | circle, #1b3a6b
graph LR subgraph preprocessing [Pre-processing] ubam_in[ ] spring_in[ ] fastq_in[ ] convert[convert] fastqc[FastQC] umi[UMI] fastp[FastP] bbsplit[BBsplit] mapping[mapping] bam_convert[convert] markduplicates[markduplicates] mosdepth[mosdepth, samtools] prepare_recal[prepare recalibration] applybqsr[applybqsr] mosdepth_qc[mosdepth, samtools] ngscheckmate[NGSCheckmate] mapped_out[ ] samtools_out[ ] recalprep_out[ ] recal_out[ ]
ubam_in -->|core| convert spring_in -->|core| convert fastq_in -->|core| fastqc convert -->|core| fastqc fastqc -->|core| umi umi -->|core| fastp fastp -->|core| bbsplit bbsplit -->|core| mapping mapping -->|core| bam_convert mapping -->|core| markduplicates bam_convert -->|core| mosdepth markduplicates -->|core| mosdepth mosdepth -->|core| prepare_recal prepare_recal -->|core| applybqsr applybqsr -->|core| mosdepth_qc mosdepth_qc -->|core| ngscheckmate
mapping -->|core| mapped_out mosdepth -->|core| samtools_out prepare_recal -->|core| recalprep_out applybqsr -->|core| recal_out end
subgraph variantcalling [Variant calling] vc_anchor[variant calling] bcftools[bcftools] samtools_vc[samtools] varlociraptor[Varlociraptor] finalise[finalise] normalise[normalise] consensus[consensus] _vc_merge[ ] vcf_vc[ ]
vc_anchor -->|core| bcftools bcftools -->|core| samtools_vc samtools_vc -->|core| varlociraptor samtools_vc -->|core| finalise finalise -->|core| normalise normalise -->|core| consensus varlociraptor -->|core| _vc_merge consensus -->|core| _vc_merge _vc_merge -->|core| vcf_vc end
subgraph annotation [Annotation] snpeff[snpEff] ensemblvep[ensemblVEP] bcftools_annotate[bcftools annotate] multiqc[MultiQC] vcf_ann[ ]
snpeff -->|core| ensemblvep ensemblvep -->|core| bcftools_annotate bcftools_annotate -->|core| multiqc multiqc -->|core| vcf_ann end
subgraph calling [Example analysis pathways] cram_call[ ] deepvariant[DeepVariant] freebayes[FreeBayes] haplotypecaller[HaplotypeCaller] haplotyper[Sentieon Haplotyper] dnascope[Sentieon DNAscope] tnscope[Sentieon TNscope] lofreq[LoFreq] muse[MuSE] mpileup[mpileup] mutect2[Mutect2] strelka2[Strelka2] indexcov[indexcov] manta[Manta] tiddit[TIDDIT] ascat[ASCAT] controlfreec[Control-FREEC] cnvkit[CNVkit] msisensor2[MSIsensor2] msisensorpro[MSIsensor-pro] out[ ]
%% Germline route (top rail): deepvariant, haplotypecaller, haplotyper, %% dnascope are germline-only; freebayes/mpileup/strelka2/manta/tiddit/ %% cnvkit/indexcov are shared. cram_call -->|germline| deepvariant deepvariant -->|germline| freebayes freebayes -->|germline| haplotypecaller haplotypecaller -->|germline| haplotyper haplotyper -->|germline| dnascope dnascope -->|germline| mpileup mpileup -->|germline| strelka2 strelka2 -->|germline| indexcov indexcov -->|germline| manta manta -->|germline| tiddit tiddit -->|germline| cnvkit cnvkit -->|germline| out
%% Tumour-only route (middle rail): tnscope, lofreq, mutect2, msisensor2 %% join here; mpileup/indexcov run tumour but not the combined pair. cram_call -->|tumor_only| freebayes freebayes -->|tumor_only| tnscope tnscope -->|tumor_only| lofreq lofreq -->|tumor_only| mpileup mpileup -->|tumor_only| mutect2 mutect2 -->|tumor_only| indexcov indexcov -->|tumor_only| manta manta -->|tumor_only| tiddit tiddit -->|tumor_only| controlfreec controlfreec -->|tumor_only| cnvkit cnvkit -->|tumor_only| msisensor2 msisensor2 -->|tumor_only| out
%% Tumour-normal pair route (bottom rail): muse, ascat, msisensorpro are %% combined-only; strelka2 runs germline + combined (not tumour-only). cram_call -->|pair_n,pair_t| freebayes freebayes -->|pair_n,pair_t| tnscope tnscope -->|pair_n,pair_t| muse muse -->|pair_n,pair_t| mutect2 mutect2 -->|pair_n,pair_t| strelka2 strelka2 -->|pair_n,pair_t| manta manta -->|pair_n,pair_t| tiddit tiddit -->|pair_n,pair_t| ascat ascat -->|pair_n,pair_t| controlfreec controlfreec -->|pair_n,pair_t| cnvkit cnvkit -->|pair_n,pair_t| msisensorpro msisensorpro -->|pair_n,pair_t| out end
%% Inter-section: core workflow flows through the top three sections. ngscheckmate -->|core| vc_anchor _vc_merge -->|core| snpeffCLI command
nf-metro render examples/sarek_metro.mmd -o sarek_metro.svgRendered map
Differentialabundance
nf-core/differentialabundance with four input lines, off-track gene-set inputs, and a bypass-heavy reporting row. Uses `%%metro center_ports: true`.
Mermaid source
%%metro title: nf-core/differentialabundance%%metro logo: examples/nf-core-differentialabundance_logo_light.png | examples/nf-core-differentialabundance_logo_dark.png%%metro style: dark%%metro legend: bl%%metro line_order: definition%%metro center_ports: true%%metro compact_offsets: true%%metro file: meta_in | YAML | Contrasts%%metro file: meta_in | CSV | Samples%%metro file: matrix_in | TSV | Matrix%%metro file: cel_in | CEL | Affy CEL%%metro file: mq_in | TSV | MaxQuant%%metro file: geo_in | STR | GEO ID%%metro file: gtf_in | GTF | GTF%%metro file: gmt_in | GMT | Gene sets%%metro file: net_in | TSV | Network%%metro file: report_html | HTML | Report%%metro file: bundle_zip | ZIP | Bundle%%metro file: shiny_html | HTML | Shiny%%metro file: plots_png | PNG | Plots%%metro line: rnaseq | RNA-seq counts | #2db572%%metro line: affy | Affymetrix microarray | #e6550d%%metro line: maxquant | MaxQuant proteomics | #0570b0%%metro line: geo | GEO SOFT file | #756bb1%%metro grid: data_prep | 0,0,2,1%%metro grid: differential | 1,0,1,1%%metro grid: functional | 2,0,1,1%%metro grid: reporting | 3,0,1,1%%metro grid: plots | 2,1,1,1%%metro off_track: gmt_in, net_in
graph LR subgraph data_prep [Data import and preparation] %%metro exit: right | rnaseq, affy, maxquant, geo meta_in[ ] matrix_in[ ] gtf_in[ ] cel_in[ ] mq_in[ ] geo_in[ ] gtf_to_table[GTF to table] affy_load[affy load] proteus[proteus] geoquery[GEOquery] validator[Validate] matrix_filter[Filter matrix]
meta_in -->|rnaseq,affy,maxquant,geo| validator matrix_in -->|rnaseq| validator gtf_in -->|rnaseq,maxquant| gtf_to_table gtf_to_table -->|rnaseq,maxquant| validator cel_in -->|affy| affy_load affy_load -->|affy| validator mq_in -->|maxquant| proteus proteus -->|maxquant| validator geo_in -->|geo| geoquery geoquery -->|geo| validator validator -->|rnaseq,affy,maxquant,geo| matrix_filter end
subgraph differential [Differential analysis] %%metro entry: left | rnaseq, affy, maxquant, geo %%metro exit: right | rnaseq, affy, maxquant, geo limma[limma] deseq2[DESeq2] dream[dream] propd[propd] annotate[Annotate results]
limma -->|rnaseq,affy| annotate deseq2 -->|rnaseq| annotate dream -->|rnaseq| annotate propd -->|rnaseq| annotate end
subgraph functional [Functional enrichment] %%metro entry: left | rnaseq, affy, maxquant, geo %%metro exit: right | rnaseq, affy, maxquant, geo gmt_in[ ] net_in[ ] gsea[GSEA] gprofiler2[gprofiler2] decoupler[decoupler] grea[grea]
gmt_in -->|rnaseq,affy,maxquant,geo| gsea net_in -->|rnaseq,affy,maxquant,geo| decoupler end
subgraph reporting [Reporting] %%metro entry: left | rnaseq, affy, maxquant, geo shinyngs[shinyngs] quarto[Quarto report] bundle[Zip bundle] shiny_html[ ] report_html[ ] bundle_zip[ ]
shinyngs -->|rnaseq,affy,maxquant,geo| shiny_html quarto -->|rnaseq,affy,maxquant,geo| report_html quarto -->|rnaseq,affy,maxquant,geo| bundle bundle -->|rnaseq,affy,maxquant,geo| bundle_zip end
subgraph plots [Plots] %%metro entry: left | rnaseq, affy, maxquant, geo plot_expl[Exploratory] plot_diff[Differential] plots_png[ ]
plot_expl -->|rnaseq,affy,maxquant,geo| plots_png plot_diff -->|rnaseq,affy,maxquant,geo| plots_png end
%% Inter-section edges matrix_filter -->|rnaseq,affy,maxquant,geo| limma matrix_filter -->|rnaseq| deseq2 matrix_filter -->|rnaseq| dream matrix_filter -->|rnaseq| propd %% Section 2 -> Section 3 (functional from differential results) limma -->|rnaseq,affy,maxquant,geo| gsea limma -->|rnaseq,affy,maxquant,geo| gprofiler2 limma -->|rnaseq,affy,maxquant,geo| decoupler limma -->|rnaseq| grea %% Section 2 -> Section 4 (plots are parallel, both from differential trunk) limma -->|rnaseq,affy,maxquant,geo| plot_expl limma -->|rnaseq,affy,maxquant,geo| plot_diff %% Section 2/3 -> Section 5 (reporting from differential + functional) limma -->|rnaseq,affy,maxquant,geo| shinyngs limma -->|rnaseq,affy,maxquant,geo| quarto gsea -->|rnaseq,affy,maxquant,geo| quarto gprofiler2 -->|rnaseq,affy,maxquant,geo| quarto decoupler -->|rnaseq,affy,maxquant,geo| quarto grea -->|rnaseq| quartoCLI command
nf-metro render examples/differentialabundance.mmd -o differentialabundance.svgRendered map
Differentialabundance Default
Same nf-core/differentialabundance map at default (uncentered) layout — useful for spotting regressions that only show with default port placement.
Mermaid source
%%metro title: nf-core/differentialabundance%%metro logo: examples/nf-core-differentialabundance_logo_light.png | examples/nf-core-differentialabundance_logo_dark.png%%metro style: dark%%metro legend: bl%%metro line_order: definition%%metro compact_offsets: true%%metro file: meta_in | YAML | Contrasts%%metro file: meta_in | CSV | Samples%%metro file: matrix_in | TSV | Matrix%%metro file: cel_in | CEL | Affy CEL%%metro file: mq_in | TSV | MaxQuant%%metro file: geo_in | STR | GEO ID%%metro file: gtf_in | GTF | GTF%%metro file: gmt_in | GMT | Gene sets%%metro file: net_in | TSV | Network%%metro file: report_html | HTML | Report%%metro file: bundle_zip | ZIP | Bundle%%metro file: shiny_html | HTML | Shiny%%metro file: plots_png | PNG | Plots%%metro line: rnaseq | RNA-seq counts | #2db572%%metro line: affy | Affymetrix microarray | #e6550d%%metro line: maxquant | MaxQuant proteomics | #0570b0%%metro line: geo | GEO SOFT file | #756bb1%%metro grid: data_prep | 0,0,2,1%%metro grid: differential | 1,0,1,1%%metro grid: functional | 2,0,1,1%%metro grid: reporting | 3,0,1,1%%metro grid: plots | 2,1,1,1%%metro off_track: gmt_in, net_in
graph LR subgraph data_prep [Data import and preparation] %%metro exit: right | rnaseq, affy, maxquant, geo meta_in[ ] matrix_in[ ] gtf_in[ ] cel_in[ ] mq_in[ ] geo_in[ ] gtf_to_table[GTF to table] affy_load[affy load] proteus[proteus] geoquery[GEOquery] validator[Validate] matrix_filter[Filter matrix]
meta_in -->|rnaseq,affy,maxquant,geo| validator matrix_in -->|rnaseq| validator gtf_in -->|rnaseq,maxquant| gtf_to_table gtf_to_table -->|rnaseq,maxquant| validator cel_in -->|affy| affy_load affy_load -->|affy| validator mq_in -->|maxquant| proteus proteus -->|maxquant| validator geo_in -->|geo| geoquery geoquery -->|geo| validator validator -->|rnaseq,affy,maxquant,geo| matrix_filter end
subgraph differential [Differential analysis] %%metro entry: left | rnaseq, affy, maxquant, geo %%metro exit: right | rnaseq, affy, maxquant, geo limma[limma] deseq2[DESeq2] dream[dream] propd[propd] annotate[Annotate results]
limma -->|rnaseq,affy| annotate deseq2 -->|rnaseq| annotate dream -->|rnaseq| annotate propd -->|rnaseq| annotate end
subgraph functional [Functional enrichment] %%metro entry: left | rnaseq, affy, maxquant, geo %%metro exit: right | rnaseq, affy, maxquant, geo gmt_in[ ] net_in[ ] gsea[GSEA] gprofiler2[gprofiler2] decoupler[decoupler] grea[grea]
gmt_in -->|rnaseq,affy,maxquant,geo| gsea net_in -->|rnaseq,affy,maxquant,geo| decoupler end
subgraph reporting [Reporting] %%metro entry: left | rnaseq, affy, maxquant, geo shinyngs[shinyngs] quarto[Quarto report] bundle[Zip bundle] shiny_html[ ] report_html[ ] bundle_zip[ ]
shinyngs -->|rnaseq,affy,maxquant,geo| shiny_html quarto -->|rnaseq,affy,maxquant,geo| report_html quarto -->|rnaseq,affy,maxquant,geo| bundle bundle -->|rnaseq,affy,maxquant,geo| bundle_zip end
subgraph plots [Plots] %%metro entry: left | rnaseq, affy, maxquant, geo plot_expl[Exploratory] plot_diff[Differential] plots_png[ ]
plot_expl -->|rnaseq,affy,maxquant,geo| plots_png plot_diff -->|rnaseq,affy,maxquant,geo| plots_png end
%% Inter-section edges matrix_filter -->|rnaseq,affy,maxquant,geo| limma matrix_filter -->|rnaseq| deseq2 matrix_filter -->|rnaseq| dream matrix_filter -->|rnaseq| propd %% Section 2 -> Section 3 (functional from differential results) limma -->|rnaseq,affy,maxquant,geo| gsea limma -->|rnaseq,affy,maxquant,geo| gprofiler2 limma -->|rnaseq,affy,maxquant,geo| decoupler limma -->|rnaseq| grea %% Section 2 -> Section 4 (plots are parallel, both from differential trunk) limma -->|rnaseq,affy,maxquant,geo| plot_expl limma -->|rnaseq,affy,maxquant,geo| plot_diff %% Section 2/3 -> Section 5 (reporting from differential + functional) limma -->|rnaseq,affy,maxquant,geo| shinyngs limma -->|rnaseq,affy,maxquant,geo| quarto gsea -->|rnaseq,affy,maxquant,geo| quarto gprofiler2 -->|rnaseq,affy,maxquant,geo| quarto decoupler -->|rnaseq,affy,maxquant,geo| quarto grea -->|rnaseq| quartoCLI command
nf-metro render examples/differentialabundance_default.mmd -o differentialabundance_default.svgRendered map
Genomeassembly Staggered
sanger-tol/genomeassembly with explicit `%%metro grid:` directives stacking each section in its own grid row. Regression fixture: cross-column junction routes were going backward in X.
Mermaid source
%%metro title: sanger-tol/genomeassembly%%metro style: dark%%metro line: long_reads | Long reads | #3d95fd%%metro line: hic_reads | Hi-C reads | #FA6863%%metro line: i10x_reads | 10X reads | #EB7AEB%%metro line: assemblies | Assembly | #24B064%%metro file: input_long_reads | FASTX%%metro file: input_hic_reads | CRAM%%metro file: input_10x_reads | FASTQ%%metro grid: raw_asm | 0, 0, 2%%metro grid: purging | 2, 2, 2%%metro grid: polishing | 4, 4, 2%%metro grid: scaffolding | 6, 6, 4%%metro grid: genome_statistics | 8, 8, 4%%metro line_order: span%%metro compact_offsets: true%%metro legend: bl
graph LR subgraph raw_asm [Raw assembly] %%metro exit: bottom | hic_reads %%metro exit: right | assemblies,long_reads input_long_reads[ ] input_hic_reads[ ] hifiasm[hifiasm] input_long_reads -->|long_reads| hifiasm input_hic_reads -->|hic_reads| hifiasm end subgraph purging [Purging] %%metro entry: left | assemblies,long_reads %%metro exit: right | assemblies purging_minimap2[minimap2] purge_dups[purge_dups] purging_minimap2 -->|assemblies,long_reads| purge_dups end subgraph polishing [Polishing] %%metro entry: left | assemblies %%metro exit: right | assemblies input_10x_reads[ ] longranger[Longranger] freebayes[FreeBayes] input_10x_reads -->|i10x_reads| longranger longranger -->|i10x_reads,assemblies| freebayes end subgraph scaffolding [Scaffolding] %%metro entry: left | assemblies %%metro entry: bottom | hic_reads %%metro exit: right | assemblies scaffolding_bwamem2[bwa-mem2] scaffolding_minimap2[minimap2] yahs[YaHS] pretextmap[PretextMap] juicer[Juicer] cooler[Cooler] scaffolding_bwamem2 -->|assemblies,hic_reads| yahs scaffolding_minimap2 -->|assemblies,hic_reads| yahs yahs -->|assemblies,hic_reads| pretextmap yahs -->|assemblies,hic_reads| juicer yahs -->|assemblies,hic_reads| cooler end subgraph genome_statistics [Genome QC] %%metro entry: left | assemblies asmstats[asmstats] gfastats[GFAStats] busco[BUSCO] merquryfk[MerquryFK] asmstats -->|assemblies| gfastats asmstats -->|assemblies| busco asmstats -->|assemblies| merquryfk end
%% Inter-section edges hifiasm -->|assemblies,long_reads| purging_minimap2 hifiasm -->|hic_reads| scaffolding_bwamem2 hifiasm -->|hic_reads| scaffolding_minimap2 hifiasm -->|assemblies| longranger hifiasm -->|assemblies| scaffolding_bwamem2 hifiasm -->|assemblies| scaffolding_minimap2 purge_dups -->|assemblies| longranger purge_dups -->|assemblies| scaffolding_bwamem2 purge_dups -->|assemblies| scaffolding_minimap2 freebayes -->|assemblies| scaffolding_bwamem2 freebayes -->|assemblies| scaffolding_minimap2 hifiasm -->|assemblies| asmstats purge_dups -->|assemblies| asmstats freebayes -->|assemblies| asmstats yahs -->|assemblies| asmstatsCLI command
nf-metro render examples/genomeassembly_staggered.mmd -o genomeassembly_staggered.svgRendered map
Rnaseq Lite
Simplified RNA-seq pipeline with three analysis routes.
Mermaid source
%%metro title: RNA-seq Lite%%metro style: dark%%metro line: star | STAR + Salmon | #2db572%%metro line: hisat | HISAT2 | #f5c542%%metro line: pseudo | Pseudo-alignment | #e63946
graph LR subgraph preprocessing [Pre-processing] input[Input] fastqc_raw[FastQC] fastp[FastP] trimgalore[Trim Galore!] fastqc_trim[FastQC] filter[SortMeRNA] fastqc_filt[FastQC]
input -->|star,hisat,pseudo| fastqc_raw fastqc_raw -->|star,hisat,pseudo| fastp fastqc_raw -->|star,hisat,pseudo| trimgalore fastp -->|star,hisat,pseudo| fastqc_trim trimgalore -->|star,hisat,pseudo| fastqc_trim fastqc_trim -->|star,hisat,pseudo| filter filter -->|star,hisat,pseudo| fastqc_filt end
subgraph genome_align [Genome alignment] star_align[STAR] hisat_align[HISAT2] umi_dedup[UMI-tools dedup] salmon_quant[Salmon] rsem_quant[featureCounts]
star_align -->|star| umi_dedup hisat_align -->|hisat| umi_dedup umi_dedup -->|star| salmon_quant umi_dedup -->|hisat| rsem_quant end
subgraph pseudo_align [Pseudo-alignment] salmon_pseudo[Salmon] tximport[tximport] summarized_exp[Sum. Exp.]
salmon_pseudo -->|pseudo| tximport tximport -->|pseudo| summarized_exp end
subgraph postprocessing [Post-processing] samtools[SAMtools] picard[Picard] bedtools[BEDTools] bigwig[bedGraphToBigWig]
samtools -->|star,hisat| picard picard -->|star,hisat| bedtools bedtools -->|star,hisat| bigwig end
subgraph qc_report [QC & Reporting] rseqc[RSeQC] dupradar[dupRadar] featurecounts[featureCounts] multiqc[MultiQC]
rseqc -->|star,hisat| dupradar dupradar -->|star,hisat| featurecounts featurecounts -->|star,hisat| multiqc end
fastqc_filt -->|star| star_align fastqc_filt -->|hisat| hisat_align fastqc_filt -->|pseudo| salmon_pseudo salmon_quant -->|star| samtools rsem_quant -->|hisat| samtools bigwig -->|star,hisat| rseqcCLI command
nf-metro render examples/topologies/rnaseq_lite.mmd -o rnaseq_lite.svgRendered map
Variant Calling
Variant calling pipeline with four lines sharing alignment.
Mermaid source
%%metro title: Variant Calling Pipeline%%metro style: dark%%metro line: wgs | Whole Genome | #2db572%%metro line: wes | Whole Exome | #0570b0%%metro line: panel | Targeted Panel | #f5c542%%metro line: rna_var | RNA Variants | #e63946
graph LR subgraph input_qc [Input & QC] input[Input] fastqc[FastQC] fastp[FastP] trimgalore[Trim Galore!] fastqc_trim[FastQC]
input -->|wgs,wes,panel,rna_var| fastqc fastqc -->|wgs,wes,panel,rna_var| fastp fastqc -->|wgs,wes,panel,rna_var| trimgalore fastp -->|wgs,wes,panel,rna_var| fastqc_trim trimgalore -->|wgs,wes,panel,rna_var| fastqc_trim end
subgraph alignment [Alignment] bwa[BWA-MEM2] star_align[STAR] samtools[SAMtools sort] markdup[MarkDuplicates] bqsr[BQSR]
bwa -->|wgs,wes,panel| samtools star_align -->|rna_var| samtools samtools -->|wgs,wes,panel,rna_var| markdup markdup -->|wgs,wes,panel,rna_var| bqsr end
subgraph dna_calling [DNA Variant Calling] haplotypecaller[HaplotypeCaller] deepvariant[DeepVariant] strelka[Strelka2] merge_vcf[Merge VCFs]
haplotypecaller -->|wgs| merge_vcf deepvariant -->|wes| merge_vcf strelka -->|panel| merge_vcf end
subgraph rna_calling [RNA Variant Calling] splitncigar[SplitNCigar] rna_hc[HaplotypeCaller] rna_filter[FilterVariants]
splitncigar -->|rna_var| rna_hc rna_hc -->|rna_var| rna_filter end
subgraph annotation [Annotation & Filtering] vep[VEP] snpsift[SnpSift] filter_pass[Filter PASS]
vep -->|wgs,wes,panel,rna_var| snpsift snpsift -->|wgs,wes,panel,rna_var| filter_pass end
subgraph reporting [Reporting] bcftools_stats[bcftools stats] multiqc[MultiQC]
bcftools_stats -->|wgs,wes,panel,rna_var| multiqc end
fastqc_trim -->|wgs,wes,panel| bwa fastqc_trim -->|rna_var| star_align bqsr -->|wgs| haplotypecaller bqsr -->|wes| deepvariant bqsr -->|panel| strelka bqsr -->|rna_var| splitncigar merge_vcf -->|wgs,wes,panel| vep rna_filter -->|rna_var| vep filter_pass -->|wgs,wes,panel,rna_var| bcftools_statsCLI command
nf-metro render examples/topologies/variant_calling.mmd -o variant_calling.svgRendered map
Foldback Exit Peeloff
An auto-folded serpentine (`%%metro fold_threshold: 15`) where a return-row section exit splits a bundle to two downstream sections: one line continues level along the row, the other turns down to a lower loop. Regression fixture for the peel-off lane crossover at the exit -- the reversal must follow the continuing line through the peel-off junction so it stays level.
Mermaid source
%%metro title: Fold-back exit peel-off%%metro style: dark%%metro fold_threshold: 15%%metro file: fastq_in | FASTQ%%metro file: report_out | HTML%%metro line: dna | DNA (Tumor + Normal) | #4a90d9%%metro line: rna | RNA (Tumor) | #e63946%%metro line: realignment | Realignment (RNA) | #f5c542%%metro line_order: definition%%metro legend: bl
graph LR subgraph preprocessing [Pre-processing & Alignment] fastq_in[ ] fastqc[FastQC] fastp[fastp] bwa_mem[BWA-mem/BWA-mem2] star[STAR] samtools_merge[SAMtools Merge]
fastq_in -->|dna,rna| fastqc fastqc -->|dna,rna| fastp fastp -->|dna| bwa_mem fastp -->|rna| star bwa_mem -->|dna| samtools_merge star -->|rna| samtools_merge end
subgraph gatk_preproc [GATK Preprocessing] markduplicates[MarkDuplicates] splitncigar[SplitNCigarReads] baserecalibrator[BaseRecalibrator] applybqsr[ApplyBQSR] samtools_stats[SAMtools Stats] mosdepth[Mosdepth]
markduplicates -->|dna| baserecalibrator markduplicates -->|rna| splitncigar splitncigar -->|rna| baserecalibrator baserecalibrator -->|dna,rna| applybqsr applybqsr -->|dna,rna| samtools_stats samtools_stats -->|dna,rna| mosdepth end
subgraph variant_calling [Variant Calling (parallel)] vc_fork[ ] mutect2[Mutect2] strelka[Strelka2] sage[SAGE] vc_join[ ]
vc_fork -->|dna,rna| mutect2 vc_fork -->|dna,rna| strelka vc_fork -->|dna,rna| sage mutect2 -->|dna,rna| vc_join strelka -->|dna,rna| vc_join sage -->|dna,rna| vc_join end
subgraph normalization [Normalization & Annotation] vt_decompose[VT Decompose] vt_normalize[VT Normalize] ensemblvep[Ensembl VEP]
vt_decompose -->|dna,rna| vt_normalize vt_normalize -->|dna,rna| ensemblvep end
subgraph consensus [Consensus & Filtering] vcf2maf[vcf2MAF] run_consensus[Consensus] maf_filtering[MAF Filtering]
vcf2maf -->|dna,rna| run_consensus run_consensus -->|dna,rna| maf_filtering end
subgraph realign [Realignment (RNA)] maf2bed[MAF2BED] extract_reads[Extract Reads] hisat2[HISAT2] markdup_re[MarkDuplicates] splitncigar_re[SplitNCigarReads] bqsr_re[BQSR] varcall_re[Variant Calling] norm_re[Normalization] annotate_re[Annotation] consensus_re[Consensus] filter_re[MAF Filtering]
maf2bed -->|realignment| extract_reads extract_reads -->|realignment| hisat2 hisat2 -->|realignment| markdup_re markdup_re -->|realignment| splitncigar_re splitncigar_re -->|realignment| bqsr_re bqsr_re -->|realignment| varcall_re varcall_re -->|realignment| norm_re norm_re -->|realignment| annotate_re annotate_re -->|realignment| consensus_re consensus_re -->|realignment| filter_re end
subgraph reporting [Reporting] rna_filter[RNA MAF Filtering] rna_filter -->|rna,realignment| multiqc multiqc[MultiQC] report_out[ ]
multiqc -->|rna,realignment| report_out end
%% Inter-section edges maf_filtering -->|realignment| maf2bed samtools_merge -->|dna,rna| markduplicates mosdepth -->|dna,rna| vc_fork vc_join -->|dna,rna| vt_decompose ensemblvep -->|dna,rna| vcf2maf filter_re -->|realignment| rna_filter maf_filtering -->|rna| rna_filterCLI command
nf-metro render examples/topologies/foldback_exit_peeloff.mmd -o foldback_exit_peeloff.svgRendered map
Rowmate Tb Side Entry Top Align
An auto-folded RNA-seq map whose row-0 Post-processing section is a TB section entered from the left. Regression fixture: the perpendicular entry approach occupies the band above the section's first station, so the content-hug shrink must not drop the section's box top below its feeder row-mate, floating its number badge beneath the rest of the grid row.
Mermaid source
%%metro title: TB side-entry row-mate top alignment%%metro style: light%%metro diamond_style: symmetric%%metro file: fastq_in | FASTQ%%metro file: report_bowtie2 | HTML%%metro line: star_rsem | Aligner: STAR, Quantification: RSEM | #0570b0%%metro line: star_salmon | Aligner: STAR, Quantification: Salmon (default) | #2db572%%metro line: bowtie2_salmon | Aligner: Bowtie2 (prokaryotic), Quantification: Salmon | #ff8c00%%metro line: hisat2 | Aligner: HISAT2, Quantification: None | #f5c542%%metro line: pseudo_salmon | Pseudo-aligner: Salmon, Quantification: Salmon | #e63946%%metro line: pseudo_kallisto | Pseudo-aligner: Kallisto, Quantification: Kallisto | #7b2d3b%%metro legend: bl%%metro logo_scale: 0.85
graph LR subgraph preprocessing [Pre-processing] %%metro exit: right | star_salmon, star_rsem, hisat2, bowtie2_salmon %%metro exit: bottom | pseudo_salmon, pseudo_kallisto fastq_in[ ] cat_fastq[cat FASTQ] fastqc_raw[FastQC] umi_tools_extract[UMI-tools Extract] fastp[fastp] trimgalore[Trim Galore!] fastqc_trimmed[FastQC] bbsplit[BBSplit] sortmerna[SortMeRNA] ribodetector[RiboDetector] bowtie2_rrna[Bowtie2] fastqc_filtered[FastQC] infer_strandedness[Infer Strand.]
fastq_in -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| cat_fastq cat_fastq -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_raw fastqc_raw -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| umi_tools_extract
umi_tools_extract -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastp umi_tools_extract -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| trimgalore fastp -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_trimmed trimgalore -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_trimmed
fastqc_trimmed -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| bbsplit bbsplit -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| sortmerna bbsplit -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| ribodetector bbsplit -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| bowtie2_rrna sortmerna -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_filtered ribodetector -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_filtered bowtie2_rrna -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| fastqc_filtered fastqc_filtered -->|pseudo_salmon,pseudo_kallisto,star_salmon,star_rsem,hisat2,bowtie2_salmon| infer_strandedness end
subgraph genome_align [Genome alignment & quantification] %%metro entry: left | star_salmon, star_rsem, hisat2, bowtie2_salmon %%metro exit: right | star_salmon, star_rsem %%metro exit: right | hisat2 star[STAR] hisat2_align[HISAT2] bowtie2_align[Bowtie2] rsem[RSEM] salmon_quant[Salmon] umi_tools_dedup[UMI-tools Dedup] tximport_ga[tximport] summarized_exp_ga[Sum. Exp.] multiqc_bowtie2[MultiQC] report_bowtie2[ ] _h1[hidden] _h2[hidden] _h3[hidden]
star -->|star_rsem,star_salmon| umi_tools_dedup hisat2_align -->|hisat2| umi_tools_dedup bowtie2_align -->|bowtie2_salmon| umi_tools_dedup umi_tools_dedup -->|star_rsem| rsem umi_tools_dedup -->|star_salmon,bowtie2_salmon| salmon_quant umi_tools_dedup -->|hisat2| _h1 _h1 -->|hisat2| _h2 _h2 -->|hisat2| _h3 salmon_quant -->|star_salmon,bowtie2_salmon| tximport_ga rsem -->|star_rsem| tximport_ga tximport_ga -->|star_salmon,star_rsem,bowtie2_salmon| summarized_exp_ga summarized_exp_ga -->|bowtie2_salmon| multiqc_bowtie2 multiqc_bowtie2 -->|bowtie2_salmon| report_bowtie2 end
subgraph pseudo_align [Pseudo-alignment & quantification] %%metro entry: left | pseudo_salmon, pseudo_kallisto salmon_pseudo[Salmon] kallisto[Kallisto] tximport_pa[tximport]
salmon_pseudo -->|pseudo_salmon| tximport_pa kallisto -->|pseudo_kallisto| tximport_pa end
subgraph postprocessing [Post-processing] %%metro direction: TB %%metro entry: left | star_salmon, star_rsem, hisat2 %%metro exit: bottom | star_salmon, star_rsem, hisat2 picard[Picard] bedtools[BEDTools] bedgraph[bedGraphToBigWig] stringtie[StringTie]
picard -->|star_salmon,star_rsem,hisat2| bedtools bedtools -->|star_salmon,star_rsem,hisat2| bedgraph bedgraph -->|star_salmon,star_rsem,hisat2| stringtie end
%% Inter-section edges infer_strandedness -->|star_salmon,star_rsem| star infer_strandedness -->|hisat2| hisat2_align infer_strandedness -->|bowtie2_salmon| bowtie2_align infer_strandedness -->|pseudo_salmon| salmon_pseudo infer_strandedness -->|pseudo_kallisto| kallisto summarized_exp_ga -->|star_salmon,star_rsem| picard _h3 -->|hisat2| picardCLI command
nf-metro render examples/topologies/rowmate_tb_side_entry_top_align.mmd -o rowmate_tb_side_entry_top_align.svgRendered map
Rowmate Tb Side Entry Top Align Grow
A row-0 TB Post-processing section entered from the left sits beside a tall fan section whose box top grows upward to fit a branch above its trunk. Regression fixture: when the feeder row-mate's top grows, the side-entered vertical section must follow it up rather than hugging its low content, keeping its number badge level with the rest of the grid row.
Mermaid source
%%metro title: TB side-entry row-mate top alignment%%metro line: sa | STAR / Salmon | #2db572%%metro line: sr | STAR / RSEM | #0570b0%%metro line: hs | HISAT2 | #f5c542%%metro line: bt | Bowtie2 (terminates) | #ff8c00%%metro grid: source | 0,0%%metro grid: align | 1,0%%metro grid: post | 2,0
graph LR subgraph source [Pre-processing] %%metro exit: right | sa, sr, hs, bt infer[Infer Strand.] end subgraph align [Alignment & quantification] %%metro entry: left | sa, sr, hs, bt %%metro exit: right | sa, sr, hs star[STAR] hisat[HISAT2] bowtie[Bowtie2] dedup[Dedup] rsem[RSEM] salmon[Salmon] sumexp[Sum. Exp.] star -->|sa,sr| dedup hisat -->|hs| dedup bowtie -->|bt| dedup dedup -->|sr| rsem dedup -->|sa,bt| salmon dedup -->|hs| sumexp rsem -->|sr| sumexp salmon -->|sa,bt| sumexp end subgraph post [Post-processing] %%metro direction: TB %%metro entry: left | sa, sr, hs %%metro exit: bottom | sa, sr, hs picard[Picard] bedtools[BEDTools] bigwig[bigWig] stringtie[StringTie] picard -->|sa,sr,hs| bedtools bedtools -->|sa,sr,hs| bigwig bigwig -->|sa,sr,hs| stringtie end infer -->|sa,sr,hs,bt| star sumexp -->|sa,sr,hs| picardCLI command
nf-metro render examples/topologies/rowmate_tb_side_entry_top_align_grow.mmd -o rowmate_tb_side_entry_top_align_grow.svgRendered map
Seqinspector
nf-core/seqinspector with an explicit `%%metro grid:` stacking two single-row sections (Run Folder, BAM Files) in the column beside a rowspan-2 FASTQ section. Regression fixture: the stacked sections must fill the rowspan band -- the top one's box top meets the band top (instead of a fan poking into the title) and the bottom one's box bottom meets the band bottom (instead of floating high with slack below).
Mermaid source
%%metro title: nf-core/seqinspector%%metro style: dark%%metro logo: examples/showcase/nf-core-seqinspector_logo_light.png | examples/showcase/nf-core-seqinspector_logo_dark.png
%%metro line: run_folder | Run Folder | #1f77b4%%metro line: fastq_files | FASTQ Files | #ff7f0e%%metro line: bam_files | BAM Files | #24B064
%%metro file: fastq_in | FASTQ | | banner%%metro dir: rundir_in | RUNDIR%%metro file: multiqc | HTML | | banner%%metro center_ports: true%%metro compact_offsets: true%%metro legend: bl%%metro grid: fastq_files | 0,0,2%%metro grid: run_folder | 1,0%%metro grid: bam_files | 1,1%%metro grid: multiqc | 2,0,2
graph LR subgraph fastq_files [FASTQ Files] fastq_in[ ]
bbmap[BBMap Clumpify] fastp[FastP] fastqc[FASTQC] fastqe[FASTQE] fastqscreen[FastQ Screen] fq_lint[FQ Lint] kraken2[Kraken2] krona[Krona] seqfu[SeqFu Stats] seqkit[SeqKit Stats] seqtk[Seqtk sample] sequali[Sequali] toulligqc[ToulligQC]
fastq_in -->|fastq_files| seqtk
seqtk -->|fastq_files| kraken2 kraken2 -->|fastq_files| krona
subgraph bam_files [BAM Files] bwamem2[BWAmem2]
picardhs[Picard collecthsmetrics] picardmultiple[Picard collectmultiplemetrics] riker[Riker multi]
bwamem2 -->|bam_files| picardhs bwamem2 -->|bam_files| picardmultiple bwamem2 -->|bam_files| riker end
seqtk -->|fastq_files| bbmap seqtk -->|fastq_files| bwamem2 seqtk -->|fastq_files| fastp seqtk -->|fastq_files| fastqc seqtk -->|fastq_files| fastqe seqtk -->|fastq_files| fastqscreen seqtk -->|fastq_files| fq_lint seqtk -->|fastq_files| seqfu seqtk -->|fastq_files| seqkit seqtk -->|fastq_files| sequali seqtk -->|fastq_files| toulligqc end
subgraph run_folder [Run Folder] rundir_in[ ]
checkqc[CheckQC] rundirparser[Rundirparser]
rundir_in -->|run_folder| checkqc rundir_in -->|run_folder| rundirparser end
subgraph multiqc [MultiQC] multiqc[MultiQC]
bbmap -->|fastq_files| multiqc checkqc -->|run_folder| multiqc fastp -->|fastq_files| multiqc fastqc -->|fastq_files| multiqc fastqe -->|fastq_files| multiqc fastqscreen -->|fastq_files| multiqc fq_lint -->|fastq_files| multiqc krona -->|fastq_files| multiqc picardhs -->|bam_files| multiqc picardmultiple -->|bam_files| multiqc riker -->|bam_files| multiqc rundirparser -->|run_folder| multiqc seqfu -->|fastq_files| multiqc seqkit -->|fastq_files| multiqc sequali -->|fastq_files| multiqc toulligqc -->|fastq_files| multiqc endCLI command
nf-metro render examples/showcase/seqinspector.mmd -o seqinspector.svgRendered map
Basic Topologies
Single Section
One section, one line. The simplest possible case.
Mermaid source
%%metro title: Single Section%%metro style: dark%%metro line: main | Main | #e63946
graph LR subgraph only [Only Section] a[Input] b[Process] c[Output] a -->|main| b b -->|main| c endCLI command
nf-metro render examples/topologies/single_section.mmd -o single_section.svgRendered map
Deep Linear
Seven sections in a straight chain. Exercises the grid fold threshold.
Mermaid source
%%metro title: Deep Linear Chain%%metro style: dark%%metro line: main | Main | #e63946%%metro line: alt | Alternative | #2db572
graph LR subgraph sec1 [Input] s1a[Read] s1b[Validate] s1a -->|main,alt| s1b end
subgraph sec2 [QC] s2a[FastQC] s2b[MultiQC] s2a -->|main,alt| s2b end
subgraph sec3 [Trim] s3a[Trim] s3b[Filter] s3c[Check] s3a -->|main| s3b s3a -->|alt| s3b s3b -->|main,alt| s3c end
subgraph sec4 [Align] s4a[Index] s4b[Map] s4c[Sort] s4a -->|main,alt| s4b s4b -->|main,alt| s4c end
subgraph sec5 [Quant] s5a[Count] s5b[Normalize] s5a -->|main,alt| s5b end
subgraph sec6 [Analysis] s6a[Diff Expr] s6b[Pathway] s6c[Annotate] s6a -->|main,alt| s6b s6b -->|main,alt| s6c end
subgraph sec7 [Report] s7a[Aggregate] s7b[Report] s7a -->|main,alt| s7b end
s1b -->|main,alt| s2a s2b -->|main,alt| s3a s3c -->|main,alt| s4a s4c -->|main,alt| s5a s5b -->|main,alt| s6a s6c -->|main,alt| s7aCLI command
nf-metro render examples/topologies/deep_linear.mmd -o deep_linear.svgRendered map
Parallel Independent
Two disconnected pipelines stacked vertically.
Mermaid source
%%metro title: Parallel Independent%%metro style: dark%%metro line: dna | DNA Pipeline | #e63946%%metro line: rna | RNA Pipeline | #0570b0
graph LR subgraph dna_input [DNA Input] di1[Read DNA] di2[QC DNA] di1 -->|dna| di2 end
subgraph dna_process [DNA Process] dp1[Align DNA] dp2[Call Variants] dp1 -->|dna| dp2 end
subgraph rna_input [RNA Input] ri1[Read RNA] ri2[QC RNA] ri1 -->|rna| ri2 end
subgraph rna_process [RNA Process] rp1[Align RNA] rp2[Quantify] rp1 -->|rna| rp2 end
di2 -->|dna| dp1 ri2 -->|rna| rp1CLI command
nf-metro render examples/topologies/parallel_independent.mmd -o parallel_independent.svgRendered map
Disconnected Components Fold
A folded disconnected-component layout (`%%metro fold_threshold: 3`). The main trunk folds into a serpentine while a wide standalone section stacks below it. Regression fixture for full clearance between the wide section and the folded trunk's bottom row.
Mermaid source
%%metro title: Disconnected Components (folded)%%metro style: dark%%metro fold_threshold: 3%%metro line: main | Main Pipeline | #e63946%%metro line: aux | Auxiliary Report | #0570b0
graph LR subgraph ingest [Ingest] in1[Read Input] in2[Validate] in1 -->|main| in2 end
subgraph process [Process] pr1[Align] pr2[Filter] pr1 -->|main| pr2 end
subgraph results [Results] re1[Summarise] re2[Publish] re1 -->|main| re2 end
subgraph wide_report [Standalone QC Report] w1[Collect] w2[Aggregate] w3[Annotate] w4[Normalise] w5[Visualise] w6[Export] w1 -->|aux| w2 w2 -->|aux| w3 w3 -->|aux| w4 w4 -->|aux| w5 w5 -->|aux| w6 end
in2 -->|main| pr1 pr2 -->|main| re1CLI command
nf-metro render examples/topologies/disconnected_components_fold.mmd -o disconnected_components_fold.svgRendered map
Mismatched Tracks
Lines with mismatched track counts at shared stations.
Mermaid source
%%metro title: Mismatched Tracks%%metro style: dark%%metro line: a | Alpha | #0570b0%%metro line: b | Beta | #2db572%%metro line: c | Gamma | #e31a1c%%metro line: d | Delta | #ff7f00%%metro line: e | Epsilon | #6a3d9a
graph LR subgraph tall [Tall Section] t_start[Start] t_a[Path A] t_b[Path B] t_c[Path C] t_d[Path D] t_e[Path E] t_end[End] t_start -->|a| t_a t_start -->|b| t_b t_start -->|c| t_c t_start -->|d| t_d t_start -->|e| t_e t_a -->|a| t_end t_b -->|b| t_end t_c -->|c| t_end t_d -->|d| t_end t_e -->|e| t_end end
subgraph short_a [Short A] sa1[Proc A] sa2[Done A] sa1 -->|a| sa2 end
subgraph short_b [Short B] sb1[Proc B] sb2[Done B] sb1 -->|b| sb2 end
t_end -->|a| sa1 t_end -->|b| sb1CLI command
nf-metro render examples/topologies/mismatched_tracks.mmd -o mismatched_tracks.svgRendered map
Self Crossing Bridge
One colour whose vertical bus crosses its own independent horizontal connector earns a bridge gap (same-colour crossover, not a fan).
Mermaid source
%%metro title: Self-Crossing Bridge%%metro style: dark%%metro line: bus | Bus | #0570b0
%%metro grid: top | 0,0%%metro grid: bus_sink | 0,2%%metro grid: mid_src | 0,1%%metro grid: mid_sink | 1,1
graph LR subgraph top [Top] t1[Top In] t2[Top Out] t1 -->|bus| t2 end
subgraph mid_src [Mid Source] m1[Mid In] m2[Mid Out] m1 -->|bus| m2 end
subgraph mid_sink [Mid Sink] ms1[Mid Collect] ms2[Mid Report] ms1 -->|bus| ms2 end
subgraph bus_sink [Bus Sink] b1[Bus Collect] b2[Bus Report] b1 -->|bus| b2 end
t2 -->|bus| b1 m2 -->|bus| ms1CLI command
nf-metro render examples/topologies/self_crossing_bridge.mmd -o self_crossing_bridge.svgRendered map
Fan-out and Fan-in
Fork Join Interior Label
A three-way fork-join whose wide middle-branch label sits inside the loop. The loop widens symmetrically so the interior label clears the diverging and reconverging bundles on both sides, keeping the branch centred.
Mermaid source
%%metro title: Fork-join interior label%%metro diamond_style: symmetric%%metro line: star_rsem | STAR / RSEM | #0570b0%%metro line: star_salmon | STAR / Salmon | #2db572%%metro line: hisat2 | HISAT2 | #f5c542%%metro line: bowtie2_salmon | Bowtie2 / Salmon | #ff8c00%%metro line: pseudo_salmon | Salmon | #e63946%%metro line: pseudo_kallisto | Kallisto | #7b2d3b
graph LR subgraph rrna [rRNA removal] bbsplit[BBSplit] sortmerna[SortMeRNA] ribodetector[RiboDetector] bowtie2_rrna[Bowtie2] fastqc[FastQC]
bbsplit -->|star_rsem,star_salmon,hisat2,bowtie2_salmon,pseudo_salmon,pseudo_kallisto| sortmerna bbsplit -->|star_rsem,star_salmon,hisat2,bowtie2_salmon,pseudo_salmon,pseudo_kallisto| ribodetector bbsplit -->|star_rsem,star_salmon,hisat2,bowtie2_salmon,pseudo_salmon,pseudo_kallisto| bowtie2_rrna sortmerna -->|star_rsem,star_salmon,hisat2,bowtie2_salmon,pseudo_salmon,pseudo_kallisto| fastqc ribodetector -->|star_rsem,star_salmon,hisat2,bowtie2_salmon,pseudo_salmon,pseudo_kallisto| fastqc bowtie2_rrna -->|star_rsem,star_salmon,hisat2,bowtie2_salmon,pseudo_salmon,pseudo_kallisto| fastqc endCLI command
nf-metro render examples/topologies/fork_join_interior_label.mmd -o fork_join_interior_label.svgRendered map
Wide Fan Out
One source fanning out to four target sections.
Mermaid source
%%metro title: Wide Fan-Out%%metro style: dark%%metro line: alpha | Alpha | #e63946%%metro line: beta | Beta | #2db572%%metro line: gamma | Gamma | #0570b0%%metro line: delta | Delta | #f5c542
graph LR subgraph source [Source] input[Input] process[Process] input -->|alpha,beta,gamma,delta| process end
subgraph target_a [Target A] a1[Step A1] a2[Step A2] a1 -->|alpha| a2 end
subgraph target_b [Target B] b1[Step B1] b2[Step B2] b1 -->|beta| b2 end
subgraph target_c [Target C] c1[Step C1] c2[Step C2] c1 -->|gamma| c2 end
subgraph target_d [Target D] d1[Step D1] d2[Step D2] d1 -->|delta| d2 end
process -->|alpha| a1 process -->|beta| b1 process -->|gamma| c1 process -->|delta| d1CLI command
nf-metro render examples/topologies/wide_fan_out.mmd -o wide_fan_out.svgRendered map
Wide Fan In
Four sources converging into one target section.
Mermaid source
%%metro title: Wide Fan-In%%metro style: dark%%metro line: alpha | Alpha | #e63946%%metro line: beta | Beta | #2db572%%metro line: gamma | Gamma | #0570b0%%metro line: delta | Delta | #f5c542
graph LR subgraph src_a [Source A] a1[Step A1] a2[Step A2] a1 -->|alpha| a2 end
subgraph src_b [Source B] b1[Step B1] b2[Step B2] b1 -->|beta| b2 end
subgraph src_c [Source C] c1[Step C1] c2[Step C2] c1 -->|gamma| c2 end
subgraph src_d [Source D] d1[Step D1] d2[Step D2] d1 -->|delta| d2 end
subgraph sink [Sink] merge[Merge] output[Output] merge -->|alpha,beta,gamma,delta| output end
a2 -->|alpha| merge b2 -->|beta| merge c2 -->|gamma| merge d2 -->|delta| mergeCLI command
nf-metro render examples/topologies/wide_fan_in.mmd -o wide_fan_in.svgRendered map
Section Diamond
Section-level fork-join: fan-out then reconverge.
Mermaid source
%%metro title: Section Diamond%%metro style: dark%%metro line: left_path | Left Path | #e63946%%metro line: right_path | Right Path | #0570b0
graph LR subgraph start [Start] input[Input] prep[Prepare] input -->|left_path,right_path| prep end
subgraph branch_left [Branch Left] l1[Left Step 1] l2[Left Step 2] l3[Left Step 3] l1 -->|left_path| l2 l2 -->|left_path| l3 end
subgraph branch_right [Branch Right] r1[Right Step 1] r2[Right Step 2] r1 -->|right_path| r2 end
subgraph finish [Finish] merge[Merge] report[Report] merge -->|left_path,right_path| report end
prep -->|left_path| l1 prep -->|right_path| r1 l3 -->|left_path| merge r2 -->|right_path| mergeCLI command
nf-metro render examples/topologies/section_diamond.mmd -o section_diamond.svgRendered map
Uneven Diamond
Node-level fork-join whose branches differ in length; each branch holds its own track instead of collapsing the shorter ones together.
Mermaid source
%%metro title: Uneven fork-join diamond%%metro line: a | A | #f0a000 | solid%%metro line: b | B | #3a86ff | solid%%metro line: c | C | #2bb673 | solidgraph LR hub[Hub] -->|a| la[Leaf A] hub -->|b| lb[Leaf B] lb -->|b| lb2[Leaf B2] hub -->|c| lc[Leaf C] la -->|a| sink[Sink] lb2 -->|b| sink lc -->|c| sinkCLI command
nf-metro render examples/topologies/uneven_diamond.mmd -o uneven_diamond.svgRendered map
Symmetric Diamond Beside Wide Fan
A `diamond_style: symmetric` 2-way fork-join sharing a section with a wider 3-way fan. The 2-way diamond straddles its trunk evenly, but at full pitch -- as tall as the 3-way fan, with an empty trunk row between its branches -- because the half-pitch compaction is a per-section decision the mixed-fan section cannot qualify for (#1076).
Mermaid source
%%metro title: Symmetric diamond beside a wider fan%%metro diamond_style: symmetric%%metro line: l1 | Route 1 | #0570b0%%metro line: l2 | Route 2 | #2db572%%metro line: l3 | Route 3 | #f5c542%%metro line: l4 | Route 4 | #ff8c00%%metro line: l5 | Route 5 | #e63946%%metro line: l6 | Route 6 | #7b2d3b
graph LR subgraph prep [Pre-processing] extract[Extract] toolA[Tool A] toolB[Tool B] qc[QC] splitA[Split A] splitB[Split B] splitC[Split C] qc2[QC]
extract -->|l1,l2,l3,l4,l5,l6| toolA extract -->|l1,l2,l3,l4,l5,l6| toolB toolA -->|l1,l2,l3,l4,l5,l6| qc toolB -->|l1,l2,l3,l4,l5,l6| qc
qc -->|l1,l2,l3,l4,l5,l6| splitA qc -->|l1,l2,l3,l4,l5,l6| splitB qc -->|l1,l2,l3,l4,l5,l6| splitC splitA -->|l1,l2,l3,l4,l5,l6| qc2 splitB -->|l1,l2,l3,l4,l5,l6| qc2 splitC -->|l1,l2,l3,l4,l5,l6| qc2 endCLI command
nf-metro render examples/topologies/symmetric_diamond_beside_wide_fan.mmd -o symmetric_diamond_beside_wide_fan.svgRendered map
Symmetric Multiline Merge Median
Three metro lines on distinct tracks converging on one shared station under `diamond_style: symmetric`. The merge anchors on the median feeder track (the middle line) rather than the first-declared line's extreme track, so each feeder bends toward it by the least amount (#1277).
Mermaid source
%%metro title: Symmetric multi-line merge%%metro diamond_style: symmetric%%metro line: top | Top | #f5c542%%metro line: mid | Mid | #0570b0%%metro line: bottom | Bottom | #ff8c00
graph LR subgraph section1 [Section] %%metro entry: left | top, mid, bottom node_top[Top] node_mid[Mid] node_bottom[Bottom] merge[Merge]
node_top -->|top| merge node_mid -->|mid| merge node_bottom -->|bottom| merge endCLI command
nf-metro render examples/topologies/symmetric_multiline_merge_median.mmd -o symmetric_multiline_merge_median.svgRendered map
Terminal Symmetric Fan
A terminal section whose entry fans into equal-rank sinks; the fan stays symmetric about the entry port (regression lock for top-anchored terminal fans).
Mermaid source
%%metro title: Terminal Fan%%metro style: dark%%metro center_ports: true%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: source | 0,0%%metro grid: reporting | 1,0
graph LR subgraph source [Source] s1[Input] s2[Process] s1 -->|a,b| s2 end
subgraph reporting [Reporting] %%metro entry: left | a, b shiny[Shiny] multiqc[MultiQC] quarto[Quarto] end
s2 -->|a,b| shiny s2 -->|a,b| multiqc s2 -->|a,b| quartoCLI command
nf-metro render examples/topologies/terminal_symmetric_fan.mmd -o terminal_symmetric_fan.svgRendered map
Internal Source Equal Sibling 2Fan
An internal source station feeds exactly two equal-sibling branches (same line, same downstream join). The source is centred between its two consumers, which straddle it symmetrically, rather than staying collinear with one branch while the other peels off (#1223).
Mermaid source
%%metro title: Internal-source equal-sibling 2-fan%%metro center_ports: true
graph LR subgraph run_folder [Run Folder] rundir_in[ ] checkqc[CheckQC] rundirparser[Rundirparser] rundir_in -->|run_folder| checkqc rundir_in -->|run_folder| rundirparser end subgraph sink [Aggregate] out[MultiQC] checkqc -->|run_folder| out rundirparser -->|run_folder| out endCLI command
nf-metro render examples/topologies/internal_source_equal_sibling_2fan.mmd -o internal_source_equal_sibling_2fan.svgRendered map
Trunk Through Fan
A pass-through section: the trunk runs straight through a symmetric fan-and-reconverge, exit on the merge row (regression lock for detached reconvergence exits).
Mermaid source
%%metro title: Trunk Through Fan%%metro style: dark%%metro center_ports: true%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: source | 0,0%%metro grid: middle | 1,0%%metro grid: sink | 2,0
graph LR subgraph source [Source] s1[Input] s2[Prepare] s1 -->|a,b| s2 end
subgraph middle [Middle] %%metro entry: left | a, b %%metro exit: right | a, b split[Split] up[Path Up] down[Path Down] join[Join] split -->|a,b| up split -->|a,b| down up -->|a,b| join down -->|a,b| join end
subgraph sink [Sink] %%metro entry: left | a, b report[Report] end
s2 -->|a,b| split join -->|a,b| reportCLI command
nf-metro render examples/topologies/trunk_through_fan.mmd -o trunk_through_fan.svgRendered map
Wide Label Fan
A two-column fan whose station labels are wider than the column pitch; the engine wraps the labels and widens spacing so they don't collide.
Mermaid source
%%metro title: Wide Label Fan%%metro style: dark%%metro center_ports: true%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
graph LR subgraph proc [Reporting] %%metro entry: left | a, b hub[Aggregate] align[Alignment Summary] quant[Quantification Report] aqc[Alignment QC HTML] qqc[Quantification QC HTML] hub -->|a| align hub -->|b| quant align -->|a| aqc quant -->|b| qqc endCLI command
nf-metro render examples/topologies/wide_label_fan.mmd -o wide_label_fan.svgRendered map
Wrapped Label Trunk
A wrapped station label on a lower track whose block would grow into the metro line on the track above; the label is pulled back to its un-pushed anchor so the name clears the line.
Mermaid source
%%metro title: Wrapped label overlaps track above%%metro line: qc | Quality control | #f0a000 | solid%%metro line: align | Alignment | #3a86ff | solid%%metro line: quant | Quantification | #2bb673 | solidgraph LR input[Samplesheet] -->|qc,align,quant| trim[Trim Galore] trim -->|qc| fastqc[FastQC] trim -->|align,quant| index[Genome index] index -->|align| star[STAR] star -->|align| sort[Samtools sort] index -->|quant| salmon[Salmon] fastqc -->|qc| multiqc[MultiQC] sort -->|align| multiqc salmon -->|quant| multiqcCLI command
nf-metro render examples/topologies/wrapped_label_trunk.mmd -o wrapped_label_trunk.svgRendered map
Funcprofiler Upstream
A profiling section whose stacked tools share a fan-in/fan-out: a line the 'FMH FunProfiler' station does not carry would rake its wide below-station label, so the label flips to its clear side and the diagonal no longer strikes the glyphs.
Mermaid source
%%metro title: nf-core/funcprofiler (upstream)%%metro style: dark%%metro line: qc | Preprocessing & QC | #4CAF50%%metro line: concat | Merge & Concat | #2196F3%%metro line: db | Database Prep | #607D8B%%metro line: humann3 | HUMAnN v3 | #FF9800%%metro line: humann4 | HUMAnN v4 | #FF5722%%metro line: fmhfunprofiler | FMH FunProfiler | #E91E63%%metro line: rgi | RGI | #CDDC39%%metro line: mifaser | mifaser | #00BCD4%%metro line: diamond | DIAMOND | #9C27B0%%metro line: eggnog | eggNOG-mapper | #3F51B5%%metro line: multiqc | Reporting | #795548%%metro compact_offsets: true
graph LR subgraph input[Input] input_short([Short Reads]) input_dbs([Input Databases]) sr_qc(Preprocess) merge(MERGE_RUNS) end
subgraph profiling[Functional Profiling] humann3(HUMAnN v3) humann4(HUMAnN v4) fmhfunprofiler(FMH FunProfiler) RGI(RGI) mifaser(mifaser) diamond(DIAMOND) eggnog_mapper(eggNOG-mapper) end
subgraph QC[Quality Check] multiqc(MultiQC) end
subgraph Output[Output] output([Results Directory]) end
%% DB Prep input_dbs -->|db| humann3 input_dbs -->|db| humann4 input_dbs -->|db| fmhfunprofiler input_dbs -->|db| RGI input_dbs -->|db| mifaser input_dbs -->|db| diamond input_dbs -->|db| eggnog_mapper
%% Preprocessing input_short -->|qc| sr_qc sr_qc -->|concat| merge
%% Profiling split merge -->|humann3| humann3 merge -->|humann4| humann4 merge -->|fmhfunprofiler| fmhfunprofiler merge -->|rgi| RGI merge -->|mifaser| mifaser merge -->|diamond| diamond merge -->|eggnog| eggnog_mapper
%% Reporting sr_qc -->|multiqc| multiqc humann3 -->|multiqc| multiqc humann4 -->|multiqc| multiqc fmhfunprofiler -->|multiqc| multiqc RGI -->|multiqc| multiqc mifaser -->|multiqc| multiqc diamond -->|multiqc| multiqc eggnog_mapper -->|multiqc| multiqc
%% Output multiqc -->|multiqc| output humann3 -->|humann3| output humann4 -->|humann4| output fmhfunprofiler -->|fmhfunprofiler| output RGI -->|rgi| output mifaser -->|mifaser| output diamond -->|diamond| output eggnog_mapper -->|eggnog| outputCLI command
nf-metro render examples/topologies/funcprofiler_upstream.mmd -o funcprofiler_upstream.svgRendered map
Branching and Multipath
Asymmetric Tree
One root branching into three paths of different depths.
Mermaid source
%%metro title: Asymmetric Tree%%metro style: dark%%metro line: short | Short Branch | #e63946%%metro line: medium | Medium Branch | #2db572%%metro line: long | Long Branch | #0570b0
graph LR subgraph root [Root] input[Input] dispatch[Dispatch] input -->|short,medium,long| dispatch end
subgraph branch_short [Short] s1[Quick] s2[Result] s1 -->|short| s2 end
subgraph branch_med_1 [Medium Step 1] m1[Medium A] m2[Medium B] m1 -->|medium| m2 end
subgraph branch_med_2 [Medium Step 2] m3[Medium C] m4[Medium D] m3 -->|medium| m4 end
subgraph branch_long_1 [Long Step 1] l1[Long A] l2[Long B] l1 -->|long| l2 end
subgraph branch_long_2 [Long Step 2] l3[Long C] l4[Long D] l3 -->|long| l4 end
subgraph branch_long_3 [Long Step 3] l5[Long E] l6[Long F] l5 -->|long| l6 end
dispatch -->|short| s1 dispatch -->|medium| m1 dispatch -->|long| l1 m2 -->|medium| m3 l2 -->|long| l3 l4 -->|long| l5CLI command
nf-metro render examples/topologies/asymmetric_tree.mmd -o asymmetric_tree.svgRendered map
Complex Multipath
Four lines taking different routes through six sections.
Mermaid source
%%metro title: Complex Multipath%%metro style: dark%%metro line: fast | Fast Path | #e63946%%metro line: standard | Standard Path | #2db572%%metro line: detailed | Detailed Analysis | #0570b0%%metro line: legacy | Legacy Path | #f5c542
graph LR subgraph input_sec [Input] raw[Raw Data] validate[Validate] raw -->|fast,standard,detailed,legacy| validate end
subgraph fast_track [Fast Track] quick_align[Quick Align] quick_quant[Quick Quant] quick_align -->|fast| quick_quant end
subgraph full_preprocess [Full Pre-process] trim[Trim] filter[Filter] qc_check[QC Check] trim -->|standard,detailed,legacy| filter filter -->|standard,detailed,legacy| qc_check end
subgraph standard_analysis [Standard Analysis] align[Align] quant[Quantify] align -->|standard,legacy| quant end
subgraph deep_analysis [Deep Analysis] hq_align[HQ Align] dedup[Dedup] hq_quant[HQ Quantify] hq_align -->|detailed| dedup dedup -->|detailed| hq_quant end
subgraph output_sec [Output] aggregate[Aggregate] report[Report] aggregate -->|fast,standard,detailed,legacy| report end
validate -->|fast| quick_align validate -->|standard,detailed,legacy| trim qc_check -->|standard,legacy| align qc_check -->|detailed| hq_align quick_quant -->|fast| aggregate quant -->|standard,legacy| aggregate hq_quant -->|detailed| aggregateCLI command
nf-metro render examples/topologies/complex_multipath.mmd -o complex_multipath.svgRendered map
Interchange Lane Reorder
Two lanes share one step while a third lane is declared between them. Auto-layout reorders the interleaving lane to an outer track so the two members become adjacent and infer a clean interchange, instead of abstaining (issue #779).
Mermaid source
%%metro title: Interchange lane reorder%%metro style: dark%%metro line: top | Top | #d62728%%metro line: mid | Mid | #2db572%%metro line: bot | Bot | #f5c542
graph LR subgraph s [Parallel lanes] top_in[ ] mid_in[ ] bot_in[ ] hub[Shared step] mid_step[Mid step] top_out[ ] mid_out[ ] bot_out[ ] top_in -->|top| hub bot_in -->|bot| hub mid_in -->|mid| mid_step hub -->|top| top_out hub -->|bot| bot_out mid_step -->|mid| mid_out endCLI command
nf-metro render examples/topologies/interchange_lane_reorder.mmd -o interchange_lane_reorder.svgRendered map
Multi-line Bundles
Multi Line Bundle
Six lines travelling through the same three-section chain.
Mermaid source
%%metro title: Multi-Line Bundle%%metro style: dark%%metro line: line1 | Line 1 | #e63946%%metro line: line2 | Line 2 | #2db572%%metro line: line3 | Line 3 | #0570b0%%metro line: line4 | Line 4 | #f5c542%%metro line: line5 | Line 5 | #ff8c00%%metro line: line6 | Line 6 | #7b2d3b
graph LR subgraph input_sec [Input] raw[Raw] qc[QC] raw -->|line1,line2,line3,line4,line5,line6| qc end
subgraph process_sec [Processing] align[Align] sort[Sort] dedup[Dedup] align -->|line1,line2,line3,line4,line5,line6| sort sort -->|line1,line2,line3,line4,line5,line6| dedup end
subgraph output_sec [Output] quant[Quantify] report[Report] quant -->|line1,line2,line3,line4,line5,line6| report end
qc -->|line1,line2,line3,line4,line5,line6| align dedup -->|line1,line2,line3,line4,line5,line6| quantCLI command
nf-metro render examples/topologies/multi_line_bundle.mmd -o multi_line_bundle.svgRendered map
Mixed Port Sides
A section with both RIGHT and BOTTOM exits.
Mermaid source
%%metro title: Mixed Port Sides%%metro style: dark%%metro line: horizontal | Horizontal Flow | #e63946%%metro line: vertical | Vertical Flow | #0570b0
graph LR subgraph origin [Origin] start[Start] fork[Fork] start -->|horizontal,vertical| fork end
subgraph right_sec [Right Section] r1[Right A] r2[Right B] r1 -->|horizontal| r2 end
subgraph bottom_sec [Bottom Section] b1[Bottom A] b2[Bottom B] b1 -->|vertical| b2 end
fork -->|horizontal| r1 fork -->|vertical| b1CLI command
nf-metro render examples/topologies/mixed_port_sides.mmd -o mixed_port_sides.svgRendered map
Compact Hidden Passthrough
Compact mode keeps a hidden single-line pass-through station on its bundle slot so the two lines weave consistently through the section.
Mermaid source
%%metro title: Hidden Pass-through Compact%%metro style: dark%%metro compact_offsets: true%%metro line: a | Line A | #e63946%%metro line: b | Line B | #0570b0
graph LR subgraph src [Source] s1[Input A] s2[Input B] end
subgraph process [Process] _pass[hidden] p1[Step A] p2[Step B] _pass -->|a| p1 p1 -->|a,b| p2 end
subgraph report [Report] r1[Report] end
s1 -->|a| _pass s2 -->|b| p1 p2 -->|a,b| r1CLI command
nf-metro render examples/topologies/compact_hidden_passthrough.mmd -o compact_hidden_passthrough.svgRendered map
Compact Gap Peer Conflict
A fork-join whose hub carries non-consecutive offset slots safely abandons gap-compaction when a visible same-layer peer carries the intervening line, rather than cascading the reorder.
Mermaid source
%%metro title: Compaction Gap Peer Conflict%%metro style: dark%%metro line: alpha | Alpha | #e63946%%metro line: beta | Beta | #2db572%%metro line: gamma | Gamma | #0570b0
graph LR subgraph src [Source] s1[Input] s1 -->|alpha,beta,gamma| s2 s2[Prepare] end
subgraph proc [Process] %%metro entry: left | alpha, beta, gamma %%metro exit: right | alpha, beta, gamma p1[Fork] p2[Alpha Gamma] p3[Beta Node] p4[Merge] p1 -->|alpha,gamma| p2 p1 -->|beta| p3 p2 -->|alpha,gamma| p4 p3 -->|beta| p4 end
subgraph sink [Sink] t1[End] end
s2 -->|alpha,beta,gamma| p1 p4 -->|alpha,beta,gamma| t1CLI command
nf-metro render examples/topologies/compact_gap_peer_conflict.mmd -o compact_gap_peer_conflict.svgRendered map
Bundle Terminator Continuation
A two-line bundle enters a station where one line terminates while the other continues to a single successor. The successor holds the trunk row rather than dropping to its own line base, so the chain runs flat instead of dipping into a V-kink before the section exit.
Mermaid source
%%metro title: Bundle Terminator Continuation%%metro style: dark%%metro line: qc | QC | #2dd4bf%%metro line: main | Main | #c792ea
graph LR subgraph proc [Processing] fastqc[FastQC] trim[Trim] align[Align] fastqc -->|qc,main| trim trim -->|main| align endCLI command
nf-metro render examples/topologies/bundle_terminator_continuation.mmd -o bundle_terminator_continuation.svgRendered map
Aligner Row Terminator Lane Gap
Four aligner lines enter a section together, but one (Bowtie2/Salmon) peels off to MultiQC and terminates inside the section instead of reaching its shared exit port. HISAT2, which does exit, sits on a contiguous offset there rather than inheriting a gap reserved for the terminated line, so its connector into the next section runs level instead of kinking into a short diagonal (issue #1263).
Mermaid source
%%metro title: Aligner row vs pinned continuation%%metro line: star_rsem | STAR/RSEM | #0570b0%%metro line: star_salmon | STAR/Salmon | #2db572%%metro line: bowtie2_salmon | Bowtie2/Salmon | #ff8c00%%metro line: hisat2 | HISAT2 | #f5c542
graph LR subgraph preproc [Pre-processing] %%metro exit: right | star_salmon, star_rsem, hisat2, bowtie2_salmon fastqc_filtered[FastQC] end
subgraph genome_align [Genome alignment & quantification] %%metro entry: left | star_salmon, star_rsem, hisat2, bowtie2_salmon %%metro exit: right | star_salmon, star_rsem %%metro exit: right | hisat2 star[STAR] hisat2_align[HISAT2] bowtie2_align[Bowtie2] rsem[RSEM] salmon_quant[Salmon] umi_tools_dedup[UMI-tools Dedup] tximport_ga[tximport] summarized_exp_ga[Sum. Exp.] multiqc_bowtie2[MultiQC] report_bowtie2[ ] _h1[hidden] _h2[hidden] _h3[hidden]
star -->|star_rsem,star_salmon| umi_tools_dedup hisat2_align -->|hisat2| umi_tools_dedup bowtie2_align -->|bowtie2_salmon| umi_tools_dedup umi_tools_dedup -->|star_rsem| rsem umi_tools_dedup -->|star_salmon| salmon_quant umi_tools_dedup -->|hisat2| _h1 _h1 -->|hisat2| _h2 _h2 -->|hisat2| _h3 salmon_quant -->|star_salmon| tximport_ga rsem -->|star_rsem| tximport_ga tximport_ga -->|star_salmon,star_rsem| summarized_exp_ga umi_tools_dedup -->|bowtie2_salmon| salmon_quant salmon_quant -->|bowtie2_salmon| multiqc_bowtie2 multiqc_bowtie2 -->|bowtie2_salmon| report_bowtie2 end
subgraph postproc [Post-processing] %%metro direction: TB %%metro entry: left | star_salmon, star_rsem, hisat2 samtools[SAMtools] picard[Picard]
samtools -->|star_salmon,star_rsem,hisat2| picard end
fastqc_filtered -->|star_salmon,star_rsem| star fastqc_filtered -->|hisat2| hisat2_align fastqc_filtered -->|bowtie2_salmon| bowtie2_align summarized_exp_ga -->|star_salmon,star_rsem| samtools _h3 -->|hisat2| samtoolsCLI command
nf-metro render examples/topologies/aligner_row_terminator_lane_gap.mmd -o aligner_row_terminator_lane_gap.svgRendered map
TB / BT Sections
Bt Chain
A `%%metro direction: BT` (bottom-to-top) section: a three-station chain whose flow runs up the column, the vertical mirror of a TB chain (#1044).
Mermaid source
%%metro title: BT Chain%%metro style: dark%%metro line: a | A | #e63946
graph LR subgraph work [Work] %%metro direction: BT w1[First] w2[Second] w3[Third] w1 -->|a| w2 w2 -->|a| w3 endCLI command
nf-metro render examples/topologies/bt_chain.mmd -o bt_chain.svgRendered map
Bt Fork
A symmetric fan-out inside a `%%metro direction: BT` section: the hub sits at the bottom and both branches fan upward, the lane bundle riding the `+x` side as the rotation image of a TB fork (#1044).
Mermaid source
%%metro title: BT Fork%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
graph LR subgraph work [Work] %%metro direction: BT hub[Demux] left[Lane A] right[Lane B] hub -->|a,b| left hub -->|a,b| right endCLI command
nf-metro render examples/topologies/bt_fork.mmd -o bt_fork.svgRendered map
Bt Perp Entry Below
A BT section fed from below: a lower BT section's trailing TOP exit continues up the shared lane into an upper BT section's BOTTOM entry, a two-line bundle riding one column across the seam (#1044).
Mermaid source
%%metro title: BT Fed From Below%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: top_sec | 0,0%%metro grid: bot_sec | 0,1
graph LR subgraph top_sec [Upper] %%metro direction: BT %%metro entry: bottom | a,b t1[Refine] t2[Report] t1 -->|a,b| t2 end
subgraph bot_sec [Lower] %%metro direction: BT b1[Ingest] b2[Clean] b1 -->|a,b| b2 end
b2 -->|a,b| t1CLI command
nf-metro render examples/topologies/bt_perp_entry_below.mmd -o bt_perp_entry_below.svgRendered map
Bt Exit Top Above
A BT section's trailing TOP exit dropping up into the BOTTOM entry of an LR section stacked above it (#1044).
Mermaid source
%%metro title: BT Exit Top Into Section Above%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: dst_sec | 0,0%%metro grid: work | 0,1
graph LR subgraph dst_sec [Output] %%metro direction: LR %%metro entry: bottom | a o1[Report] o2[Archive] o1 -->|a| o2 end
subgraph work [Work] %%metro direction: BT %%metro exit: top | a w1[Process] w2[Collect] w1 -->|a| w2 end
w2 -->|a| o1CLI command
nf-metro render examples/topologies/bt_exit_top_above.mmd -o bt_exit_top_above.svgRendered map
Bt Exit Top Above 2Line
The two-line form of the BT TOP-exit drop into an LR BOTTOM entry: the bundle keeps its lane across the perpendicular boundary, the BT feeder fanning +x rather than the downward-TB -x (#1066).
Mermaid source
%%metro title: BT Exit Top Into Section Above (2 lines)%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: dst_sec | 0,0%%metro grid: work | 0,1
graph LR subgraph dst_sec [Output] %%metro direction: LR %%metro entry: bottom | a,b o1[Report] o2[Archive] o1 -->|a,b| o2 end
subgraph work [Work] %%metro direction: BT %%metro exit: top | a,b w1[Process] w2[Collect] w1 -->|a,b| w2 end
w2 -->|a,b| o1CLI command
nf-metro render examples/topologies/bt_exit_top_above_2line.mmd -o bt_exit_top_above_2line.svgRendered map
Bt To Lr
A BT section's trailing TOP (perpendicular) exit taking the up-and-over corridor into the LEFT entry of a neighbouring LR section, a two-line bundle staying parallel across the seam (#1044).
Mermaid source
%%metro title: BT Perp Exit Into LR%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: work | 0,0%%metro grid: out_sec | 1,0
graph LR subgraph work [Work] %%metro direction: BT %%metro exit: top | a,b w1[Demux] w2[Merge] w1 -->|a,b| w2 end
subgraph out_sec [Output] %%metro direction: LR %%metro entry: left | a,b o1[Publish] o2[Notify] o1 -->|a,b| o2 end
w2 -->|a,b| o1CLI command
nf-metro render examples/topologies/bt_to_lr.mmd -o bt_to_lr.svgRendered map
Bt To Tb
A BT section's RIGHT exit feeding a TB section's LEFT entry: an upward flow handing off to a downward one across the column seam (#1044).
Mermaid source
%%metro title: BT Into TB%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: up_sec | 0,0%%metro grid: down_sec | 1,0
graph LR subgraph up_sec [Ascend] %%metro direction: BT %%metro exit: right | a,b u1[Collect] u2[Reduce] u1 -->|a,b| u2 end
subgraph down_sec [Descend] %%metro direction: TB %%metro entry: left | a,b d1[Split] d2[Emit] d1 -->|a,b| d2 end
u2 -->|a,b| d1CLI command
nf-metro render examples/topologies/bt_to_tb.mmd -o bt_to_tb.svgRendered map
Tb Fork Lane Transpose
A vertical-flow (TB) section whose trunk station forks one line down to an in-section file terminus and the other out to a side exit through a bypass helper. The bypassing line rides the section's lane side of the trunk, so its fork leg reaches the bypass without crossing the straight-down terminus leg (issue #1163).
Mermaid source
%%metro title: TB Fork Lane Transpose%%metro style: dark%%metro file: vcf_out | VCF%%metro line: main | Main | #2db572%%metro line: qc | QC | #0570b0
graph LR subgraph prep [Prep] in0[ ] align[Align] in0 -->|main| align end subgraph calling [Calling] %%metro direction: TB caller1[Caller A] caller2[Caller B] stats[Stats] vcf_out[ ] caller1 -->|main| stats caller2 -->|main| stats stats -->|main| vcf_out end subgraph report [Report] mqc[MultiQC] end align -->|main| caller1 align -->|main| caller2 stats -->|qc| mqcCLI command
nf-metro render examples/topologies/tb_fork_lane_transpose.mmd -o tb_fork_lane_transpose.svgRendered map
Tb Passthrough Trunk
A three-line bundle running straight down a linear chain of stations in a `%%metro direction: TB` section. The trunk passes through each station as a clean vertical column: every line holds one offset, so no station reads as an elbow.
Mermaid source
%%metro title: TB pass-through trunk%%metro style: dark%%metro line: rna | RNA-seq | #1f9e89%%metro line: affy | Affymetrix | #e6550d%%metro line: mq | MaxQuant | #0570b0
%%metro file: bundle_zip | ZIP | Bundle
graph LR subgraph analysis [Analysis] align[Align] call[Call] align -->|rna,affy,mq| call end
subgraph reporting [Reporting] %%metro direction: TB %%metro entry: left | rna, affy, mq collect[Collect] annotate[Annotate] package[Package] bundle_zip[ ]
collect -->|rna,affy,mq| annotate annotate -->|rna,affy,mq| package package -->|rna,affy,mq| bundle_zip end
call -->|rna,affy,mq| collectCLI command
nf-metro render examples/topologies/tb_passthrough_trunk.mmd -o tb_passthrough_trunk.svgRendered map
Tb Internal Diagonal
A symmetric fan-out inside a `%%metro direction: TB` section: the hub centres over its two branch stations, which sit on X tracks either side of it, so both internal edges route as 45-degree diagonals (the `_route_tb_internal` diagonal arm) (#917).
Mermaid source
%%metro title: TB Internal Diagonal%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0%%metro grid: source | 0,0%%metro grid: work | 1,0
graph LR subgraph source [Source] s1[Start] s2[End] s1 -->|a,b| s2 end subgraph work [Work] %%metro direction: TB %%metro entry: top | a,b hub[Demux] left[Lane A] right[Lane B] hub -->|a,b| left hub -->|a,b| right end s2 -->|a,b| hubCLI command
nf-metro render examples/topologies/tb_internal_diagonal.mmd -o tb_internal_diagonal.svgRendered map
Tb Trunk Through Fan
An asymmetric fan-out inside a `%%metro direction: TB` section: one line continues straight down the trunk column to its child while a sibling peels off to another column. The continuation is slotted onto the trunk so it drops straight instead of jogging one offset step (#929).
Mermaid source
%%metro title: TB Trunk Through Fan%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: work | 0,0
graph LR subgraph work [Work] %%metro direction: TB hub[Split] main[Main] sink[Collect] branch[Branch] hub -->|a| main main -->|a| sink hub -->|b| branch endCLI command
nf-metro render examples/topologies/tb_trunk_through_fan.mmd -o tb_trunk_through_fan.svgRendered map
Tb Passthrough Continuation
A TB convergence that is not a sink: a diagonal feeder continues straight down to a station directly below the merge while a collinear feeder peels off. The continuation rides the trunk slot so it drops straight, instead of being forced outboard where it kinks at the merge and crosses the collinear feeder (issue #1012).
Mermaid source
%%metro title: TB Passthrough Continuation%%metro style: dark%%metro line: r | R | #0570b0%%metro line: g | G | #2db572%%metro line: y | Y | #f5c542
%%metro grid: work | 0,0
graph LR subgraph work [Work] %%metro direction: TB starN[StarN] hisatN[HisatN] leftchild[LeftChild] merge[Merge] tail[Tail] starN -->|r| leftchild starN -->|g| merge hisatN -->|y| merge merge -->|g| tail endCLI command
nf-metro render examples/topologies/tb_passthrough_continuation.mmd -o tb_passthrough_continuation.svgRendered map
Tb Column Continuation Two Lines
A TB section with a two-line BOTTOM exit continuing straight down into the TB section below. The exit port seats close to the last station with normal section padding rather than the doubled gap the fold-span extension would add (issue #1062).
Mermaid source
%%metro title: TB Column Continuation Two Lines%%metro style: dark%%metro line: alpha | Alpha | #e63946%%metro line: beta | Beta | #0570b0%%metro grid: top_sec | 0,0%%metro grid: bot_sec | 0,1
graph LR subgraph top_sec [Upper] %%metro direction: TB %%metro exit: bottom | alpha, beta t1[Refine] t2[Report] t1 -->|alpha,beta| t2 end subgraph bot_sec [Lower] %%metro direction: TB %%metro entry: top | alpha, beta b1[Ingest] b2[Clean] b1 -->|alpha,beta| b2 end t2 -->|alpha,beta| b1CLI command
nf-metro render examples/topologies/tb_column_continuation_two_lines.mmd -o tb_column_continuation_two_lines.svgRendered map
Tb Right Entry Stack
A two-line bundle into a stacked TB section's RIGHT entry from a same-row left source: it loops over the section top and descends into the port, the U-turn transposing the bundle, with concentric corners built via `build_concentric_bundle` (#707).
Mermaid source
%%metro title: TB Right-Entry Stack%%metro style: dark%%metro line: alpha | Alpha | #e63946%%metro line: beta | Beta | #0570b0%%metro grid: source | 0,0%%metro grid: upper | 1,0%%metro grid: lower | 1,1
graph LR subgraph source [Source] s1[Prepare A] s2[Prepare B] s1 -->|alpha| s2 end
subgraph upper [Upper] %%metro direction: TB %%metro entry: right | alpha, beta u1[Align] u2[Sort] u1 -->|alpha,beta| u2 end
subgraph lower [Lower] %%metro direction: TB %%metro entry: top | alpha, beta l1[Merge] l2[Report] l1 -->|alpha,beta| l2 end
s2 -->|alpha,beta| u1 u2 -->|alpha,beta| l1CLI command
nf-metro render examples/topologies/tb_right_entry_stack.mmd -o tb_right_entry_stack.svgRendered map
Tb Bottom Entry Flow Start
A `%%metro direction: TB` section given `%%metro entry: bottom` whose consumer is the flow-start (top) station. The bottom entry is re-anchored to the top so the line enters beside its consumer and flows down, rather than running up through MultiQC to reach Collect and folding back (#885).
Mermaid source
%%metro title: TB Bottom Entry Flow Start%%metro style: nfcore%%metro line: reads | Reads | #1f77b4
graph LR subgraph up [Up] a[A] b[B] a -->|reads| b end subgraph qc [QC] %%metro direction: TB %%metro entry: bottom | reads collect[Collect] multiqc[MultiQC] collect -->|reads| multiqc end b -->|reads| collectCLI command
nf-metro render examples/topologies/tb_bottom_entry_flow_start.mmd -o tb_bottom_entry_flow_start.svgRendered map
Tb Left Exit Step
A TB alignment section exits LEFT into a lower right-entry section with a blocker directly below: the exit bundle steps west-down-west, routed as a parallel staircase that keeps the feed order (issue #671).
Mermaid source
%%metro title: TB left-exit staircase into a lower right-entry (issue #671)%%metro line: a | Aligner A | #0570b0%%metro line: b | Aligner B | #2db572%%metro line: c | Aligner C | #f5c542%%metro line: d | Side | #e63946%%metro grid: src | 0,0%%metro grid: align | 1,0%%metro grid: blocker | 1,1%%metro grid: post | 0,2
graph LR subgraph src [Source] ingest[Ingest] end subgraph align [Align] %%metro direction: TB hub[Hub] tail[Tail] hub -->|a,b,c| tail end subgraph blocker [Side] side[Side step] end subgraph post [Post] collect[Collect] report[Report] collect -->|a,b,c| report end
ingest -->|a,b,c| hub ingest -->|d| side tail -->|a,b,c| collectCLI command
nf-metro render examples/topologies/tb_left_exit_step.mmd -o tb_left_exit_step.svgRendered map
Tb Lr Exit Left
A `%%metro direction: TB` section dropping in through its TOP entry and leaving through a LEFT exit into a section below-left (the `_route_tb_lr_exit` LEFT arm): the station drops, turns once, and runs out of the box's left side, the vertical leg fanned by the reversed station offset so the outermost line takes the widest arc (#917).
Mermaid source
%%metro title: TB Left Exit%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0%%metro grid: prep | 0,0%%metro grid: work | 1,0%%metro grid: report | 0,1
graph LR subgraph prep [Prep] p1[Start] p2[End] p1 -->|a,b| p2 end subgraph work [Work] %%metro direction: TB %%metro entry: top | a,b %%metro exit: left | a,b w1[Process] w2[Collect] w1 -->|a,b| w2 end subgraph report [Report] %%metro entry: right | a,b r1[Publish] end p2 -->|a,b| w1 w2 -->|a,b| r1CLI command
nf-metro render examples/topologies/tb_lr_exit_left.mmd -o tb_lr_exit_left.svgRendered map
Tb Lr Exit Right
A `%%metro direction: TB` section dropping in through its TOP entry and leaving through a RIGHT exit into the next forward section (the `_route_tb_lr_exit` RIGHT arm): the mirror of the LEFT exit, fanned by the exit port's own offset (#917).
Mermaid source
%%metro title: TB Right Exit%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0%%metro grid: prep | 0,0%%metro grid: work | 1,0%%metro grid: report | 2,0
graph LR subgraph prep [Prep] p1[Start] p2[End] p1 -->|a,b| p2 end subgraph work [Work] %%metro direction: TB %%metro entry: top | a,b %%metro exit: right | a,b w1[Process] w2[Collect] w1 -->|a,b| w2 end subgraph report [Report] %%metro entry: left | a,b r1[Publish] end p2 -->|a,b| w1 w2 -->|a,b| r1CLI command
nf-metro render examples/topologies/tb_lr_exit_right.mmd -o tb_lr_exit_right.svgRendered map
Tb Convergence Straight Drop
Two lines converge at a TB section's terminal merge; the feeder whose source is collinear with the merge drops dead straight while the sibling arrives diagonally, instead of the straight feeder kinking off its lane (issue #1007).
Mermaid source
%%metro title: TB Convergence Straight Drop%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: work | 0,0
graph LR subgraph work [Work] %%metro direction: TB top[Top] side[Side] merge[Merge] top -->|a| merge side -->|b| merge endCLI command
nf-metro render examples/topologies/tb_convergence_straight_drop.mmd -o tb_convergence_straight_drop.svgRendered map
Tb Bottom Exit Fork Diamond
A TB section's BOTTOM exit forks to two stacked TB sections in different rows, the lower also fed by the upper (a diamond). The fork junction's leg into the nearer TOP entry drops straight in its column rather than jogging sideways and reversing at the boundary, and the leg continuing to the far section rides the intervening section's own trunk for the shared line as one stroke (issue #1058).
Mermaid source
%%metro line: alpha | Alpha | #e63946%%metro grid: source | 0,0%%metro grid: feed | 1,0%%metro grid: mid | 1,1%%metro grid: sink | 1,2
graph LR subgraph source [Source] s1[Start] end subgraph feed [Feed] %%metro direction: TB %%metro entry: right | alpha %%metro exit: bottom | alpha f1[Align] f2[Sort] f1 -->|alpha| f2 end subgraph mid [Mid] %%metro direction: TB %%metro entry: top | alpha m1[Filter] m2[Classify] m1 -->|alpha| m2 end subgraph sink [Sink] %%metro direction: TB %%metro entry: top | alpha sk1[Merge] sk2[Report] sk1 -->|alpha| sk2 end s1 -->|alpha| f1 f2 -->|alpha| m1 f2 -->|alpha| sk1 m2 -->|alpha| sk1CLI command
nf-metro render examples/topologies/tb_bottom_exit_fork_diamond.mmd -o tb_bottom_exit_fork_diamond.svgRendered map
Tb Bottom Exit Bundle Jog
A four-line bundle leaves a TB section's BOTTOM exit and jogs down into the TOP entry of an RL section placed in the row below and one column to the left. The four lines keep distinct channels through the jog instead of collapsing onto one (issue #1074).
Mermaid source
%%metro title: TB bottom-exit jog multi-line%%metro line: l1 | L1 | #e6194b%%metro line: l2 | L2 | #3cb44b%%metro line: l3 | L3 | #4363d8%%metro line: l4 | L4 | #f58231%%metro grid: up | 1,0%%metro grid: down | 0,1
graph TB subgraph up [Up] %%metro direction: TB %%metro entry: top | l1, l2, l3, l4 %%metro exit: bottom | l1, l2, l3, l4 a[A] b[B] a -->|l1,l2,l3,l4| b end subgraph down [Down] %%metro direction: RL %%metro entry: top | l1, l2, l3, l4 cc[QC reporting node] dd[D] ee[E] cc -->|l1,l2,l3,l4| dd dd -->|l1,l2,l3,l4| ee end b -->|l1,l2,l3,l4| ccCLI command
nf-metro render examples/topologies/tb_bottom_exit_bundle_jog.mmd -o tb_bottom_exit_bundle_jog.svgRendered map
Tb Perp Exit Side Neighbour
A vertical-flow section's BOTTOM exit feeds a side LR neighbour sharing the exit's Y. The connector leaves the port down into the inter-row corridor clear of the box, runs across, then turns up into the entry, rather than running straight along the section's bottom edge and out through the corner (#1052).
Mermaid source
%%metro title: TB perp-exit into a side LR neighbour%%metro line: a | A | #e63946%%metro grid: work | 0,0%%metro grid: out_sec | 1,0graph LR subgraph work [Work] %%metro direction: TB %%metro exit: bottom | a w1[Demux] w2[Merge] w1 -->|a| w2 end subgraph out_sec [Output] %%metro direction: LR %%metro entry: left | a o1[Publish] end w2 -->|a| o1CLI command
nf-metro render examples/topologies/tb_perp_exit_side_neighbour.mmd -o tb_perp_exit_side_neighbour.svgRendered map
Tb Two Line Vert Seam
A vertical-flow section's RIGHT exit feeds another vertical-flow section's LEFT entry with a two-line bundle. The entry sits a station gap above the trunk head so both lines enter horizontally then drop straight onto their trunk lanes, rather than the staggered line slanting into the trunk for want of drop room (#1054).
Mermaid source
%%metro title: TB into TB, horizontal seam%%metro line: a | A | #e63946%%metro line: b | B | #0570b0%%metro grid: up_sec | 0,0%%metro grid: down_sec | 1,0graph LR subgraph up_sec [Left] %%metro direction: TB %%metro exit: right | a,b u1[Collect] u2[Reduce] u1 -->|a,b| u2 end subgraph down_sec [Right] %%metro direction: TB %%metro entry: left | a,b d1[Split] d2[Emit] d1 -->|a,b| d2 end u2 -->|a,b| d1CLI command
nf-metro render examples/topologies/tb_two_line_vert_seam.mmd -o tb_two_line_vert_seam.svgRendered map
Top Entry Header Clash
A TB section's title is long enough to reach under the trunk that drops into its TOP entry. Rather than route the line around the title, the header relocates below the box so the drop enters cleanly.
Mermaid source
%%metro title: Top Entry Header Clash%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: src_sec | 0,0%%metro grid: tgt_sec | 0,1
graph LR subgraph src_sec [Read QC] %%metro direction: LR s1[Trim] s2[Filter] s1 -->|a| s2 end
subgraph tgt_sec [Alignment and Sorting] %%metro direction: TB %%metro entry: top | a %%metro exit: right | a t1[Map Reads] t2[Sort BAM] t1 -->|a| t2 end
s2 -->|a| t1CLI command
nf-metro render examples/topologies/top_entry_header_clash.mmd -o top_entry_header_clash.svgRendered map
Header Side Rotated
A TB section whose trunk drops through the top edge and exits the bottom edge blocks the header on both horizontal edges. The title rotates and runs down the clear left edge instead of crossing the line.
Mermaid source
%%metro title: Header Rotated Onto Side%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: src_sec | 0,0%%metro grid: tgt_sec | 0,1%%metro grid: snk_sec | 0,2
graph LR subgraph src_sec [Up] %%metro direction: TB %%metro exit: bottom | a s1[One] end
subgraph tgt_sec [Align] %%metro direction: TB %%metro entry: top | a %%metro exit: bottom | a t1[Two] t2[Three] t1 -->|a| t2 end
subgraph snk_sec [Down] %%metro direction: TB %%metro entry: top | a k1[Four] end
s1 -->|a| t1 t2 -->|a| k1CLI command
nf-metro render examples/topologies/header_side_rotated.mmd -o header_side_rotated.svgRendered map
Header Nudge
A title too long to fit a rotated side, on a section blocked top and bottom by its trunk: the header shifts right past the trunk as a last resort, the canvas growing to keep it visible.
Mermaid source
%%metro title: Header Nudged Past Trunk%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: src_sec | 0,0%%metro grid: tgt_sec | 0,1%%metro grid: snk_sec | 0,2
graph LR subgraph src_sec [Up] %%metro direction: TB %%metro exit: bottom | a s1[One] end
subgraph tgt_sec [Alignment Sorting Markdup Stage] %%metro direction: TB %%metro entry: top | a %%metro exit: bottom | a t1[Two] t2[Three] t1 -->|a| t2 end
subgraph snk_sec [Down] %%metro direction: TB %%metro entry: top | a k1[Four] end
s1 -->|a| t1 t2 -->|a| k1CLI command
nf-metro render examples/topologies/header_nudge.mmd -o header_nudge.svgRendered map
Lr To Tb Top Drop
An LR section feeds the TOP entry of a TB section stacked directly below. With no explicit exit side the engine infers a BOTTOM exit: the line curves out of the trunk after the last station and drops straight onto the target trunk, which is aligned under the exit.
Mermaid source
%%metro title: LR to TB Top Drop%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: src_sec | 0,0%%metro grid: tgt_sec | 0,1
graph LR subgraph src_sec [Source] %%metro direction: LR s1[Start] s2[End] s1 -->|a| s2 end
subgraph tgt_sec [Target] %%metro direction: TB %%metro entry: top | a %%metro exit: right | a t1[Process] t2[Result] t1 -->|a| t2 end
s2 -->|a| t1CLI command
nf-metro render examples/topologies/lr_to_tb_top_drop.mmd -o lr_to_tb_top_drop.svgRendered map
Lr To Tb Top Drop Two Lines
Two co-travelling lines drop out of an LR section's explicit BOTTOM exit into a TB section's shared TOP entry below, staying parallel through the corner and down to the trunk without crossing.
Mermaid source
%%metro title: LR to TB Top Drop Two Lines%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: src_sec | 0,0%%metro grid: tgt_sec | 0,1
graph LR subgraph src_sec [Source] %%metro direction: LR %%metro exit: bottom | a,b s1[Start] s2[End] s1 -->|a,b| s2 end
subgraph tgt_sec [Target] %%metro direction: TB %%metro entry: top | a,b %%metro exit: right | a,b t1[Process] t2[Result] t1 -->|a,b| t2 end
s2 -->|a,b| t1CLI command
nf-metro render examples/topologies/lr_to_tb_top_drop_two_lines.mmd -o lr_to_tb_top_drop_two_lines.svgRendered map
Lr To Tb Top Near Vertical
A RIGHT-exit LR section feeds the TOP entry of a TB section stacked directly below. The explicit right exit leaves on the right, clears the source box, and doubles back over the inter-row gap to drop straight onto the target trunk rather than elbowing in through the top-right corner.
Mermaid source
%%metro title: Top Entry Near Vertical TB%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: src_sec | 0,0%%metro grid: tgt_sec | 0,1
graph LR subgraph src_sec [Source] %%metro direction: LR %%metro exit: right | a s1[Start] s2[End] s1 -->|a| s2 end
subgraph tgt_sec [Target] %%metro direction: TB %%metro entry: top | a %%metro exit: right | a t1[Process] t2[Result] t1 -->|a| t2 end
s2 -->|a| t1CLI command
nf-metro render examples/topologies/lr_to_tb_top_near_vertical.mmd -o lr_to_tb_top_near_vertical.svgRendered map
Lr To Tb Top Cross Col
A junction source feeds both a same-row RIGHT-entry consumer and a TB section's TOP entry two rows below. The downward branch drops onto the target trunk without crossing the section boundary off-port.
Mermaid source
%%metro title: Top Entry Horizontal Source%%metro style: dark%%metro line: a | A | #e63946%%metro grid: src_sec | 0,0%%metro grid: mid_sec | 1,0%%metro grid: tgt_sec | 0,2graph LR subgraph src_sec [Source] %%metro direction: LR %%metro exit: right | a s1[Start] s2[End] s1 -->|a| s2 end subgraph mid_sec [Middle] %%metro direction: LR %%metro entry: left | a %%metro exit: right | a m1[Middle] m2[Middle Out] m1 -->|a| m2 end subgraph tgt_sec [Target] %%metro direction: TB %%metro entry: top | a %%metro exit: right | a t1[Process] t2[Result] t1 -->|a| t2 end s2 -->|a| m1 s2 -->|a| t1CLI command
nf-metro render examples/topologies/lr_to_tb_top_cross_col.mmd -o lr_to_tb_top_cross_col.svgRendered map
Lr To Tb Top Two Lines
Two co-travelling lines from a RIGHT-exit LR section double back into a TB section's shared TOP entry below, landing on their trunk X offsets so the bundle stays parallel through the boundary without pinching or crossing.
Mermaid source
%%metro title: LR to TB Top Two Lines%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0%%metro grid: src_sec | 0,0%%metro grid: tgt_sec | 0,1graph LR subgraph src_sec [Source] %%metro direction: LR %%metro exit: right | a,b s1[Start] s2[End] s1 -->|a,b| s2 end subgraph tgt_sec [Target] %%metro direction: TB %%metro entry: top | a,b %%metro exit: right | a,b t1[Process] t2[Result] t1 -->|a,b| t2 end s2 -->|a,b| t1CLI command
nf-metro render examples/topologies/lr_to_tb_top_two_lines.mmd -o lr_to_tb_top_two_lines.svgRendered map
Serpentine Layout
Fold Fan Across
Three lines diverge, converge at a fold, then continue on the return row.
Mermaid source
%%metro title: Proteomics Quantification Pipeline%%metro style: dark%%metro line: tmt | TMT Labeling | #e63946%%metro line: lfq | Label-Free | #457b9d%%metro line: dia | DIA | #2a9d8f
graph LR subgraph sample_prep [Sample Preparation] sp_input[Input] sp_validate[Validate] sp_extract[Extract] sp_tag[Tag] sp_filt_a[Filter A] sp_filt_b[Filter B] sp_merge[Merge] sp_filter[QC Filter] sp_qc[Final QC]
sp_input -->|tmt,lfq,dia| sp_validate sp_validate -->|tmt,lfq,dia| sp_extract sp_extract -->|tmt,lfq,dia| sp_tag sp_tag -->|tmt,lfq,dia| sp_filt_a sp_tag -->|tmt,lfq,dia| sp_filt_b sp_filt_a -->|tmt,lfq,dia| sp_merge sp_filt_b -->|tmt,lfq,dia| sp_merge sp_merge -->|tmt,lfq,dia| sp_filter sp_filter -->|tmt,lfq,dia| sp_qc end
subgraph tmt_quant [TMT Quantification] tmt_label[Label] tmt_frac[Fractionate] tmt_pool[Pool] tmt_quant_ms[Quantify] tmt_check[Check]
tmt_label -->|tmt| tmt_frac tmt_frac -->|tmt| tmt_pool tmt_pool -->|tmt| tmt_quant_ms tmt_quant_ms -->|tmt| tmt_check end
subgraph lfq_quant [Label-Free Quantification] lfq_align[Align] lfq_quant_ms[Quantify] lfq_norm[Normalize]
lfq_align -->|lfq| lfq_quant_ms lfq_quant_ms -->|lfq| lfq_norm end
subgraph dia_quant [DIA Quantification] dia_window[Window] dia_extract[Extract] dia_quant_ms[Quantify]
dia_window -->|dia| dia_extract dia_extract -->|dia| dia_quant_ms end
subgraph normalize [Normalization] norm_input[Input] norm_calc[Calculate] norm_apply[Apply]
norm_input -->|tmt,lfq,dia| norm_calc norm_calc -->|tmt,lfq,dia| norm_apply end
subgraph stat_analysis [Statistical Analysis] stat_merge[Merge] diff_expr[Diff. Expression] pathway[Pathway] volcano[Volcano Plot]
stat_merge -->|tmt,lfq,dia| diff_expr diff_expr -->|tmt,lfq,dia| pathway pathway -->|tmt,lfq,dia| volcano end
subgraph reporting [Reporting] report_agg[Aggregate] report_mqc[MultiQC] report_final[Report]
report_agg -->|tmt,lfq,dia| report_mqc report_mqc -->|tmt,lfq,dia| report_final end
sp_qc -->|tmt| tmt_label sp_qc -->|lfq| lfq_align sp_qc -->|dia| dia_window tmt_check -->|tmt| norm_input lfq_norm -->|lfq| norm_input dia_quant_ms -->|dia| norm_input norm_apply -->|tmt,lfq,dia| stat_merge volcano -->|tmt,lfq,dia| report_aggCLI command
nf-metro render examples/topologies/fold_fan_across.mmd -o fold_fan_across.svgRendered map
Fold Left Exit Right Entry
A folded TB section's LEFT exit runs straight west into a relocated section's RIGHT entry. Regression fixture: the two joined sections share a bbox bottom so the straight run clears both edges by the same distance.
Mermaid source
%%metro title: Fold Left Exit Right Entry%%metro style: dark%%metro line: a | Line A | #2db572%%metro line: b | Line B | #e6550d%%metro line: c | Line C | #756bb1%%metro fold_threshold: 4
graph LR subgraph inputs [Inputs] A_IN[ ] a1([A Step 1]) a2([A Step 2]) a3([A Step 3]) B_IN[ ] C_IN[ ] A_IN -->|a| a1 a1 -->|a| a2 a2 -->|a| a3 end
subgraph middle [Middle] split([Split]) prepare([Prepare]) pred_x([Predict X]) pred_y([Predict Y]) pred_z([Predict Z]) merge([Merge]) split -->|a,b,c| prepare prepare -->|a,b,c| pred_x prepare -->|a,b,c| pred_y prepare -->|a,b,c| pred_z pred_x -->|a,b,c| merge pred_y -->|a,b,c| merge pred_z -->|a,b,c| merge end
subgraph report [Report] summarize([Summarize]) tsv_pad[ ] format([Format]) TSV_OUT[ ] HTML_OUT[ ] summarize -->|a,b,c| tsv_pad summarize -->|a,b,c| format tsv_pad -->|a,b,c| TSV_OUT format -->|a,b,c| HTML_OUT end
a3 -->|a| split B_IN -->|b| split C_IN -->|c| split merge -->|a,b,c| summarizeCLI command
nf-metro render examples/topologies/fold_left_exit_right_entry.mmd -o fold_left_exit_right_entry.svgRendered map
Fold Double
Ten-section linear pipeline with two fold points (serpentine layout).
Mermaid source
%%metro title: WGS/WES Variant Pipeline%%metro style: dark%%metro line: wgs | Whole Genome | #2db572%%metro line: wes | Whole Exome | #0570b0
graph LR subgraph input_qc [Input & QC] iq_input[Input] iq_fastqc[FastQC] iq_trim[Trim] iq_filter[Filter]
iq_input -->|wgs,wes| iq_fastqc iq_fastqc -->|wgs,wes| iq_trim iq_trim -->|wgs,wes| iq_filter end
subgraph alignment [Alignment] al_bwa[BWA-MEM2] al_sort[Sort] al_dedup[Dedup] al_bqsr[BQSR]
al_bwa -->|wgs,wes| al_sort al_sort -->|wgs,wes| al_dedup al_dedup -->|wgs,wes| al_bqsr end
subgraph base_recal [Base Recalibration] br_recal[Recalibrate] br_apply[Apply] br_validate[Validate] br_index[Index]
br_recal -->|wgs,wes| br_apply br_apply -->|wgs,wes| br_validate br_validate -->|wgs,wes| br_index end
subgraph calling [Variant Calling] vc_hc[HaplotypeCaller] vc_genotype[Genotype] vc_merge[Merge VCF] vc_norm[Normalize]
vc_hc -->|wgs,wes| vc_genotype vc_genotype -->|wgs,wes| vc_merge vc_merge -->|wgs,wes| vc_norm end
subgraph hard_filter [Hard Filtering] hf_sel_snp[Select SNPs] hf_sel_indel[Select Indels] hf_filt_snp[Filter SNPs] hf_filt_indel[Filter Indels]
hf_sel_snp -->|wgs,wes| hf_filt_snp hf_filt_snp -->|wgs,wes| hf_sel_indel hf_sel_indel -->|wgs,wes| hf_filt_indel end
subgraph annotation [Annotation] an_vep[VEP] an_snpsift[SnpSift] an_classify[Classify] an_prioritize[Prioritize]
an_vep -->|wgs,wes| an_snpsift an_snpsift -->|wgs,wes| an_classify an_classify -->|wgs,wes| an_prioritize end
subgraph interpretation [Interpretation] ip_pathogenicity[Pathogenicity] ip_frequency[Frequency] ip_clinical[Clinical] ip_aggregate[Aggregate]
ip_pathogenicity -->|wgs,wes| ip_frequency ip_frequency -->|wgs,wes| ip_clinical ip_clinical -->|wgs,wes| ip_aggregate end
subgraph integration [Integration] ig_merge[Merge Calls] ig_validate[Validate] ig_qc[QC Check] ig_finalize[Finalize]
ig_merge -->|wgs,wes| ig_validate ig_validate -->|wgs,wes| ig_qc ig_qc -->|wgs,wes| ig_finalize end
subgraph reporting [Reporting] rp_summary[Summary] rp_multiqc[MultiQC] rp_report[Report]
rp_summary -->|wgs,wes| rp_multiqc rp_multiqc -->|wgs,wes| rp_report end
subgraph archival [Archival] ar_archive[Archive] ar_compress[Compress]
ar_archive -->|wgs,wes| ar_compress end
iq_filter -->|wgs,wes| al_bwa al_bqsr -->|wgs,wes| br_recal br_index -->|wgs,wes| vc_hc vc_norm -->|wgs,wes| hf_sel_snp hf_filt_indel -->|wgs,wes| an_vep an_prioritize -->|wgs,wes| ip_pathogenicity ip_aggregate -->|wgs,wes| ig_merge ig_finalize -->|wgs,wes| rp_summary rp_report -->|wgs,wes| ar_archiveCLI command
nf-metro render examples/topologies/fold_double.mmd -o fold_double.svgRendered map
Fold Stacked Branch
Stacked analysis sections feeding through a fold into branching targets.
Mermaid source
%%metro title: Single-Cell Multi-Omics Pipeline%%metro style: dark%%metro line: rna | scRNA-seq | #e63946%%metro line: atac | scATAC-seq | #457b9d%%metro line: protein | CITE-seq | #f5c542
graph LR subgraph preprocessing [Preprocessing] pp_input[Input] pp_demux[Demux] pp_qc_raw[Raw QC] pp_trim[Trim] pp_filter[Filter] pp_qc_clean[Clean QC] pp_classify[Classify] pp_sort[Sort]
pp_input -->|rna,atac,protein| pp_demux pp_demux -->|rna,atac,protein| pp_qc_raw pp_qc_raw -->|rna,atac,protein| pp_trim pp_trim -->|rna,atac,protein| pp_filter pp_filter -->|rna,atac,protein| pp_qc_clean pp_qc_clean -->|rna,atac,protein| pp_classify pp_classify -->|rna,atac,protein| pp_sort end
subgraph rna_analysis [RNA Analysis] rna_norm[Normalize] rna_cluster[Cluster] rna_markers[Markers] rna_trajectories[Trajectories] rna_dge[DGE]
rna_norm -->|rna| rna_cluster rna_cluster -->|rna| rna_markers rna_markers -->|rna| rna_trajectories rna_trajectories -->|rna| rna_dge end
subgraph atac_analysis [ATAC Analysis] atac_peaks[Peak Calling] atac_motif[Motif Analysis] atac_footprint[Footprinting] atac_coverage[Coverage]
atac_peaks -->|atac| atac_motif atac_motif -->|atac| atac_footprint atac_footprint -->|atac| atac_coverage end
subgraph protein_analysis [Protein Analysis] prot_norm[Normalize] prot_quant[Quantify] prot_viz[Visualize]
prot_norm -->|protein| prot_quant prot_quant -->|protein| prot_viz end
subgraph integration [Multi-Modal Integration] int_merge[Merge Modalities] int_wnn[WNN] int_umap[UMAP]
int_merge -->|rna,atac,protein| int_wnn int_wnn -->|rna,atac,protein| int_umap end
subgraph bio_interp [Biological Interpretation] bio_celltype[Cell Typing] bio_trajectory[Trajectory] bio_grn[Gene Reg. Network]
bio_celltype -->|rna,atac| bio_trajectory bio_trajectory -->|rna,atac| bio_grn end
subgraph tech_qc [Technical QC] tqc_doublet[Doublet Detection] tqc_ambient[Ambient RNA] tqc_metrics[QC Metrics]
tqc_doublet -->|protein| tqc_ambient tqc_ambient -->|protein| tqc_metrics end
subgraph final_report [Final Report] fr_aggregate[Aggregate] fr_report[Render Report]
fr_aggregate -->|rna,atac,protein| fr_report end
pp_sort -->|rna| rna_norm pp_sort -->|atac| atac_peaks pp_sort -->|protein| prot_norm rna_dge -->|rna| int_merge atac_coverage -->|atac| int_merge prot_viz -->|protein| int_merge int_umap -->|rna,atac| bio_celltype int_umap -->|protein| tqc_doublet bio_grn -->|rna,atac| fr_aggregate tqc_metrics -->|protein| fr_aggregateCLI command
nf-metro render examples/topologies/fold_stacked_branch.mmd -o fold_stacked_branch.svgRendered map
Reconverge Reversed Fold
Serpentine-fold reconvergence: a multi-modal pipeline fanning out to stacked analysis sections and reconverging onto a reversed return row.
Mermaid source
%%metro title: Reconvergence Reversed Alt%%metro style: dark%%metro line: rna | scRNA-seq | #e63946%%metro line: protein | CITE-seq | #f5c542%%metro line: atac | scATAC-seq | #457b9d
graph LR subgraph preprocessing [Preprocessing] pp_input[Input] pp_demux[Demux] pp_qc_raw[Raw QC] pp_trim[Trim] pp_filter[Filter] pp_qc_clean[Clean QC] pp_classify[Classify] pp_sort[Sort]
pp_input -->|rna,atac,protein| pp_demux pp_demux -->|rna,atac,protein| pp_qc_raw pp_qc_raw -->|rna,atac,protein| pp_trim pp_trim -->|rna,atac,protein| pp_filter pp_filter -->|rna,atac,protein| pp_qc_clean pp_qc_clean -->|rna,atac,protein| pp_classify pp_classify -->|rna,atac,protein| pp_sort end
subgraph rna_analysis [RNA Analysis] rna_norm[Normalize] rna_cluster[Cluster] rna_markers[Markers] rna_trajectories[Trajectories] rna_dge[DGE]
rna_norm -->|rna| rna_cluster rna_cluster -->|rna| rna_markers rna_markers -->|rna| rna_trajectories rna_trajectories -->|rna| rna_dge end
subgraph atac_analysis [ATAC Analysis] atac_peaks[Peak Calling] atac_motif[Motif Analysis] atac_footprint[Footprinting] atac_coverage[Coverage]
atac_peaks -->|atac| atac_motif atac_motif -->|atac| atac_footprint atac_footprint -->|atac| atac_coverage end
subgraph protein_analysis [Protein Analysis] prot_norm[Normalize] prot_quant[Quantify] prot_viz[Visualize]
prot_norm -->|protein| prot_quant prot_quant -->|protein| prot_viz end
subgraph integration [Multi-Modal Integration] int_merge[Merge Modalities] int_wnn[WNN] int_umap[UMAP]
int_merge -->|rna,atac,protein| int_wnn int_wnn -->|rna,atac,protein| int_umap end
subgraph bio_interp [Biological Interpretation] bio_celltype[Cell Typing] bio_trajectory[Trajectory] bio_grn[Gene Reg. Network]
bio_celltype -->|rna,atac| bio_trajectory bio_trajectory -->|rna,atac| bio_grn end
subgraph tech_qc [Technical QC] tqc_doublet[Doublet Detection] tqc_ambient[Ambient RNA] tqc_metrics[QC Metrics]
tqc_doublet -->|protein| tqc_ambient tqc_ambient -->|protein| tqc_metrics end
subgraph final_report [Final Report] fr_aggregate[Aggregate] fr_report[Render Report]
fr_aggregate -->|rna,atac,protein| fr_report end
pp_sort -->|rna| rna_norm pp_sort -->|atac| atac_peaks pp_sort -->|protein| prot_norm rna_dge -->|rna| int_merge atac_coverage -->|atac| int_merge prot_viz -->|protein| int_merge int_umap -->|rna,atac| bio_celltype int_umap -->|protein| tqc_doublet bio_grn -->|rna,atac| fr_aggregate tqc_metrics -->|protein| fr_aggregateCLI command
nf-metro render examples/topologies/reconverge_reversed_fold.mmd -o reconverge_reversed_fold.svgRendered map
Convergence Sink Fold
Convergence sink folded below its branches: a `fold_threshold` stacks the parallel branches in one column and drops the shared sink onto a lower row, fed through a TOP entry. Each upper branch's bottom-exit feeder routes around the intervening branch boxes through the clear left-side gap rather than ploughing straight down through them.
Mermaid source
%%metro title: Convergence Sink Fold%%metro style: dark%%metro fold_threshold: 3%%metro line: main | Main | #0570b0
graph LR subgraph src [Source] s1[Input] s2[Prepare] s1 -->|main| s2 end subgraph branch_a [Branch A] a1[Step A1] a2[Step A2] a1 -->|main| a2 end subgraph branch_b [Branch B] b1[Step B1] b2[Step B2] b1 -->|main| b2 end subgraph branch_c [Branch C] c1[Step C1] c2[Step C2] c1 -->|main| c2 end subgraph sink [Sink] m1[Merge] m2[Report] m1 -->|main| m2 end s2 -->|main| a1 s2 -->|main| b1 s2 -->|main| c1 a2 -->|main| m1 b2 -->|main| m1 c2 -->|main| m1CLI command
nf-metro render examples/topologies/convergence_sink_fold.mmd -o convergence_sink_fold.svgRendered map
Riboseq Fold Two Dir Entry Hintless
A folded Ribo-seq excerpt with no `%%metro grid:`/`entry:`/`exit:` hints: P-site identification sits on the RL return row, fed from the quantification section directly above it and the ORF-calling section to its right. Entry-side inference picks a single sensible side (the flow-natural RIGHT, which a feed reaches) from the feed geometry, so the map lays out cleanly hint-free.
Mermaid source
%%metro title: Riboseq Fold Two-Direction Entry (hintless)%%metro fold_threshold: 3%%metro line: ribo | Ribo-seq | #2db572
graph LR subgraph prep [Prep] p0[Trim] end subgraph align [Align] a0[Align] end subgraph quantification [Quant] q0[Quantify] end subgraph orf_calling [ORF] o0[Call ORFs] end subgraph psite_id [P-site] ps0[P-sites] end subgraph te [TE] t0[TE] end p0 -->|ribo| a0 a0 -->|ribo| q0 q0 -->|ribo| o0 q0 -->|ribo| ps0 o0 -->|ribo| ps0 ps0 -->|ribo| t0CLI command
nf-metro render examples/topologies/riboseq_fold_two_dir_entry_hintless.mmd -o riboseq_fold_two_dir_entry_hintless.svgRendered map
Riboseq Fold Two Dir Entry
The same folded Ribo-seq excerpt pinned with explicit grid cells and the hand-tuned `entry: top` incantation. Regression fixture for #1341's route-around and overlap goals: the top-declared entry drags the right-arriving feed and the P-site box overlaps its ORF neighbour. Compare the hint-free variant, which lays out cleanly.
Mermaid source
%%metro title: Riboseq Fold Two-Direction Entry%%metro directional: true%%metro line: ribo | Ribo-seq | #2db572%%metro grid: prep | 0,0%%metro grid: align | 1,0%%metro grid: quantification | 2,0%%metro grid: orf_calling | 3,1%%metro grid: psite_id | 2,1%%metro grid: te | 1,1
graph LR subgraph prep [Prep] p0[Trim] end subgraph align [Align] a0[Align] end subgraph quantification [Quant] q0[Quantify] end subgraph orf_calling [ORF] %%metro exit: left | ribo o0[Call ORFs] end subgraph psite_id [P-site] %%metro entry: top | ribo %%metro exit: left | ribo ps0[P-sites] end subgraph te [TE] %%metro entry: right | ribo t0[TE] end p0 -->|ribo| a0 a0 -->|ribo| q0 q0 -->|ribo| o0 q0 -->|ribo| ps0 o0 -->|ribo| ps0 ps0 -->|ribo| t0CLI command
nf-metro render examples/topologies/riboseq_fold_two_dir_entry.mmd -o riboseq_fold_two_dir_entry.svgRendered map
Convergence Fold Diamond
Two distinct lines converging into a sink folded below its branches: a `fold_threshold` stacks both branches in one column and drops the shared sink onto a lower row, fed through a TOP entry. The two feeders, and the run through the merge, ride parallel approach channels rather than collapsing onto one vertical channel.
Mermaid source
%%metro title: Convergence Fold Diamond%%metro style: dark%%metro line: left_path | Left Path | #e63946%%metro line: right_path | Right Path | #0570b0%%metro fold_threshold: 4
graph LR subgraph start [Start] input[Input] prep[Prepare] input -->|left_path,right_path| prep end
subgraph branch_left [Branch Left] l1[Left Step 1] l2[Left Step 2] l3[Left Step 3] l1 -->|left_path| l2 l2 -->|left_path| l3 end
subgraph branch_right [Branch Right] r1[Right Step 1] r2[Right Step 2] r1 -->|right_path| r2 end
subgraph finish [Finish] merge[Merge] report[Report] merge -->|left_path,right_path| report end
prep -->|left_path| l1 prep -->|right_path| r1 l3 -->|left_path| merge r2 -->|right_path| mergeCLI command
nf-metro render examples/topologies/convergence_fold_diamond.mmd -o convergence_fold_diamond.svgRendered map
Fold Split Targets
Two folded branches dropping into one section through a shared TOP entry, each line continuing to its own separate sink (a fan, not a merge). The distinct-line drops stay collapsed onto the column trunk, since they part to different stations rather than bundling along a shared run.
Mermaid source
%%metro title: Fold Split Targets%%metro style: dark%%metro line: left_path | Left Path | #e63946%%metro line: right_path | Right Path | #0570b0%%metro fold_threshold: 4
graph LR subgraph start [Start] input[Input] prep[Prepare] input -->|left_path,right_path| prep end
subgraph branch_left [Branch Left] l1[Left Step 1] l2[Left Step 2] l3[Left Step 3] l1 -->|left_path| l2 l2 -->|left_path| l3 end
subgraph branch_right [Branch Right] r1[Right Step 1] r2[Right Step 2] r1 -->|right_path| r2 end
subgraph finish [Finish] recv_l[Recv Left] recv_r[Recv Right] out[Output] recv_l -->|left_path| out recv_r -->|right_path| out end
prep -->|left_path| l1 prep -->|right_path| r1 l3 -->|left_path| recv_l r2 -->|right_path| recv_rCLI command
nf-metro render examples/topologies/fold_split_targets.mmd -o fold_split_targets.svgRendered map
Stacked Lr Serpentine
Same-direction sections stacked in one grid column, chained via short vertical drops on alternating sides (serpentine), no wrap-around.
Mermaid source
%%metro title: Stacked LR Serpentine%%metro style: dark%%metro line: main | Main | #e63946%%metro grid: ingest | 0,0,3,1%%metro grid: align | 1,0,1,1%%metro grid: dedup | 1,1,1,1%%metro grid: call | 1,2,1,1
graph LR subgraph ingest [Ingest] i1[Read] i2[QC] i1 -->|main| i2 end
subgraph align [Alignment] a1[Map] a2[Sort] a1 -->|main| a2 end
subgraph dedup [Dedup] d1[Mark Dup] d2[Recalibrate] d1 -->|main| d2 end
subgraph call [Variant Calling] c1[Call] c2[Filter] c1 -->|main| c2 end
i2 -->|main| a1 a2 -->|main| d1 d2 -->|main| c1CLI command
nf-metro render examples/topologies/stacked_lr_serpentine.mmd -o stacked_lr_serpentine.svgRendered map
Serpentine Grid Wide Bundle
A two-line bundle folds through a 3x2 section grid: each row flows left to right, and the bundle wraps from the right of one row to the left of the next. The wrap spans more than one column, so its return run loops through the clear inter-row gap with both lines kept fanned around every corner.
Mermaid source
%%metro title: Serpentine Grid Wide Bundle%%metro style: dark%%metro line: a | Line A | #4a90d9%%metro line: b | Line B | #e63946%%metro grid: s1 | 0,0%%metro grid: s2 | 1,0%%metro grid: s3 | 2,0%%metro grid: s4 | 0,1%%metro grid: s5 | 1,1%%metro grid: s6 | 2,1
graph LR subgraph s1 [Sec 1] %%metro exit: right | a, b n1[Alpha] n2[Beta] n1 -->|a,b| n2 end subgraph s2 [Sec 2] %%metro entry: left | a, b %%metro exit: right | a, b n3[Gamma] n4[Delta] n3 -->|a,b| n4 end subgraph s3 [Sec 3] %%metro entry: left | a, b %%metro exit: right | a, b n5[Epsilon] n6[Zeta] n5 -->|a,b| n6 end subgraph s4 [Sec 4] %%metro entry: left | a, b %%metro exit: right | a, b n7[Eta] n8[Theta] n7 -->|a,b| n8 end subgraph s5 [Sec 5] %%metro entry: left | a, b %%metro exit: right | a, b n9[Iota] n10[Kappa] n9 -->|a,b| n10 end subgraph s6 [Sec 6] %%metro entry: left | a, b n11[Lambda] n12[Mu] n11 -->|a,b| n12 end n2 -->|a,b| n3 n4 -->|a,b| n5 n6 -->|a,b| n7 n8 -->|a,b| n9 n10 -->|a,b| n11CLI command
nf-metro render examples/topologies/serpentine_grid_wide_bundle.mmd -o serpentine_grid_wide_bundle.svgRendered map
Serpentine Grid Tall Bundle
A two-line bundle folds through a 2x3 section grid, wrapping twice. Each wrap returns through its own inter-row gap, so the two stacked return runs stay on distinct channels rather than collapsing onto one.
Mermaid source
%%metro title: Serpentine Grid Tall Bundle%%metro style: dark%%metro line: a | Line A | #4a90d9%%metro line: b | Line B | #e63946%%metro grid: s1 | 0,0%%metro grid: s2 | 1,0%%metro grid: s3 | 0,1%%metro grid: s4 | 1,1%%metro grid: s5 | 0,2%%metro grid: s6 | 1,2
graph LR subgraph s1 [Sec 1] %%metro exit: right | a, b n1[Alpha] n2[Beta] n1 -->|a,b| n2 end subgraph s2 [Sec 2] %%metro entry: left | a, b %%metro exit: right | a, b n3[Gamma] n4[Delta] n3 -->|a,b| n4 end subgraph s3 [Sec 3] %%metro entry: left | a, b %%metro exit: right | a, b n5[Epsilon] n6[Zeta] n5 -->|a,b| n6 end subgraph s4 [Sec 4] %%metro entry: left | a, b %%metro exit: right | a, b n7[Eta] n8[Theta] n7 -->|a,b| n8 end subgraph s5 [Sec 5] %%metro entry: left | a, b %%metro exit: right | a, b n9[Iota] n10[Kappa] n9 -->|a,b| n10 end subgraph s6 [Sec 6] %%metro entry: left | a, b n11[Lambda] n12[Mu] n11 -->|a,b| n12 end n2 -->|a,b| n3 n4 -->|a,b| n5 n6 -->|a,b| n7 n8 -->|a,b| n9 n10 -->|a,b| n11CLI command
nf-metro render examples/topologies/serpentine_grid_tall_bundle.mmd -o serpentine_grid_tall_bundle.svgRendered map
Serpentine Rl Bundle
A true boustrophedon fold of a two-line bundle: the top row flows left to right, drops straight down the right edge, and the return row flows right to left via direction: RL. The bundle stays on the outside of the fold the whole way round (top, right, then bottom) with no crossover, and the descent column aligns under the exit so the drop is a clean U.
Mermaid source
%%metro title: Serpentine RL Bundle%%metro style: dark%%metro line: dna | DNA | #4a90d9%%metro line: rna | RNA | #e63946%%metro grid: preprocessing | 0,0%%metro grid: gatk | 1,0%%metro grid: variant_calling | 2,0%%metro grid: normalization | 2,1%%metro grid: consensus | 1,1%%metro grid: realignment | 0,1
graph LR subgraph preprocessing [Pre-processing] %%metro exit: right | dna, rna pp1[Trim] pp2[Align] pp1 -->|dna,rna| pp2 end subgraph gatk [GATK] %%metro entry: left | dna, rna %%metro exit: right | dna, rna gk1[BQSR] gk2[Apply] gk1 -->|dna,rna| gk2 end subgraph variant_calling [Variant Calling] %%metro entry: left | dna, rna %%metro exit: bottom | dna, rna vc1[Call] vc2[Filter] vc1 -->|dna,rna| vc2 end subgraph normalization [Normalization] %%metro direction: RL %%metro entry: top | dna, rna %%metro exit: left | dna, rna nz1[Decompose] nz2[Norm] nz1 -->|dna,rna| nz2 end subgraph consensus [Consensus] %%metro direction: RL %%metro entry: right | dna, rna %%metro exit: left | dna, rna cs1[Merge] cs2[Vote] cs1 -->|dna,rna| cs2 end subgraph realignment [Realignment] %%metro direction: RL %%metro entry: right | dna, rna rl1[Realign] rl2[Recall] rl1 -->|dna,rna| rl2 end pp2 -->|dna,rna| gk1 gk2 -->|dna,rna| vc1 vc2 -->|dna,rna| nz1 nz2 -->|dna,rna| cs1 cs2 -->|dna,rna| rl1CLI command
nf-metro render examples/topologies/serpentine_rl_bundle.mmd -o serpentine_rl_bundle.svgRendered map
Lr Bottom Exit Rl Top Entry Jog
An LR section's bottom exit drops straight into the top entry of the direction: RL section stacked directly below it. The receiving RL section reserves an offset slot for a line that peels off inside it, so the descent inherits that wider anchoring and lands square on the entry port with no sideways jog at the boundary (issue #1212).
Mermaid source
%%metro title: LR bottom-exit RL top-entry%%metro style: dark%%metro line: dna | DNA | #4a90d9%%metro line: rna | RNA | #e63946%%metro line: extra | Extra | #f5c542%%metro grid: preprocessing | 0,0%%metro grid: gatk | 1,0%%metro grid: normalization | 2,0%%metro grid: consensus | 2,1%%metro grid: realign | 1,1%%metro grid: reporting | 0,1
graph LR subgraph preprocessing [Pre-processing] pp1[Trim] pp2[Align] pp1 -->|dna,rna| pp2 end subgraph gatk [GATK] gk1[BQSR] gk2[Apply] gk1 -->|dna,rna| gk2 end subgraph normalization [Normalization] %%metro exit: bottom | dna, rna nz1[Decompose] nz2[Norm] nz3[Annot] nz1 -->|dna,rna| nz2 nz2 -->|dna,rna| nz3 end subgraph consensus [Consensus] %%metro direction: RL %%metro entry: top | dna, rna cs1[vcf2MAF] cs2[Consensus] cs3[MAFFilter] cs1 -->|dna,rna| cs2 cs2 -->|dna,rna| cs3 end subgraph realign [Realignment] %%metro direction: RL re1[MAF2BED] re2[Extract] re3[Recall] re1 -->|extra| re2 re2 -->|extra| re3 end subgraph reporting [Reporting] %%metro direction: RL rp1[RNAFilter] rp2[MultiQC] rp1 -->|rna,extra| rp2 end pp2 -->|dna,rna| gk1 gk2 -->|dna,rna| nz1 nz3 -->|dna,rna| cs1 cs3 -->|extra| re1 cs3 -->|rna| rp1 re3 -->|extra| rp1CLI command
nf-metro render examples/topologies/lr_bottom_exit_rl_top_entry_jog.mmd -o lr_bottom_exit_rl_top_entry_jog.svgRendered map
Manual Rl Row Nonconsumer Bypass
A manual-grid serpentine whose return row flows right to left via direction: RL. A non-consumer line shares an exit bundle with a consumed line but is not consumed by the intervening RL section, so it must bypass around that section rather than route through its interior. The descent column lands in the clear gap beside the intervening box and the line loops below the whole row into its target (issue #1211).
Mermaid source
%%metro title: Manual RL row non-consumer bypass%%metro style: nfcore%%metro fold_threshold: 15%%metro file: fastq_in | FASTQ%%metro file: report_out | HTML%%metro line: dna | DNA (Tumor + Normal) | #4a90d9%%metro line: rna | RNA (Tumor) | #e63946%%metro line: realignment | Realignment (RNA) | #f5c542%%metro line_order: definition%%metro legend: bl%%metro grid: preprocessing | 0,0%%metro grid: gatk_preproc | 1,0%%metro grid: variant_calling | 2,0%%metro grid: normalization | 3,0%%metro grid: consensus | 3,1%%metro grid: realign | 1,1,2,1%%metro grid: reporting | 0,1
graph LR subgraph preprocessing [Pre-processing & Alignment] fastq_in[ ] fastqc[FastQC] fastp[fastp] bwa_mem[BWA-mem/BWA-mem2] star[STAR] samtools_merge[SAMtools Merge]
fastq_in -->|dna,rna| fastqc fastqc -->|dna,rna| fastp fastp -->|dna| bwa_mem fastp -->|rna| star bwa_mem -->|dna| samtools_merge star -->|rna| samtools_merge end
subgraph gatk_preproc [GATK Preprocessing] markduplicates[MarkDuplicates] splitncigar[SplitNCigarReads] baserecalibrator[BaseRecalibrator] applybqsr[ApplyBQSR] samtools_stats[SAMtools Stats] mosdepth[Mosdepth]
markduplicates -->|dna| baserecalibrator markduplicates -->|rna| splitncigar splitncigar -->|rna| baserecalibrator baserecalibrator -->|dna,rna| applybqsr applybqsr -->|dna,rna| samtools_stats samtools_stats -->|dna,rna| mosdepth end
subgraph variant_calling [Variant Calling (parallel)] vc_fork[ ] mutect2[Mutect2] strelka[Strelka2] sage[SAGE] vc_join[ ]
vc_fork -->|dna,rna| mutect2 vc_fork -->|dna,rna| strelka vc_fork -->|dna,rna| sage mutect2 -->|dna,rna| vc_join strelka -->|dna,rna| vc_join sage -->|dna,rna| vc_join end
subgraph normalization [Normalization & Annotation] %%metro exit: bottom | dna, rna vt_decompose[VT Decompose] vt_normalize[VT Normalize] ensemblvep[Ensembl VEP]
vt_decompose -->|dna,rna| vt_normalize vt_normalize -->|dna,rna| ensemblvep end
subgraph consensus [Consensus & Filtering] %%metro direction: RL %%metro entry: top | dna, rna %%metro exit: left | rna, realignment vcf2maf[vcf2MAF] run_consensus[Consensus] maf_filtering[MAF Filtering]
vcf2maf -->|dna,rna| run_consensus run_consensus -->|dna,rna| maf_filtering end
subgraph realign [Realignment (RNA)] %%metro direction: RL %%metro entry: right | realignment %%metro exit: left | realignment maf2bed[MAF2BED] extract_reads[Extract Reads] hisat2[HISAT2] markdup_re[MarkDuplicates] splitncigar_re[SplitNCigarReads] bqsr_re[BQSR] varcall_re[Variant Calling] norm_re[Normalization] annotate_re[Annotation] consensus_re[Consensus] filter_re[MAF Filtering]
maf2bed -->|realignment| extract_reads extract_reads -->|realignment| hisat2 hisat2 -->|realignment| markdup_re markdup_re -->|realignment| splitncigar_re splitncigar_re -->|realignment| bqsr_re bqsr_re -->|realignment| varcall_re varcall_re -->|realignment| norm_re norm_re -->|realignment| annotate_re annotate_re -->|realignment| consensus_re consensus_re -->|realignment| filter_re end
subgraph reporting [Reporting] %%metro direction: RL %%metro entry: right | rna, realignment rna_filter[RNA MAF Filtering] rna_filter -->|rna,realignment| multiqc multiqc[MultiQC] report_out[ ]
multiqc -->|rna,realignment| report_out end
%% Inter-section edges maf_filtering -->|realignment| maf2bed samtools_merge -->|dna,rna| markduplicates mosdepth -->|dna,rna| vc_fork vc_join -->|dna,rna| vt_decompose ensemblvep -->|dna,rna| vcf2maf filter_re -->|realignment| rna_filter maf_filtering -->|rna| rna_filterCLI command
nf-metro render examples/topologies/manual_rl_row_nonconsumer_bypass.mmd -o manual_rl_row_nonconsumer_bypass.svgRendered map
Packed Cell Cellmate Bypass
The same non-consumer bypass as manual_rl_row_nonconsumer_bypass, but the intervening section is packed into the same grid cell as the target rather than given its own cell. The bypass must still loop around the cell-mate's box instead of cutting straight through it (issue #1228).
Mermaid source
%%metro title: Packed-cell non-consumer bypass%%metro style: nfcore%%metro fold_threshold: 15%%metro file: fastq_in | FASTQ%%metro file: report_out | HTML%%metro line: dna | DNA (Tumor + Normal) | #4a90d9%%metro line: rna | RNA (Tumor) | #e63946%%metro line: realignment | Realignment (RNA) | #f5c542%%metro line_order: definition%%metro legend: bl%%metro grid: preprocessing | 0,0%%metro grid: gatk_preproc | 1,0%%metro grid: variant_calling | 2,0%%metro grid: normalization | 3,0%%metro grid: consensus | 3,1%%metro grid: realign, reporting | 1,1
graph LR subgraph preprocessing [Pre-processing & Alignment] fastq_in[ ] fastqc[FastQC] fastp[fastp] bwa_mem[BWA-mem/BWA-mem2] star[STAR] samtools_merge[SAMtools Merge]
fastq_in -->|dna,rna| fastqc fastqc -->|dna,rna| fastp fastp -->|dna| bwa_mem fastp -->|rna| star bwa_mem -->|dna| samtools_merge star -->|rna| samtools_merge end
subgraph gatk_preproc [GATK Preprocessing] markduplicates[MarkDuplicates] splitncigar[SplitNCigarReads] baserecalibrator[BaseRecalibrator] applybqsr[ApplyBQSR] samtools_stats[SAMtools Stats] mosdepth[Mosdepth]
markduplicates -->|dna| baserecalibrator markduplicates -->|rna| splitncigar splitncigar -->|rna| baserecalibrator baserecalibrator -->|dna,rna| applybqsr applybqsr -->|dna,rna| samtools_stats samtools_stats -->|dna,rna| mosdepth end
subgraph variant_calling [Variant Calling (parallel)] vc_fork[ ] mutect2[Mutect2] strelka[Strelka2] sage[SAGE] vc_join[ ]
vc_fork -->|dna,rna| mutect2 vc_fork -->|dna,rna| strelka vc_fork -->|dna,rna| sage mutect2 -->|dna,rna| vc_join strelka -->|dna,rna| vc_join sage -->|dna,rna| vc_join end
subgraph normalization [Normalization & Annotation] %%metro exit: bottom | dna, rna vt_decompose[VT Decompose] vt_normalize[VT Normalize] ensemblvep[Ensembl VEP]
vt_decompose -->|dna,rna| vt_normalize vt_normalize -->|dna,rna| ensemblvep end
subgraph consensus [Consensus & Filtering] %%metro direction: RL %%metro entry: top | dna, rna %%metro exit: left | rna, realignment vcf2maf[vcf2MAF] run_consensus[Consensus] maf_filtering[MAF Filtering]
vcf2maf -->|dna,rna| run_consensus run_consensus -->|dna,rna| maf_filtering end
subgraph realign [Realignment (RNA)] %%metro direction: RL %%metro entry: right | realignment %%metro exit: left | realignment maf2bed[MAF2BED] extract_reads[Extract Reads] hisat2[HISAT2] markdup_re[MarkDuplicates] splitncigar_re[SplitNCigarReads] bqsr_re[BQSR] varcall_re[Variant Calling] norm_re[Normalization] annotate_re[Annotation] consensus_re[Consensus] filter_re[MAF Filtering]
maf2bed -->|realignment| extract_reads extract_reads -->|realignment| hisat2 hisat2 -->|realignment| markdup_re markdup_re -->|realignment| splitncigar_re splitncigar_re -->|realignment| bqsr_re bqsr_re -->|realignment| varcall_re varcall_re -->|realignment| norm_re norm_re -->|realignment| annotate_re annotate_re -->|realignment| consensus_re consensus_re -->|realignment| filter_re end
subgraph reporting [Reporting] %%metro direction: RL %%metro entry: right | rna, realignment rna_filter[RNA MAF Filtering] rna_filter -->|rna,realignment| multiqc multiqc[MultiQC] report_out[ ]
multiqc -->|rna,realignment| report_out end
%% Inter-section edges maf_filtering -->|realignment| maf2bed samtools_merge -->|dna,rna| markduplicates mosdepth -->|dna,rna| vc_fork vc_join -->|dna,rna| vt_decompose ensemblvep -->|dna,rna| vcf2maf filter_re -->|realignment| rna_filter maf_filtering -->|rna| rna_filterCLI command
nf-metro render examples/topologies/packed_cell_cellmate_bypass.mmd -o packed_cell_cellmate_bypass.svgRendered map
Packed Cell Cellmate Bypass Adjacent
The packed-cell cell-mate bypass with the bypassing line's source section sitting in the column immediately adjacent to the packed cell, with no gap column to descend through. The bypass must still loop below the cell-mate's box rather than collapse back to a straight run through its interior (issue #1233).
Mermaid source
%%metro title: Packed-cell non-consumer bypass (adjacent source)%%metro style: nfcore%%metro fold_threshold: 15%%metro file: fastq_in | FASTQ%%metro file: report_out | HTML%%metro line: dna | DNA (Tumor + Normal) | #4a90d9%%metro line: rna | RNA (Tumor) | #e63946%%metro line: realignment | Realignment (RNA) | #f5c542%%metro line_order: definition%%metro legend: bl%%metro grid: preprocessing | 0,0%%metro grid: gatk_preproc, variant_calling | 1,0%%metro grid: normalization | 2,0%%metro grid: consensus | 2,1%%metro grid: realign, reporting | 1,1
graph LR subgraph preprocessing [Pre-processing & Alignment] fastq_in[ ] fastqc[FastQC] fastp[fastp] bwa_mem[BWA-mem/BWA-mem2] star[STAR] samtools_merge[SAMtools Merge]
fastq_in -->|dna,rna| fastqc fastqc -->|dna,rna| fastp fastp -->|dna| bwa_mem fastp -->|rna| star bwa_mem -->|dna| samtools_merge star -->|rna| samtools_merge end
subgraph gatk_preproc [GATK Preprocessing] markduplicates[MarkDuplicates] splitncigar[SplitNCigarReads] baserecalibrator[BaseRecalibrator] applybqsr[ApplyBQSR] samtools_stats[SAMtools Stats] mosdepth[Mosdepth]
markduplicates -->|dna| baserecalibrator markduplicates -->|rna| splitncigar splitncigar -->|rna| baserecalibrator baserecalibrator -->|dna,rna| applybqsr applybqsr -->|dna,rna| samtools_stats samtools_stats -->|dna,rna| mosdepth end
subgraph variant_calling [Variant Calling (parallel)] vc_fork[ ] mutect2[Mutect2] strelka[Strelka2] sage[SAGE] vc_join[ ]
vc_fork -->|dna,rna| mutect2 vc_fork -->|dna,rna| strelka vc_fork -->|dna,rna| sage mutect2 -->|dna,rna| vc_join strelka -->|dna,rna| vc_join sage -->|dna,rna| vc_join end
subgraph normalization [Normalization & Annotation] %%metro exit: bottom | dna, rna vt_decompose[VT Decompose] vt_normalize[VT Normalize] ensemblvep[Ensembl VEP]
vt_decompose -->|dna,rna| vt_normalize vt_normalize -->|dna,rna| ensemblvep end
subgraph consensus [Consensus & Filtering] %%metro direction: RL %%metro entry: top | dna, rna %%metro exit: left | rna, realignment vcf2maf[vcf2MAF] run_consensus[Consensus] maf_filtering[MAF Filtering]
vcf2maf -->|dna,rna| run_consensus run_consensus -->|dna,rna| maf_filtering end
subgraph realign [Realignment (RNA)] %%metro direction: RL %%metro entry: right | realignment %%metro exit: left | realignment maf2bed[MAF2BED] extract_reads[Extract Reads] hisat2[HISAT2] markdup_re[MarkDuplicates] splitncigar_re[SplitNCigarReads] bqsr_re[BQSR] varcall_re[Variant Calling] norm_re[Normalization] annotate_re[Annotation] consensus_re[Consensus] filter_re[MAF Filtering]
maf2bed -->|realignment| extract_reads extract_reads -->|realignment| hisat2 hisat2 -->|realignment| markdup_re markdup_re -->|realignment| splitncigar_re splitncigar_re -->|realignment| bqsr_re bqsr_re -->|realignment| varcall_re varcall_re -->|realignment| norm_re norm_re -->|realignment| annotate_re annotate_re -->|realignment| consensus_re consensus_re -->|realignment| filter_re end
subgraph reporting [Reporting] %%metro direction: RL %%metro entry: right | rna, realignment rna_filter[RNA MAF Filtering] rna_filter -->|rna,realignment| multiqc multiqc[MultiQC] report_out[ ]
multiqc -->|rna,realignment| report_out end
%% Inter-section edges maf_filtering -->|realignment| maf2bed samtools_merge -->|dna,rna| markduplicates mosdepth -->|dna,rna| vc_fork vc_join -->|dna,rna| vt_decompose ensemblvep -->|dna,rna| vcf2maf filter_re -->|realignment| rna_filter maf_filtering -->|rna| rna_filterCLI command
nf-metro render examples/topologies/packed_cell_cellmate_bypass_adjacent.mmd -o packed_cell_cellmate_bypass_adjacent.svgRendered map
Branch Fold Forward
A side branch (Aux) shares a topo column with the spine (Genome). At a low fold threshold the serpentine packer skips that branch column as a fold point - folding it would strand Genome's consumer (Post) behind it - and folds the spine instead, so every inter-section edge flows forward and Genome's exit faces Post (issue #1080).
Mermaid source
%%metro title: Branch fold stays forward%%metro fold_threshold: 6%%metro line: main | Main | #0570b0%%metro line: side | Side | #e63946
graph LR subgraph intake [Intake] i0[ ] i1[Trim] i2[Filter] i3[QC] i0 -->|main,side| i1 i1 -->|main,side| i2 i2 -->|main,side| i3 end subgraph genome [Genome] %%metro entry: left | main %%metro exit: right | main g0[Align] g1[Dedup] g2[Quant] g0 -->|main| g1 g1 -->|main| g2 end subgraph aux [Aux] %%metro entry: left | side a0[Pseudo] a1[Count] a0 -->|side| a1 end subgraph post [Post] %%metro entry: left | main %%metro exit: bottom | main p0[Mark] p1[Track] p0 -->|main| p1 end subgraph report [Report] %%metro direction: RL %%metro entry: top | main r0[Collect] r1[ ] r0 -->|main| r1 end i3 -->|main| g0 i3 -->|side| a0 g2 -->|main| p0 p1 -->|main| r0CLI command
nf-metro render examples/topologies/branch_fold_forward.mmd -o branch_fold_forward.svgRendered map
Branch Fold Stability
A wide side branch (Survey) shares a topo column with the spine and sits one station below its fold threshold. Adding a station inside Survey must not re-grid the downstream Report onto a backward return row: inter-section placement is a function of the DAG, not of intra-section size (issue #1082).
Mermaid source
%%metro title: Branch-fold placement stability%%metro style: dark%%metro fold_threshold: 6%%metro line: survey | Survey | #0570b0%%metro line: align | Alignment | #2db572
graph LR subgraph ingest [Ingest] i1[Read] i2[Validate] i1 -->|survey,align| i2 end
subgraph survey [Survey] s1[Sketch] s2[Profile] s3[Classify] s4[Summarise] s1 -->|survey| s2 s2 -->|survey| s3 s3 -->|survey| s4 end
subgraph align [Alignment] a1[Index] a2[Map] a1 -->|align| a2 end
subgraph report [Report] r1[Aggregate] r2[Publish] r1 -->|align| r2 end
i2 -->|survey| s1 i2 -->|align| a1 a2 -->|align| r1CLI command
nf-metro render examples/topologies/branch_fold_stability.mmd -o branch_fold_stability.svgRendered map
Rl Entry Right Exit Left
A return-row section fed from the right that exits left, where the right entry feeds the section's internal flow-sink. The section resolves to RL flow rather than reading the declared ports as an in-place reversal (issue #1298).
Mermaid source
%%metro title: RL entry-right exit-left%%metro line: a | A | #e6007e%%metro grid: feed | 2,0%%metro grid: mid | 1,0%%metro grid: sink | 0,0
graph LR subgraph feed [Feed] %%metro exit: left | a f1[F1] end subgraph mid [Mid] %%metro entry: right | a %%metro exit: left | a m1[M1] m2[M2] m1 -->|a| m2 end subgraph sink [Sink] %%metro entry: right | a s1[S1] end f1 -->|a| m2 m2 -->|a| s1CLI command
nf-metro render examples/topologies/rl_entry_right_exit_left.mmd -o rl_entry_right_exit_left.svgRendered map
Inter-section Routing
Same Side Culdesac
A line declares its entry on a reversed (RL) section's flow-trailing edge, the edge the section flows out of, but its consumer is an interior station held off the leading end by a file terminus. Rather than fold the line back over the trunk to reach it, the entry re-anchors to the section's leading edge; the producer then reaches it by wrapping over the section top, so the line reads as a clean loop and the consumer is a straight pass-through.
Mermaid source
%%metro title: Same-Side Cul-de-Sac%%metro style: dark%%metro directional: true%%metro line: flow | Flow | #0570b0%%metro line: feed | Feed | #41ab5d%%metro file: f | FASTQ%%metro grid: producer | 0,0%%metro grid: mid | 1,0
graph LR subgraph producer [Producer] p1[Source] p2[Prepare] p1 -->|flow| p2 end subgraph mid [Cul-de-sac] %%metro direction: RL %%metro entry: left | flow f[ ] inner[Inner] outer[Outer] f -->|feed| inner inner -->|flow| outer end p2 -->|flow| innerCLI command
nf-metro render examples/topologies/same_side_culdesac.mmd -o same_side_culdesac.svgRendered map
Left Exit Sink Below
A TB bridge's LEFT exit feeds a LEFT-entry sink one row below and to the left: the bundle leads out left and drops straight down a channel clear of both boxes, routing around the bridge rather than clawing back through its interior (issue #1083).
Mermaid source
%%metro title: LEFT exit feeds a LEFT-entry sink one row below and to the left%%metro line: main | Main | #e64980%%metro grid: pre | 0,0%%metro grid: align | 1,0%%metro grid: bridge | 2,0%%metro grid: sink | 1,1
graph LR subgraph pre [Pre] p1[P1] -->|main| p2[P2] end subgraph align [Align] a1[A1] -->|main| a2[A2] end subgraph bridge [Bridge] %%metro direction: TB %%metro entry: top | main %%metro exit: left | main b1[B1] -->|main| b2[B2] b2 -->|main| b3[B3] b3 -->|main| b4[B4] end subgraph sink [Sink] %%metro entry: left | main s1[S1] -->|main| s2[S2] end p2 -->|main| a1 a2 -->|main| b1 b4 -->|main| s1CLI command
nf-metro render examples/topologies/left_exit_sink_below.mmd -o left_exit_sink_below.svgRendered map
Right Entry Gap Above Empty Row
A right-entry feed from a source two rows above its target, where the target flows right-to-left so its flow-start consumer sits at the entry edge: the feed loops around below into the port beside the consumer rather than crossing the box and folding back (#885).
Mermaid source
%%metro title: Right Entry Gap Above Empty Row%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: source | 0,0%%metro grid: blocker | 1,0%%metro grid: target | 2,2
graph LR subgraph source [Source] s1[Input] s2[Output] s1 -->|a| s2 end
subgraph blocker [Blocker] b1[Process] b2[Output] b1 -->|a| b2 end
subgraph target [Target] %%metro entry: right | a t1[Process] t2[Output] t1 -->|a| t2 end
s2 -->|a| t1CLI command
nf-metro render examples/topologies/right_entry_gap_above_empty_row.mmd -o right_entry_gap_above_empty_row.svgRendered map
Corridor Narrow Gap Fallback
A left-entry feed crosses two rows past a wider intervening section whose inter-row gap is too narrow for the corridor's clearance band, so it falls back to the around-below loop clear of that section while the adjacent feeder takes the corridor (issue #722).
Mermaid source
%%metro title: Corridor Narrow Gap Fallback%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: source | 2,0%%metro grid: tall | 2,1%%metro grid: target | 1,2
graph LR subgraph source [Source] s1[Input] s2[Process] s1 -->|a,b| s2 end
subgraph tall [Tall Section] %%metro entry: left | a k1[Step A] k2[Step B] k3[Step C] k4[Step D] k1 -->|a| k2 k2 -->|a| k3 k3 -->|a| k4 end
subgraph target [Target] %%metro entry: left | a, b t1[Process] t2[Output] t1 -->|a,b| t2 end
s2 -->|b| t1 s2 -->|a| t1 k4 -->|a| t1CLI command
nf-metro render examples/topologies/corridor_narrow_gap_fallback.mmd -o corridor_narrow_gap_fallback.svgRendered map
Around Section Below
Cross-row route to a LEFT-entry target where the natural inter-row channel would cut through an intervening section's bbox. Exercises `_route_around_section_below` (collector-fan-in geometry).
Mermaid source
%%metro title: Around Section Below%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: source | 2,0%%metro grid: middle | 1,1%%metro grid: target | 0,2
graph LR subgraph source [Source] s1[Input] s2[Output] s1 -->|a,b| s2 end
subgraph middle [Middle Row] m1[Process] m2[Output] m1 -->|a| m2 end
subgraph target [Target] %%metro entry: left | a, b t1[Process] t2[Output] t1 -->|a,b| t2 end
s2 -->|a,b| t1 s2 -->|a| m1CLI command
nf-metro render examples/topologies/around_section_below.mmd -o around_section_below.svgRendered map
Inter Row Wrap Clearance
A right-exit bundle wrapping down to a left-entry in the row below. The horizontal run sits centred in the inter-row gap, clear of both the section above and the next row's header.
Mermaid source
%%metro title: Inter-row wrap clearance%%metro style: dark%%metro center_ports: true%%metro line: l1 | Line 1 | #0570b0%%metro line: l2 | Line 2 | #d62728%%metro line: l3 | Line 3 | #756bb1%%metro grid: top | 0,0%%metro grid: bottom | 0,1
graph LR subgraph top [Top section] %%metro exit: right | l1, l2, l3 a_in[ ] a1[Step A1] a2[Step A2] a3[Step A3] a_in -->|l1,l2,l3| a1 a1 -->|l1,l2,l3| a2 a2 -->|l1,l2,l3| a3 end
subgraph bottom [Bottom section] %%metro entry: left | l1, l2, l3 b_in[ ] b1[Step B1] b2[Step B2] b_in -->|l1,l2,l3| b1 b1 -->|l1,l2,l3| b2 end
a3 -->|l1,l2,l3| b_inCLI command
nf-metro render examples/topologies/inter_row_wrap_clearance.mmd -o inter_row_wrap_clearance.svgRendered map
Inter Row Drop Section Clearance
An inter-row drop threading the gap between two packed sections whose internal sub-gaps are offset by less than the routing clearance. The vertical channel sits centred in the overlap, sharing the unavoidable shortfall evenly instead of skimming one section's edge.
Mermaid source
%%metro title: Inter-row drop channel clearance%%metro line: l1 | Line 1 | #e6007e%%metro grid: src | 0,0%%metro grid: top_a, top_b | 1,0%%metro grid: bot_c, bot_d | 1,1
graph LR subgraph src [Source] %%metro exit: right | l1 s1[Start] end subgraph top_a [Top A] %%metro entry: left | l1 %%metro exit: right | l1 a1[Aa] end subgraph top_b [Top B] %%metro entry: left | l1 b1[Bb] end subgraph bot_c [Bottom C] %%metro entry: left | l1 c1[Cc] c2[Plastid Pi counts] c1 -->|l1| c2 end subgraph bot_d [Bottom D] %%metro entry: left | l1 d1[Dd] end
s1 -->|l1| a1 a1 -->|l1| b1 a1 -->|l1| d1CLI command
nf-metro render examples/topologies/inter_row_drop_section_clearance.mmd -o inter_row_drop_section_clearance.svgRendered map
Inter Row Drop Section Clearance Row1
The same offset packed-section squeeze as inter_row_drop_section_clearance, with the wider section in the lower row so the drop would otherwise hug the row-1 section's edge; the channel is centred in the gap instead.
Mermaid source
%%metro title: Inter-row drop channel clearance (row-1 hug)%%metro line: l1 | Line 1 | #e6007e%%metro grid: src | 0,0%%metro grid: top_a, top_b | 1,0%%metro grid: bot_c, bot_d | 1,1
graph LR subgraph src [Source] %%metro exit: right | l1 s1[Start] end subgraph top_a [Top A] %%metro entry: left | l1 %%metro exit: right | l1 a1[Aa] end subgraph bot_c [Bottom C] %%metro entry: left | l1 c1[Cc] c2[Plastid Pi counts] c1 -->|l1| c2 end subgraph bot_d [Bottom D] %%metro entry: left | l1 d1[Dd] end subgraph top_b [Top B] %%metro entry: left | l1 b1[Bb] end
s1 -->|l1| a1 a1 -->|l1| b1 a1 -->|l1| d1CLI command
nf-metro render examples/topologies/inter_row_drop_section_clearance_row1.mmd -o inter_row_drop_section_clearance_row1.svgRendered map
Cross Col Top Entry
A cross-column feed from a RIGHT-exit producer into a TOP-entry consumer: the entry port is placed on the section boundary rather than floating above the canvas (issue #740).
Mermaid source
%%metro title: Cross-Column Top Entry%%metro style: dark%%metro line: l1 | Line 1 | #0570b0
graph LR subgraph producer [Producer] %%metro exit: right | l1 p1[Step P1] p2[Step P2] p1 -->|l1| p2 end
subgraph consumer [Consumer] %%metro entry: top | l1 c1[Step C1] c2[Step C2] c1 -->|l1| c2 end
p2 -->|l1| c1CLI command
nf-metro render examples/topologies/cross_col_top_entry.mmd -o cross_col_top_entry.svgRendered map
Lr Top Entry Cross Column
A TB section dropping from its BOTTOM exit into the TOP entry of an LR section whose run sits left of the drop column: the LR run is shifted right under the drop and the section bbox follows it so the trailing station stays contained (issue #1057).
Mermaid source
%%metro title: LR top-entry cross-column drop%%metro line: a | A | #e63946%%metro grid: work | 0,0%%metro grid: out_sec | 0,1graph LR subgraph work [Work] %%metro direction: TB %%metro exit: bottom | a w1[Demux] w2[Merge] w1 -->|a| w2 end subgraph out_sec [Output] %%metro direction: LR %%metro entry: top | a o1[Publish] o2[Notify] o1 -->|a| o2 end w2 -->|a| o1CLI command
nf-metro render examples/topologies/lr_top_entry_cross_column.mmd -o lr_top_entry_cross_column.svgRendered map
Lr Top Entry Cross Column Two Line
Two lines dropping together from a TB BOTTOM exit into the TOP entry of an LR section: the in-section line order follows the arrival order so the entry corner nests concentrically and the bundle neither pinches nor crosses through the bend (issue #1061).
Mermaid source
%%metro title: TB perp exit into LR top-entry, two lines%%metro line: a | A | #e63946%%metro line: b | B | #0570b0%%metro grid: work | 0,0%%metro grid: out_sec | 0,1graph LR subgraph work [Work] %%metro direction: TB %%metro exit: bottom | a,b w1[Demux] w2[Merge] w1 -->|a,b| w2 end subgraph out_sec [Output] %%metro direction: LR %%metro entry: top | a,b o1[Publish] o2[Notify] o1 -->|a,b| o2 end w2 -->|a,b| o1CLI command
nf-metro render examples/topologies/lr_top_entry_cross_column_two_line.mmd -o lr_top_entry_cross_column_two_line.svgRendered map
Right Entry Wrap No Fan
A single line wrapping from an LR exit into a cross-row RL section's RIGHT entry, with no junction siblings (the solo `_route_right_entry_wrap` lead-in).
Mermaid source
%%metro title: Right Entry Wrap No Fan%%metro style: dark%%metro line: a | A | #e63946%%metro grid: source | 0,0%%metro grid: target | 1,1
graph LR subgraph source [Source] s1[Start] s2[Process] s1 -->|a| s2 end
subgraph target [Target] %%metro direction: RL %%metro entry: right | a t1[Step One] t2[Step Two] t1 -->|a| t2 end
s2 -->|a| t1CLI command
nf-metro render examples/topologies/right_entry_wrap_no_fan.mmd -o right_entry_wrap_no_fan.svgRendered map
Left Entry Up Wrap
A two-line bundle wrapping up-and-left from a source below-and-right into a cross-row section's LEFT entry (the `_route_left_entry_wrap` up-riser path); the bundle order is preserved concentrically around the wrap.
Mermaid source
%%metro title: Left-entry up-wrap bundle%%metro style: dark%%metro line: w1 | W1 | #e63946%%metro line: w2 | W2 | #0570b0%%metro grid: left_tgt | 0,0%%metro grid: right_src | 1,1graph LR subgraph left_tgt [Left Target] %%metro entry: left | w1, w2 lt1[Collect] lt2[Output] lt1 -->|w1,w2| lt2 end subgraph right_src [Right Source] rs1[Input R] rs2[Hub R] rs1 -->|w1,w2| rs2 end rs2 -->|w1,w2| lt1CLI command
nf-metro render examples/topologies/left_entry_up_wrap.mmd -o left_entry_up_wrap.svgRendered map
Around Below Ep Col Gt0
A two-line bundle looping around below the canvas into a non-zero-column LEFT-entry target, past an intervening middle-row section that blocks the direct wrap.
Mermaid source
%%metro title: Around Section Below Ep Col%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0
%%metro grid: source | 3,0%%metro grid: middle | 2,1%%metro grid: target | 1,2
graph LR subgraph source [Source] s1[Input] s2[Output] s1 -->|a,b| s2 end
subgraph middle [Middle Row] m1[Process] m2[Output] m1 -->|a| m2 end
subgraph target [Target] %%metro entry: left | a, b t1[Process] t2[Output] t1 -->|a,b| t2 end
s2 -->|a,b| t1 s2 -->|a| m1CLI command
nf-metro render examples/topologies/around_below_ep_col_gt0.mmd -o around_below_ep_col_gt0.svgRendered map
Stacked Left Exit Drop
A LEFT exit feeding a LEFT entry stacked directly below it: the connector leads out into a clean channel left of the column and drops, rather than dropping straight down the shared edge through the source box.
Mermaid source
%%metro title: Stacked Left Exit Drop%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: sec1 | 0,0%%metro grid: sec2 | 0,1
graph LR subgraph sec1 [Section 1] %%metro direction: RL %%metro exit: left | a s1[Start] s2[Step] s1 -->|a| s2 end
subgraph sec2 [Section 2] %%metro entry: left | a t1[Final] t2[Done] t1 -->|a| t2 end
s2 -->|a| t1CLI command
nf-metro render examples/topologies/stacked_left_exit_drop.mmd -o stacked_left_exit_drop.svgRendered map
Right Entry From Above
A RIGHT entry whose consumer is the section's flow-start station: the section flows right-to-left so the consumer sits at the entry edge and the feed enters beside it, rather than running across the box to the far station and folding back (#885). Fed from a higher row past the target's right edge, the line drops straight down its outward side to the entry Y rather than looping below the box (#889).
Mermaid source
%%metro title: Right Entry From Above%%metro style: nfcore%%metro line: a | A | #e63946%%metro grid: src | 1,0%%metro grid: tgt | 0,1
graph LR subgraph src [Source] s1[Step 1] s2[Step 2] s1 -->|a| s2 end
subgraph tgt [Target] %%metro entry: right | a t1[Process] t2[Output] t1 -->|a| t2 end
s2 -->|a| t1CLI command
nf-metro render examples/topologies/right_entry_from_above.mmd -o right_entry_from_above.svgRendered map
Right Entry From Above Far
A RIGHT entry fed from two rows up, past the target's right edge: the line drops straight down its outward side across the empty intervening row to the entry Y and turns in, rather than diving below the box and climbing back up (#889).
Mermaid source
%%metro title: Right Entry From Above (Far Drop)%%metro style: nfcore%%metro line: a | A | #e63946%%metro grid: src | 1,0%%metro grid: tgt | 0,2
graph LR subgraph src [Source] s1[Step 1] s2[Step 2] s1 -->|a| s2 end
subgraph tgt [Target] %%metro entry: right | a t1[Process] t2[Output] t1 -->|a| t2 end
s2 -->|a| t1CLI command
nf-metro render examples/topologies/right_entry_from_above_far.mmd -o right_entry_from_above_far.svgRendered map
Route Around Intervening
A line skips a middle section: it routes around the intervening section's bbox rather than slicing through it.
Mermaid source
%%metro title: Route Around Intervening%%metro style: dark%%metro line: trunk | Trunk | #0570b0%%metro line: skip | Skip | #e63946
%%metro grid: source | 0,0%%metro grid: middle | 1,0%%metro grid: target | 2,0
graph LR subgraph source [Source] s1[Input] s2[Output] s1 -->|trunk,skip| s2 end
subgraph middle [Middle] m1[Process] m2[Output] m1 -->|trunk| m2 end
subgraph target [Target] t1[Collect] t2[Report] t1 -->|trunk,skip| t2 end
s2 -->|trunk| m1 m2 -->|trunk| t1 s2 -->|skip| t1CLI command
nf-metro render examples/topologies/route_around_intervening.mmd -o route_around_intervening.svgRendered map
Cross Row Gap Wrap
A cross-row feed runs its horizontal in the inter-row gap and drops straight in, rather than diving under the return row counter to its flow.
Mermaid source
%%metro title: Cross-Row Gap Wrap%%metro style: dark%%metro line: main | Main | #0570b0%%metro line: feed | Feed | #e63946%%metro fold_threshold: 8
graph LR subgraph ingest [Ingest] i1[Read] i2[QC] i1 -->|main,feed| i2 end
subgraph align [Align] a1[Map] a2[Sort] a1 -->|main| a2 end
subgraph dedup [Dedup] d1[Mark] d2[Recal] d1 -->|main| d2 end
subgraph merge_pt [Merge] g1[Combine] g2[Refine] g1 -->|main,feed| g2 end
subgraph report [Report] rp1[Summarise] rp2[Publish] rp1 -->|main| rp2 end
i2 -->|main| a1 a2 -->|main| d1 d2 -->|main| g1 i2 -->|main| g1 g2 -->|main| rp1 i2 -->|feed| g1CLI command
nf-metro render examples/topologies/cross_row_gap_wrap.mmd -o cross_row_gap_wrap.svgRendered map
Rl Entry Runway
A source section feeding a left-hand target via `%%metro exit: left`: it flows right-to-left so its producers sit at the left exit edge and the runway leaves beside them, rather than the producers exiting left back through the start station (#885).
Mermaid source
%%metro title: RL Entry Runway%%metro style: dark%%metro line: l1 | L1 | #2db572%%metro line: l2 | L2 | #e63946%%metro grid: rl_sec | 0,0%%metro grid: src_sec | 1,0
graph LR subgraph src_sec [Source] %%metro exit: left | l1,l2 s1[Start] s2[Prep A] s3[Prep B] s1 -->|l1| s2 s1 -->|l2| s3 end
subgraph rl_sec [RL Section] %%metro direction: RL %%metro entry: right | l1,l2 r1[Stage One] r2[Stage Two] r3[Stage Three] r4[Deep Target] r1 -->|l1| r2 r2 -->|l1| r3 r3 -->|l1| r4 r1 -->|l2| r2 end
s2 -->|l1| r4 s3 -->|l2| r1CLI command
nf-metro render examples/topologies/rl_entry_runway.mmd -o rl_entry_runway.svgRendered map
Lr Perp Top Exit Side Entry
Two co-travelling lines leave an LR section through an explicit TOP exit and feed the LEFT entry of a same-row neighbour. The exit port sits past the last station, and the bundle rises into the header band, runs across, and descends to the consumer's row to enter straight, staying parallel through every concentric corner.
Mermaid source
%%metro title: LR Perp Top Exit into Side Entry%%metro style: dark%%metro line: a | Line A | #e63946%%metro line: b | Line B | #0570b0
graph LR subgraph src [Source] s1[Start] end
subgraph mid [Middle] %%metro exit: top | a, b m1[Step 1] m2[Step 2] m1 -->|a,b| m2 end
subgraph dst [Destination] d1[Finish] end
s1 -->|a,b| m1 m2 -->|a,b| d1CLI command
nf-metro render examples/topologies/lr_perp_top_exit_side_entry.mmd -o lr_perp_top_exit_side_entry.svgRendered map
Lr Perp Bottom Exit Side Entry
The BOTTOM-exit mirror of lr_perp_top_exit_side_entry: the bundle drops below the source section, runs across the under-row band, and rises back to the consumer's row to enter straight.
Mermaid source
%%metro title: LR Perp Bottom Exit into Side Entry%%metro style: dark%%metro line: a | Line A | #e63946%%metro line: b | Line B | #0570b0
graph LR subgraph src [Source] s1[Start] end
subgraph mid [Middle] %%metro exit: bottom | a, b m1[Step 1] m2[Step 2] m1 -->|a,b| m2 end
subgraph dst [Destination] d1[Finish] end
s1 -->|a,b| m1 m2 -->|a,b| d1CLI command
nf-metro render examples/topologies/lr_perp_bottom_exit_side_entry.mmd -o lr_perp_bottom_exit_side_entry.svgRendered map
Lr Perp Top Exit Perp Entry
Two co-travelling lines leave an LR section through a TOP exit and feed the TOP entry of a same-row neighbour in another column. The bundle rises over the header band and drops into the consumer trunk, keeping a single left/right order across the shared entry port so it stays parallel without crossing at the drop.
Mermaid source
%%metro title: Cross-Column Perp Entry%%metro style: dark%%metro line: main | Main | #e63946%%metro line: branch | Branch | #2db572
graph LR subgraph src [Source] %%metro exit: right | main,branch s1[Start] end subgraph sec1 [Section One] %%metro entry: left | main,branch %%metro exit: top | main,branch a[Input] b[Output] a -->|main,branch| b end subgraph sec2 [Section Two] %%metro entry: top | main,branch d[Step D] e[Step E] d -->|main,branch| e end s1 -->|main,branch| a b -->|main,branch| dCLI command
nf-metro render examples/topologies/lr_perp_top_exit_perp_entry.mmd -o lr_perp_top_exit_perp_entry.svgRendered map
Lr Perp Bottom Exit Perp Entry
The BOTTOM-exit mirror of lr_perp_top_exit_perp_entry: the bundle drops under the row, runs across, and rises into the consumer's BOTTOM entry, staying parallel through the corridor.
Mermaid source
%%metro title: Cross-Column Perp Bottom Entry%%metro style: dark%%metro line: main | Main | #e63946%%metro line: branch | Branch | #2db572
graph LR subgraph src [Source] %%metro exit: right | main,branch s1[Start] end subgraph sec1 [Section One] %%metro entry: left | main,branch %%metro exit: bottom | main,branch a[Input] b[Output] a -->|main,branch| b end subgraph sec2 [Section Two] %%metro entry: bottom | main,branch d[Step D] e[Step E] d -->|main,branch| e end s1 -->|main,branch| a b -->|main,branch| dCLI command
nf-metro render examples/topologies/lr_perp_bottom_exit_perp_entry.mmd -o lr_perp_bottom_exit_perp_entry.svgRendered map
Lr Perp Top Exit Perp Entry Diverging
A TOP-exit bundle taken over the corridor into a TOP entry where the two lines split to different downstream stations. Consistent corridor ordering routes each line to its target without a convergence jog at the entry.
Mermaid source
%%metro title: Cross-Column Perp Entry Diverging%%metro style: dark%%metro line: main | Main | #e63946%%metro line: branch | Branch | #2db572
graph LR subgraph src [Source] %%metro exit: right | main,branch s1[Start] end subgraph sec1 [Section One] %%metro entry: left | main,branch %%metro exit: top | main,branch a[Input] b[Output] a -->|main,branch| b end subgraph sec2 [Section Two] %%metro entry: top | main,branch d[Step D] e[Step E] d -->|main| e end s1 -->|main,branch| a b -->|main| d b -->|branch| eCLI command
nf-metro render examples/topologies/lr_perp_top_exit_perp_entry_diverging.mmd -o lr_perp_top_exit_perp_entry_diverging.svgRendered map
Cross Column Perp Drop
A `%%metro direction: TB` section fed by a perpendicular drop from a section in a different grid column. The vertical trunk stays on the QC section's own column and the cross-column feed comes over the top and drops into the trunk head, rather than the trunk being dragged out toward the off-column source.
Mermaid source
%%metro title: Cross-column perpendicular drop%%metro line: reads | Reads | #1f77b4
graph LR subgraph align [Alignment] %%metro exit: top | reads load[Load] trim[Trim] bwa[BWA-MEM] load -->|reads| trim trim -->|reads| bwa end subgraph qc [QC report] %%metro direction: TB %%metro entry: top | reads collect[Collect] multiqc[MultiQC] collect -->|reads| multiqc end bwa -->|reads| collectCLI command
nf-metro render examples/topologies/cross_column_perp_drop.mmd -o cross_column_perp_drop.svgRendered map
Cross Column Perp Drop Far Exit
The cross-column perpendicular drop where the source's exit side faces away from the target's entry side (a BOTTOM exit feeding a TOP entry). The lead-in crosses to the inter-column gap and reaches the TOP entry from above the box, rather than rising up the trunk through the section's stations.
Mermaid source
%%metro title: Cross-column perpendicular drop (far-side exit)%%metro line: reads | Reads | #1f77b4
graph LR subgraph align [Alignment] %%metro exit: bottom | reads load[Load] trim[Trim] bwa[BWA-MEM] load -->|reads| trim trim -->|reads| bwa end subgraph qc [QC report] %%metro direction: TB %%metro entry: top | reads collect[Collect] multiqc[MultiQC] collect -->|reads| multiqc end bwa -->|reads| collectCLI command
nf-metro render examples/topologies/cross_column_perp_drop_far_exit.mmd -o cross_column_perp_drop_far_exit.svgRendered map
Bottom Row Climb Clear Corridor
A section in the bottommost grid row sends a line up and across to a higher-row target several columns away. The columns it spans hold no same-row section, so the line runs along its own row level and climbs at the end rather than diving below the source row to the canvas floor and looping back up.
Mermaid source
%%metro title: Bottom-row climb over a clear corridor%%metro style: dark%%metro line: main | Main | #2db572%%metro line: side | Side | #ff8c00%%metro grid: feed | 0,0%%metro grid: mid_a | 2,0%%metro grid: mid_b | 3,0%%metro grid: dest | 4,0%%metro grid: low | 1,1
graph LR subgraph feed [Feed] a[A] end
subgraph low [Low] x[X] end
subgraph mid_a [Mid A] m[M] end
subgraph mid_b [Mid B] n[N] end
subgraph dest [Dest] z[Z] end
a -->|main| m m -->|main| n n -->|main| z
a -->|side| x x -->|side| zCLI command
nf-metro render examples/topologies/bottom_row_climb_clear_corridor.mmd -o bottom_row_climb_clear_corridor.svgRendered map
Multicarrier Offrow Exit Climb
A section's exit port carries two lines from two stations that share a trunk row off the port row, then fans out through a junction to several rows. The parallel bundle anchors on the shared carrier row so it runs flat inside the section and the fan-out risers fall in the inter-section gap, rather than both lines climbing a diagonal up to the port inside the section.
Mermaid source
%%metro title: Multi-carrier off-row exit climb%%metro style: dark%%metro line: ubam | uBAM | #0570b0%%metro line: fastq | FASTQ | #2db572%%metro line: bam | BAM | #f5c542%%metro line: other | Other | #ff8c00%%metro files: fastq_in | FASTQ%%metro files: bam_in | BAM%%metro files: ubam_in | uBAM%%metro grid: prep | 0,0%%metro grid: variants | 1,0%%metro grid: depth | 1,1
graph LR subgraph prep [Pre-processing] fastq_in[ ] bam_in[ ] ubam_in[ ] cat_fastq[cat FASTQ] samtools_merge[samtools\nmerge] minimap2_align[minimap2] samtools_sort_index[samtools\nsort/index] mosdepth[mosdepth]
fastq_in -->|fastq| cat_fastq ubam_in -->|ubam| samtools_merge bam_in -->|bam| samtools_merge cat_fastq -->|fastq| minimap2_align samtools_merge -->|ubam| minimap2_align minimap2_align -->|bam| samtools_sort_index samtools_merge -->|bam| samtools_sort_index samtools_sort_index -->|bam| mosdepth end subgraph variants [Small variant calling] clair3[Clair3] deepvariant[Deepvariant] end subgraph depth [Depth & repeats] longtr[LongTR] ontspectre[ont-spectre] end samtools_sort_index -->|bam| clair3 samtools_sort_index -->|bam| deepvariant samtools_sort_index -->|bam| longtr mosdepth -->|other| ontspectreCLI command
nf-metro render examples/topologies/multicarrier_offrow_exit_climb.mmd -o multicarrier_offrow_exit_climb.svgRendered map
Clear Channel Target Aware Push
A hub fans one line down into a wide section stacked directly below and another down-and-right to a target. The fan descent for the rightward line grazes the wide block, so the graze correction pushes it toward the target's side of the block rather than the nearer edge, keeping the line heading to its target instead of detouring across the canvas.
Mermaid source
%%metro title: Fan descent target-aware push%%metro line: dna | DNA | #2db572%%metro line: rna | RNA | #e63946
%%metro grid: src | 0,0%%metro grid: block | 0,1%%metro grid: target | 1,2
graph LR subgraph src [Src] s_in[I] s_hub[H] s_in -->|dna,rna| s_hub end subgraph block [Block] b_a[A] b_b[B] b_c[C] b_d[D] b_e[E] b_f[F] b_a -->|dna| b_b b_b -->|dna| b_c b_c -->|dna| b_d b_d -->|dna| b_e b_e -->|dna| b_f end subgraph target [Target] %%metro entry: left | rna t_a[T1] t_b[T2] t_a -->|rna| t_b end s_hub -->|rna| t_a s_hub -->|dna| b_aCLI command
nf-metro render examples/topologies/clear_channel_target_aware_push.mmd -o clear_channel_target_aware_push.svgRendered map
Near Vertical Junction Hook
A fan-out junction overhanging a same-column RIGHT entry one row below. The two-line bundle drops straight down the junction's own column and turns once into the port, rather than leading out to a centred gap channel and hooking back: a hook's opposite-handed corners cannot nest a multi-line bundle. The destination section carries the matching line order so the bundle arrives in the order the section lays it out (#1018).
Mermaid source
%%metro title: Near-Vertical Junction Hook%%metro style: nfcore%%metro line: main | Main | #2db572%%metro line: a | A | #e63946%%metro line: b | B | #7b2d3b%%metro grid: src | 0,0%%metro grid: gen | 1,0%%metro grid: pseudo | 0,1
graph LR subgraph src [Source] s1[Step 1] s2[Step 2] s3[Step 3] s1 -->|main,a,b| s2 s2 -->|main,a,b| s3 end
subgraph gen [Genome] g1[Genome] end
subgraph pseudo [Pseudo] %%metro entry: right | a, b p1[Pseudo 1] p2[Pseudo 2] p3[Pseudo 3] p1 -->|a,b| p2 p2 -->|a,b| p3 end
s3 -->|main| g1 s3 -->|a,b| p1CLI command
nf-metro render examples/topologies/near_vertical_junction_hook.mmd -o near_vertical_junction_hook.svgRendered map
Near Edge Exit Corner
A station one column short of its section's right edge whose exit port sits on that edge, one lane below it. Equalising the station's flat runs must not push the exit's approach corner past the port: the corner stays inside the box so the line turns down through the port cleanly rather than bulging outside the section and doubling back (issue #1314).
Mermaid source
%%metro title: Near-edge exit corner%%metro line: riboseq | Ribo-seq | #e6007e%%metro line: rnaseq | RNA-seq | #2db572
graph LR subgraph psite_id [P-site identification] ribowaltz[riboWaltz] plastid_wiggle[plastid Wiggle] psite_counts[Plastid P-site counts] quantify_orf_psite[Quantify ORF P-sites]
ribowaltz -->|riboseq| report_ribowaltz[riboWaltz report] plastid_psite[plastid P-site] -->|riboseq| plastid_wiggle plastid_wiggle -->|riboseq| psite_counts orf_catalogue[ORF catalogue] -->|riboseq| quantify_orf_psite plastid_wiggle -->|riboseq| quantify_orf_psite end subgraph te [Translational efficiency] dte_counts_prep[Prep ORF TE counts] -->|riboseq,rnaseq| deltate_orf[DESeq2 deltaTE] dte_counts_prep -->|riboseq,rnaseq| dotseq_orf[DOTSeq] end psite_counts -->|riboseq| te_counts_prep[Prep TE counts] quantify_orf_psite -->|riboseq| dte_counts_prepCLI command
nf-metro render examples/topologies/near_edge_exit_corner.mmd -o near_edge_exit_corner.svgRendered map
Bypass Routing
Inrow Skip Breeze
An express line skips a station three collinear stations share; the geometric bypass pass bows it around the skipped marker (#990).
Mermaid source
%%metro title: In-row express skip%%metro style: dark%%metro line: a | Local | #2db572%%metro line: b | Express | #e63946graph LR subgraph s [Section] s1[S1] s2[S2] s3[S3] s1 -->|a| s2 s2 -->|a| s3 s1 -->|b| s3 endCLI command
nf-metro render examples/topologies/inrow_skip_breeze.mmd -o inrow_skip_breeze.svgRendered map
Sectionless Skip Breeze
A skip-line jumps between two stops on a graph with no declared section, skipping the stops between them. Interchange inference detects the parallel-lane hub and the detour routes around the skipped markers instead of through them (#1229).
Mermaid source
%%metro title: Sectionless express skip%%metro style: dark%%metro line: main | Main | #e63946%%metro line: alt | Alt | #1d4e89graph LR a[A] b[B] c[C] d[D] e[E] a -->|main| b b -->|main| c c -->|main| d d -->|main| e a -->|alt| c c -->|alt| eCLI command
nf-metro render examples/topologies/sectionless_skip_breeze.mmd -o sectionless_skip_breeze.svgRendered map
Interchange Label Clears Bridge
An in-section skip infers a two-member interchange at C, drawn with a vertical connector bridge between its rails. C's label clears the whole bridge (below the far track) instead of landing on it, where plain layer alternation would drop it (#1239).
Mermaid source
%%metro title: In-section express skip%%metro style: dark%%metro line: main | Main | #e63946%%metro line: alt | Alt | #1d4e89graph LR subgraph sec [Section] a[A] b[B] c[C] d[D] e[E] a -->|main| b b -->|main| c c -->|main| d d -->|main| e a -->|alt| c c -->|alt| e endCLI command
nf-metro render examples/topologies/interchange_label_clears_bridge.mmd -o interchange_label_clears_bridge.svgRendered map
Bypass Fan In Outer Slot
A bypass line (QC) skips hub and alignment to reach a deeper station (MultiQC Report) in the Integration section, while dna/meth/rna/atac converge at a fan-in entry port. The bypass line claims the outer slot so no empty interior gaps appear (issue #655).
Mermaid source
%%metro title: Bypass Fan-in Outer Slot%%metro style: dark%%metro line: dna | DNA | #e63946%%metro line: meth | Methylation | #0570b0%%metro line: rna | RNA | #2db572%%metro line: atac | ATAC | #f5c542%%metro line: qc | QC | #ff8c00
graph LR subgraph ingest [Ingest] samplesheet[Samplesheet] demux[Demultiplex] samplesheet -->|dna,meth,rna,atac,qc| demux end
subgraph trim [Trim & QC] fastp[Fastp] screen[Contam Screen] fastp -->|dna,meth,rna,atac,qc| screen end
subgraph hub [Branch Hub] dispatch[Dispatch] end
subgraph align_right [Alignment] bwa[BWA-MEM] markdup[MarkDup] bwa -->|dna,meth| markdup end
subgraph quant_bottom [Quantification] salmon[Salmon] tximport[Tximport] salmon -->|rna| tximport end
subgraph peaks_bottom [Peak Calling] macs[MACS2] macs -->|atac| macs2anno[Annotate Peaks] end
subgraph integrate [Integration] mofa[MOFA Factor Model] report[MultiQC Report] mofa -->|dna,meth,rna,atac| report end
demux -->|dna,meth,rna,atac,qc| fastp screen -->|dna,meth,rna,atac,qc| dispatch
dispatch -->|dna,meth| bwa dispatch -->|rna| salmon dispatch -->|atac| macs
markdup -->|dna,meth| mofa tximport -->|rna| mofa macs2anno -->|atac| mofa
screen -->|qc| reportCLI command
nf-metro render examples/topologies/bypass_fan_in_outer_slot.mmd -o bypass_fan_in_outer_slot.svgRendered map
Upward Bypass
Tall section bypass where the trunk is above the source (upward gap1).
Mermaid source
%%metro title: Upward Bypass Test%%metro style: dark%%metro line: a | Line A | #FF9800%%metro line: b | Line B | #4CAF50%%metro line: c | Line C | #2196F3%%metro line: d | Line D | #E91E63%%metro line: e | Line E | #9C27B0%%metro line: f | Line F | #00BCD4%%metro line: g | Line G | #CDDC39
graph LR subgraph input [Input] hub[Hub] end
subgraph wide [Wide Fan-out] w1[Tool 1] w2[Tool 2] w3[Tool 3] w4[Tool 4] w5[Tool 5] w6[Tool 6] w7[Tool 7] end
subgraph adjacent [Adjacent] adj[Collect] end
subgraph far [Far Target] out[Output] end
hub -->|a| w1 hub -->|b| w2 hub -->|c| w3 hub -->|d| w4 hub -->|e| w5 hub -->|f| w6 hub -->|g| w7
%% Adjacent (L-shape) w1 -->|a| adj
%% Bypass: bottom of wide -> far (skipping adjacent) w1 -->|a| out w2 -->|b| out w3 -->|c| out w4 -->|d| out w5 -->|e| out w6 -->|f| out w7 -->|g| out
adj -->|a| outCLI command
nf-metro render examples/topologies/upward_bypass.mmd -o upward_bypass.svgRendered map
Bypass Label Rake
A foreign line dips below a station to bypass its marker, then climbs back to the trunk past the wide 'Quantification' label. The router lengthens the dip's flat run so the climb seats clear of the glyphs (`_clear_bypass_v_label_strikes`).
Mermaid source
%%metro title: Bypass V Past A Wide Label%%metro style: dark%%metro line: dna | DNA | #e63946%%metro line: rna | RNA | #0570b0%%metro line: prot | Protein | #2db572
graph LR subgraph input [Input] fetch[Fetch Data] validate[Validate] fetch -->|dna,rna,prot| validate end
subgraph processing [Processing] branch[Branch] align[Alignment] quant[Quantification] search[Database Search] branch -->|dna,rna| align branch -->|prot| search align -->|rna| quant end
subgraph reporting [Reporting] multiqc[MultiQC] end
validate -->|dna,rna,prot| branch align -->|dna| multiqc quant -->|rna| multiqc search -->|prot| multiqcCLI command
nf-metro render examples/topologies/bypass_label_rake.mmd -o bypass_label_rake.svgRendered map
Bypass Label Rake Left
Mirror of the bypass-label rake: the dip's descending leg, not its climb, crosses the wide 'Quantification Step' label, so its V corner lands in the label's left half and the router seats it clear of the left edge (`_clear_bypass_v_label_strikes`).
Mermaid source
%%metro title: Bypass V Past A Wide Label (Left Overrun)%%metro style: dark%%metro line: dna | DNA | #e63946%%metro line: rna | RNA | #0570b0%%metro line: prot | Protein | #2db572
graph LR subgraph input [Input] fetch[Fetch Data] validate[Validate] fetch -->|dna,rna,prot| validate end
subgraph processing [Processing] branch[Branch] align[Alignment] quant[Quantification Step] search[Hits] branch -->|dna,rna| align branch -->|prot| search align -->|rna| quant end
subgraph reporting [Reporting] multiqc[MultiQC] end
validate -->|dna,rna,prot| branch align -->|dna| multiqc quant -->|rna| multiqc search -->|prot| multiqcCLI command
nf-metro render examples/topologies/bypass_label_rake_left.mmd -o bypass_label_rake_left.svgRendered map
Bypass Label Rake Wide
An extra-wide bypassed-station label the router cannot seat the V's flat-run corner clear of: the strike-clearance loop pushes the bypassed node out by whole grid columns until the dip clears the glyphs, widening rather than relying on the router's partial corner-seating (issue #700).
Mermaid source
%%metro title: Bypass V Past An Extra-Wide Label%%metro style: dark%%metro line: dna | DNA | #e63946%%metro line: rna | RNA | #0570b0%%metro line: prot | Protein | #2db572
graph LR subgraph input [Input] fetch[Fetch Data] validate[Validate] fetch -->|dna,rna,prot| validate end
subgraph processing [Processing] branch[Branch] align[Alignment] quant[Quantification And Expression Estimation Module] search[Database Search] branch -->|dna,rna| align branch -->|prot| search align -->|rna| quant end
subgraph reporting [Reporting] multiqc[MultiQC] end
validate -->|dna,rna,prot| branch align -->|dna| multiqc quant -->|rna| multiqc search -->|prot| multiqcCLI command
nf-metro render examples/topologies/bypass_label_rake_wide.mmd -o bypass_label_rake_wide.svgRendered map
Bypass V Tight
An intra-section bypass V at a tight column pitch: without room for a lead-in the descent would diverge on the 'Process A' marker and rake its label. The engine pushes the bypassed node to a further grid column so the V diverges past the label and keeps a visible flat run through its X (issue #688).
Mermaid source
%%metro title: Bypass V Tight%%metro style: dark%%metro x_spacing: 50%%metro line: a | Line A | #FF9800%%metro line: b | Line B | #4CAF50
graph LR subgraph src [Source] s1[Start] end subgraph mid [Mid] %%metro exit: right | a,b m1[Process A] m2[Transform] m1 -->|a| m2 end subgraph dest [Dest] d1[End] end
s1 -->|a,b| m1 m2 -->|a| d1 m1 -->|b| d1CLI command
nf-metro render examples/topologies/bypass_v_tight.mmd -o bypass_v_tight.svgRendered map
Fan Bypass Nesting
A junction fans to a straight continuation, three down-turns into stacked rows, and one far-column bypass. The bypass joins the same concentric corner as the down-turns and descends in the shared channel, peeling into its lane at the inter-row gap rather than grazing the down-turn corners near the junction (issue #652).
Mermaid source
%%metro title: Fan-out + bypass nesting%%metro line: dna | DNA | #2db572%%metro line: rna | RNA | #e63946%%metro line: qc | QC | #f4a261
graph LR subgraph src [Source] s_in[In] s_hub[Hub] s_in -->|dna,rna,qc| s_hub end
subgraph straight [Straight] st_a[A] st_b[B] st_a -->|dna| st_b end
subgraph down1 [Down 1] d1_a[C1] d1_b[C2] d1_a -->|dna| d1_b end
subgraph down2 [Down 2] d2_a[E1] d2_b[E2] d2_a -->|rna| d2_b end
subgraph down3 [Down 3] d3_a[F1] d3_b[F2] d3_a -->|rna| d3_b end
subgraph mid [Mid] m_a[M1] m_b[M2] m_a -->|dna,rna| m_b end
subgraph sink [Report] rp_a[R1] rp_b[R2] rp_a -->|dna,rna,qc| rp_b end
s_hub -->|dna| st_a s_hub -->|dna| d1_a s_hub -->|rna| d2_a s_hub -->|rna| d3_a s_hub -->|qc| rp_a d1_b -->|dna| m_a d2_b -->|rna| m_a d3_b -->|rna| m_a m_b -->|dna,rna| rp_aCLI command
nf-metro render examples/topologies/fan_bypass_nesting.mmd -o fan_bypass_nesting.svgRendered map
Divergent Fanout Split
One line fans out from a single source to a near and a far target in the row below. The two descents stay fused as one trunk until the near branch turns off, so the farther branch never peels onto the inside of the nearer one and crosses it (issue #702).
Mermaid source
%%metro title: Divergent Fanout Split%%metro style: dark%%metro line: main | Main | #0570b0%%metro grid: src | 0,0%%metro grid: nearrow | 1,1%%metro grid: farrow | 2,1
graph LR subgraph src [Source] %%metro exit: right | main s1[Input] s2[Process] s1 -->|main| s2 end subgraph nearrow [Near Target] %%metro entry: left | main n1[NearStep] end subgraph farrow [Far Target] %%metro entry: left | main f1[Collect] f2[Report] f1 -->|main| f2 end s2 -->|main| n1 s2 -->|main| f1CLI command
nf-metro render examples/topologies/divergent_fanout_split.mmd -o divergent_fanout_split.svgRendered map
Disjoint Sameline Trunks
Two lines diving into one below-row channel to bypass a section ride a tight concentric bundle until a member peels up at its turn column, rather than being split apart by a track reserved for a trunk that only appears further along the channel (issue #702).
Mermaid source
%%metro title: Disjoint Same-Line Bypass Trunks%%metro style: dark%%metro line: a | Line A | #e63946%%metro line: b | Line B | #2db572%%metro line: c | Line C | #0570b0%%metro grid: secA | 0,0%%metro grid: secB | 1,0%%metro grid: secC | 2,0%%metro grid: secD | 3,0%%metro grid: secE | 4,0
graph LR subgraph secA [Ingest] %%metro exit: right | a, b, c a_node[Input] end
subgraph secB [QC] %%metro entry: left | b %%metro exit: right | b b_node[QC Step] end
subgraph secC [Align] %%metro entry: left | a, b %%metro exit: right | a, b c_node[Align] end
subgraph secD [Call] %%metro entry: left | c %%metro exit: right | c d_node[Call] end
subgraph secE [Report] %%metro entry: left | a, b, c e_node[Report] end
a_node -->|b| b_node a_node -->|a| c_node a_node -->|c| d_node b_node -->|b| c_node c_node -->|a,b| e_node d_node -->|c| e_nodeCLI command
nf-metro render examples/topologies/disjoint_sameline_trunks.mmd -o disjoint_sameline_trunks.svgRendered map
Dogleg Exempt Distinct
A bypass line cleared off a different line's exempt wrap trunk in the inter-row gap runs parallel above it as a tight bundle, rather than doglegging onto the crossing side where its riser would pierce the wrap run twice (issue #702).
Mermaid source
%%metro title: Dogleg Off Exempt Trunks - Distinct Line Regime%%metro style: dark%%metro line: wrap | Wrap | #0570b0%%metro line: byp | Bypass | #e63946%%metro line: skip | Skip | #2ca02c
%%metro grid: left_tgt | 0,0%%metro grid: right_src | 1,1%%metro grid: bot_sink | 2,1%%metro grid: skip_src | 0,1
graph LR subgraph left_tgt [Left Target] %%metro entry: left | wrap lt1[Collect] lt2[Output] lt1 -->|wrap| lt2 end
subgraph right_src [Right Source] rs1[Input R] rs2[Hub R] rs1 -->|wrap| rs2 end
subgraph bot_sink [Bottom Sink] bs1[Collect B] bs2[Output B] bs1 -->|byp| bs2 end
subgraph skip_src [Skip Source] ss1[Step S] ss2[Out S] ss1 -->|skip| ss2 end
rs2 -->|wrap| lt1 lt2 -->|byp| bs1 ss2 -->|skip| bs1CLI command
nf-metro render examples/topologies/dogleg_exempt_distinct.mmd -o dogleg_exempt_distinct.svgRendered map
Dogleg Exempt Sameline
Two opposing flows of one line fused in the inter-row gap are pulled apart into a dogleg; the down-moved trunk stops short of the next row's section header badge, keeping the required clearance rather than crowding it (issue #698).
Mermaid source
%%metro title: Dogleg Off Exempt Trunks - Same Line Regime%%metro style: dark%%metro line: wrap | Wrap | #0570b0
%%metro grid: left_tgt | 0,0%%metro grid: right_src | 1,1%%metro grid: new_tgt | 2,1
graph LR subgraph left_tgt [Left Target] %%metro entry: left | wrap lt1[Collect] lt2[Output] lt1 -->|wrap| lt2 end
subgraph right_src [Right Source] rs1[Input R] rs2[Hub R] rs1 -->|wrap| rs2 end
subgraph new_tgt [New Target] nt1[Hub N] nt2[Out N] nt1 -->|wrap| nt2 end
rs2 -->|wrap| lt1 lt2 -->|wrap| nt1CLI command
nf-metro render examples/topologies/dogleg_exempt_sameline.mmd -o dogleg_exempt_sameline.svgRendered map
Dogleg Twoline Fanout
Two distinct lines leave one section through a shared exit junction to different sections in the row below. They descend as one concentric bundle and split only where the near line peels into its target while the far line continues over it, rather than diverging at the junction and crossing (issue #719).
Mermaid source
%%metro title: Two flows leaving one section%%metro style: dark%%metro line: to_src | To Source | #e7298a%%metro line: to_new | To New | #0570b0
%%metro grid: left_tgt | 0,0%%metro grid: right_src | 1,1%%metro grid: new_tgt | 2,1
graph LR subgraph left_tgt [Left Target] lt1[Collect] lt2[Output] lt1 -->|to_src,to_new| lt2 end
subgraph right_src [Right Source] rs1[Input R] rs2[Hub R] rs1 -->|to_src| rs2 end
subgraph new_tgt [New Target] nt1[Hub N] nt2[Out N] nt1 -->|to_new| nt2 end
lt2 -->|to_src| rs1 lt2 -->|to_new| nt1CLI command
nf-metro render examples/topologies/dogleg_twoline_fanout.mmd -o dogleg_twoline_fanout.svgRendered map
Bypass Gap2 Rightward Overflow
A seven-line rightward bypass whose gap-2 bundle right edge overflows the inter-column gap limit and is clamped, keeping the bundle inside the gap.
Mermaid source
%%metro title: Seven-line rightward bypass gap2 overflow clamp%%metro style: dark%%metro line: l1 | L1 | #e63946%%metro line: l2 | L2 | #0570b0%%metro line: l3 | L3 | #2db572%%metro line: l4 | L4 | #f4a261%%metro line: l5 | L5 | #9467bd%%metro line: l6 | L6 | #8c564b%%metro line: l7 | L7 | #17becf
%%metro grid: src_sec | 0,0%%metro grid: mid_sec | 1,0%%metro grid: tgt_sec | 2,0
graph LR subgraph src_sec [Source] %%metro exit: right | l1, l2, l3, l4, l5, l6, l7 s1[Start] s2[Out] s1 -->|l1,l2,l3,l4,l5,l6,l7| s2 end
subgraph mid_sec [Middle] m1[Mid] m2[MidOut] m1 -->|l1| m2 end
subgraph tgt_sec [Target] %%metro entry: left | l1, l2, l3, l4, l5, l6, l7 t1[Process] t2[End] t1 -->|l1,l2,l3,l4,l5,l6,l7| t2 end
s2 -->|l1| m1 s2 -->|l1,l2,l3,l4,l5,l6,l7| t1CLI command
nf-metro render examples/topologies/bypass_gap2_rightward_overflow.mmd -o bypass_gap2_rightward_overflow.svgRendered map
Bypass Leftward Overflow
A seven-line reverse-flow (right-to-left) bypass: the trunk leads out leftward, the mirror of every other bypass. The concentric order and corner radii follow the trunk's travel direction so the bundle fans cleanly instead of twisting at the descent corner (issue #723).
Mermaid source
%%metro title: Seven-line reverse-flow bypass overflow%%metro style: dark%%metro line: l1 | L1 | #e63946%%metro line: l2 | L2 | #0570b0%%metro line: l3 | L3 | #2db572%%metro line: l4 | L4 | #f4a261%%metro line: l5 | L5 | #9467bd%%metro line: l6 | L6 | #8c564b%%metro line: l7 | L7 | #17becf
%%metro grid: tgt_sec | 0,0%%metro grid: mid_sec | 1,0%%metro grid: src_sec | 2,0
graph LR subgraph src_sec [Source] %%metro exit: left | l1, l2, l3, l4, l5, l6, l7 s1[Start] s2[Out] s1 -->|l1,l2,l3,l4,l5,l6,l7| s2 end
subgraph mid_sec [Middle] m1[Mid] m2[MidOut] m1 -->|l1| m2 end
subgraph tgt_sec [Target] %%metro entry: right | l1, l2, l3, l4, l5, l6, l7 t1[Process] t2[End] t1 -->|l1,l2,l3,l4,l5,l6,l7| t2 end
s2 -->|l1,l2,l3,l4,l5,l6,l7| t1CLI command
nf-metro render examples/topologies/bypass_leftward_overflow.mmd -o bypass_leftward_overflow.svgRendered map
Bypass Leftward Far Side Entry
A seven-line reverse-flow bypass into a far-side LEFT entry: the source exits its left edge and the target's entry port is on its own far (left) edge, so the bundle wraps around below into the port from its outward side. The half-turn transposes the bundle, so the target section's line order is reversed to match and no line crosses a mate (issue #974).
Mermaid source
%%metro title: Seven-line leftward bypass far-side entry%%metro style: dark%%metro line: l1 | L1 | #e63946%%metro line: l2 | L2 | #0570b0%%metro line: l3 | L3 | #2db572%%metro line: l4 | L4 | #f4a261%%metro line: l5 | L5 | #9467bd%%metro line: l6 | L6 | #8c564b%%metro line: l7 | L7 | #17becf
%%metro grid: tgt_sec | 0,0%%metro grid: mid_sec | 1,0%%metro grid: src_sec | 2,0
graph LR subgraph src_sec [Source] %%metro exit: left | l1, l2, l3, l4, l5, l6, l7 s1[Start] s2[Out] s1 -->|l1,l2,l3,l4,l5,l6,l7| s2 end subgraph mid_sec [Middle] m1[Mid] m2[MidOut] m1 -->|l1| m2 end subgraph tgt_sec [Target] %%metro entry: left | l1, l2, l3, l4, l5, l6, l7 t1[Process] t2[End] t1 -->|l1,l2,l3,l4,l5,l6,l7| t2 end s2 -->|l1,l2,l3,l4,l5,l6,l7| t1CLI command
nf-metro render examples/topologies/bypass_leftward_far_side_entry.mmd -o bypass_leftward_far_side_entry.svgRendered map
Exit Corner Offset Dogleg
A passing line runs through a section on a per-line bundle offset, then exits and bypasses a higher row to climb to a far target. The onward run keeps the line's offset over the row-level traverse so it leaves the exit port straight, with the single level change a clean riser at the far gap rather than a one-offset-step jog at the exit corner.
Mermaid source
%% Issue #939: a flow-aligned exit whose in-section run carries a per-line%% bundle offset must keep that offset on the onward run, not step back to the%% bare port-marker row right after the exit corner. `mid` receives two lines%% from `src`, so the passing line `l2` runs through `mid` on an offset track;%% it then exits and bypasses `blocker` (a higher row) to climb to `dst`. The%% onward run must leave the exit port straight (stay on l2's offset track over%% the row-level traverse), with the single level change a clean riser at the%% far gap -- no ~one-offset-step vertical jog at the exit corner.%%metro title: Exit-corner offset dogleg (#939)%%metro style: dark%%metro line: l1 | L1 | #f5c542%%metro line: l2 | L2 | #e63946%%metro grid: src | 0,0%%metro grid: mid | 1,1%%metro grid: blocker | 2,0%%metro grid: dst | 3,0
graph LR subgraph src [Src] a1[A1] end subgraph mid [Mid] m1[Mid] end subgraph blocker [Blocker] b1[Blk] end subgraph dst [Dst] d1[Dst] end
a1 -->|l1| m1 a1 -->|l2| m1 m1 -->|l2| d1 a1 -->|l1| b1 b1 -->|l1| d1CLI command
nf-metro render examples/topologies/exit_corner_offset_dogleg.mmd -o exit_corner_offset_dogleg.svgRendered map
Convergent Offrow Exit Climb
A single-row long-read variant-calling map. The annotation section carries only snv and sv (the two highest-priority lines), reached through a bypass whose source re-based them onto low slots. Its two-line bundle anchors on its own trunk rather than inheriting the high global slots, so its markers sit on their rows and the run into reports stays level.
Mermaid source
%% Regression fixture for issue #941. Single-row grid for the longread%% variant-calling map. The annotation section carries snvvcf+svvcf reached%% through a bypass whose source re-based those lines, so its two-line bundle%% must anchor on its own trunk (global slots 4,5 -> local 0,1) rather than%% inheriting the high slots and pushing its markers ~18px below the row.%%metro title: Long-read Variant Calling%%metro style: dark%%metro directional: true%%metro files: fastq_in | FASTQ%%metro files: bam_in | BAM%%metro files: ubam_in | uBAM%%metro line: ubam | uBAM | #0570b0%%metro line: fastq | FASTQ | #2db572%%metro line: bam | BAM | #f5c542%%metro line: other | Other | #ff8c00%%metro line: snvvcf | SNV VCF | #e63946%%metro line: svvcf | SV VCF | #9d4edd%%metro legend: tl%%metro grid: preprocessing | 0,0%%metro grid: small_variants | 1,0%%metro grid: tr_calling | 1,1%%metro grid: phasing | 2,0%%metro grid: cnv_calling | 2,1%%metro grid: structural_variants | 3,0%%metro grid: jointcalling | 4,0%%metro grid: annotation | 5,0%%metro grid: reports | 6,0
graph LR subgraph preprocessing [Pre-processing]
fastq_in[ ] bam_in[ ] ubam_in[ ] cat_fastq[cat FASTQ] samtools_merge[samtools\nmerge] minimap2_align[minimap2] samtools_sort_index[samtools\nsort/index] mosdepth[mosdepth]
fastq_in -->|fastq| cat_fastq ubam_in -->|ubam| samtools_merge bam_in -->|bam| samtools_merge cat_fastq -->|fastq| minimap2_align samtools_merge -->|ubam| minimap2_align minimap2_align -->|bam| samtools_sort_index samtools_merge -->|bam| samtools_sort_index samtools_sort_index -->|bam| mosdepth end
subgraph small_variants [Small variant calling]
clair3[Clair3] deepvariant[Deepvariant] end
subgraph cnv_calling [CNVs]
ontspectre_cnvcaller[ont-spectre CNVCaller] end
subgraph tr_calling [Repeats]
longtr[LongTR] straglr[Straglr] trgt[TRGT] end
subgraph phasing [Phasing]
whatshap_phase[WhatsHap Phase] whatshap_haplotag[WhatsHap Haplotag]
whatshap_phase -->|bam,snvvcf| whatshap_haplotag end
subgraph structural_variants [Structural Variants]
sniffles[Sniffles] cutesv[CuteSV] jasminesv_callers[Jasmine merge callers]
sniffles -->|svvcf,bam| jasminesv_callers cutesv -->|svvcf,bam| jasminesv_callers end
subgraph jointcalling [Joint Calling]
jasminesv_samples[Jasmine merge samples] glnexus[GLNexus] end
subgraph annotation [Annotation]
vep[VEP] snpeff[SnpEff] annotsv[AnnotSV] end
subgraph reports [Reports]
geneyx[Geneyx] sv_report[SV Report] end
%% Inter-section edges samtools_sort_index -->|bam| clair3 samtools_sort_index -->|bam| deepvariant samtools_sort_index -->|bam| longtr samtools_sort_index -->|bam| straglr samtools_sort_index -->|bam| trgt
mosdepth -->|other| ontspectre_cnvcaller
straglr -->|other| geneyx
clair3 -->|snvvcf| ontspectre_cnvcaller deepvariant -->|snvvcf| ontspectre_cnvcaller
clair3 -->|bam,snvvcf| whatshap_phase deepvariant -->|bam,snvvcf| whatshap_phase
clair3 -->|snvvcf| glnexus deepvariant -->|snvvcf| glnexus
clair3 -->|snvvcf| vep deepvariant -->|snvvcf| vep
whatshap_haplotag -->|bam| sniffles whatshap_haplotag -->|bam| cutesv whatshap_haplotag -->|bam| jasminesv_samples
ontspectre_cnvcaller -->|other| geneyx
sniffles -->|svvcf| jasminesv_samples sniffles -->|svvcf| vep sniffles -->|svvcf| snpeff sniffles -->|svvcf| annotsv sniffles -->|svvcf| geneyx
cutesv -->|svvcf| jasminesv_samples cutesv -->|svvcf| vep cutesv -->|svvcf| snpeff cutesv -->|svvcf| annotsv cutesv -->|svvcf| geneyx
jasminesv_callers -->|svvcf| jasminesv_samples jasminesv_callers -->|svvcf| vep jasminesv_callers -->|svvcf| snpeff jasminesv_callers -->|svvcf| annotsv jasminesv_callers -->|svvcf| geneyx jasminesv_callers -->|svvcf| sv_report
snpeff -->|svvcf| sv_report annotsv -->|svvcf| sv_report
glnexus -->|snvvcf| vepCLI command
nf-metro render examples/topologies/convergent_offrow_exit_climb.mmd -o convergent_offrow_exit_climb.svgRendered map
Fold Bypass Creep
A fold turns the calling section into a vertical bridge and a qc line forks around its file terminus into a separate downstream report section. Keeping the bypass feeds the bridge's height into the downstream section's placement, which settles one pass later, so the report section seats at its converged Y in both validated and unvalidated renders.
Mermaid source
%%metro title: Fold Bypass Creep%%metro fold_threshold: 4%%metro file: vcf_out | VCF%%metro line: main | Main | #2db572%%metro line: qc | QC | #0570b0
graph LR subgraph prep [Prep] in0[ ] align[Align] in0 -->|main,qc| align end subgraph calling [Calling] caller1[Caller A] caller2[Caller B] stats[Stats] collate[ ] vcf_out[ ] caller1 -->|main| stats caller2 -->|main| stats stats -->|main| collate collate -->|main| vcf_out end subgraph report [Report] mqc[MultiQC] end align -->|main| caller1 align -->|main| caller2 stats -->|qc| mqc align -->|qc| mqcCLI command
nf-metro render examples/topologies/fold_bypass_creep.mmd -o fold_bypass_creep.svgRendered map
Fold Bypass Creep Tight
The tight variant of the fold bypass, where the file terminus sits one row below the forking station, so the qc bypass V seats on the trailing row. The folded section's perpendicular exit corridor clears the V by a full station-flat length, so the bypass run-out reads as a visible flat rather than collapsing onto the curve apex.
Mermaid source
%%metro title: Fold Bypass Creep (tight)%%metro fold_threshold: 4%%metro file: vcf_out | VCF%%metro line: main | Main | #2db572%%metro line: qc | QC | #0570b0
graph LR subgraph prep [Prep] in0[ ] align[Align] in0 -->|main,qc| align end subgraph calling [Calling] caller1[Caller A] caller2[Caller B] stats[Stats] vcf_out[ ] caller1 -->|main| stats caller2 -->|main| stats stats -->|main| vcf_out end subgraph report [Report] mqc[MultiQC] end align -->|main| caller1 align -->|main| caller2 stats -->|qc| mqc align -->|qc| mqcCLI command
nf-metro render examples/topologies/fold_bypass_creep_tight.mmd -o fold_bypass_creep_tight.svgRendered map
Merge & Convergence
Merge Offrow Continuation
A perpendicular feeder re-slots at a multi-feeder merge port, and the single re-joined line leaves the merge row before reaching its consumer one row up, so the bundle-offset walk stops at the off-row exit rather than carrying the slot off the row.
Mermaid source
%%metro title: Off-Row Merge Continuation%%metro style: dark%%metro line: trunk | Trunk | #2db572%%metro line: bypass | Bypass | #e63946
%%metro grid: above_src | 0,0%%metro grid: horiz_src | 0,1%%metro grid: sink | 1,1%%metro grid: out | 2,0
graph LR subgraph above_src [Above Source] %%metro exit: right | bypass a1[Start A] a2[Prep A] a1 -->|bypass| a2 end
subgraph horiz_src [Horizontal Source] %%metro exit: right | trunk h1[Start B] h2[Prep B] h1 -->|trunk| h2 end
subgraph sink [Sink] %%metro entry: left | trunk,bypass %%metro exit: right | trunk s1[Merge] s2[Combine] s1 -->|trunk,bypass| s2 end
subgraph out [Output] o1[Report] end
a2 -->|bypass| s1 h2 -->|trunk| s1 s2 -->|trunk| o1CLI command
nf-metro render examples/topologies/merge_offrow_continuation.mmd -o merge_offrow_continuation.svgRendered map
Junction Entry Reversed Fold
A two-line bundle exits a TB section's RIGHT side, wraps into a Source section, then fans out at a junction into two same-row destinations. The bundle order is carried concentrically through the reversal corners so the lines never cross at a station, and the fan-out peels off cleanly (issue #760).
Mermaid source
%%metro title: Junction Entry Reversed Fold%%metro style: dark%%metro line: alpha | Alpha | #e63946%%metro line: beta | Beta | #2db572%%metro grid: tb | 0,0%%metro grid: src | 1,0%%metro grid: dst_a | 2,0%%metro grid: dst_b | 3,0
graph LR subgraph tb [Bridge] %%metro direction: TB %%metro exit: right | alpha,beta tb1[Mark] tb2[Recal] tb1 -->|alpha,beta| tb2 end
subgraph src [Source] %%metro entry: left | alpha,beta %%metro exit: right | alpha,beta s_hub[Hub] end
subgraph dst_a [Dest Alpha] %%metro entry: left | alpha da1[Process A] da2[Output A] da1 -->|alpha| da2 end
subgraph dst_b [Dest Beta] %%metro entry: left | beta db1[Process B] db2[Output B] db1 -->|beta| db2 end
tb2 -->|alpha,beta| s_hub s_hub -->|alpha| da1 s_hub -->|beta| db1CLI command
nf-metro render examples/topologies/junction_entry_reversed_fold.mmd -o junction_entry_reversed_fold.svgRendered map
Convergence Stacked Sink
A leaf sink that would otherwise sit alone in the spine band migrates into the convergence return row (no grid-cell collision).
Mermaid source
%%metro title: Convergence Stacked Sink%%metro style: dark%%metro line: main | Main | #0570b0
graph LR subgraph prep [Prep] p1[Input] p2[Output] p1 -->|main| p2 end
subgraph aux [Aux Input] x1[Load] x2[Index] x1 -->|main| x2 end
subgraph align [Align] a1[Map] a2[Sort] a1 -->|main| a2 end
subgraph repeats [Repeats] r1[Detect] r2[Genotype] r1 -->|main| r2 end
subgraph dedup [Dedup] d1[Mark] d2[Recal] d1 -->|main| d2 end
subgraph merge_pt [Merge] g1[Combine] g2[Refine] g1 -->|main| g2 end
subgraph report [Report] rp1[Summarise] rp2[Publish] rp1 -->|main| rp2 end
p2 -->|main| a1 x2 -->|main| r1 a2 -->|main| d1 d2 -->|main| g1 r2 -->|main| g1 p2 -->|main| g1 g2 -->|main| rp1CLI command
nf-metro render examples/topologies/convergence_stacked_sink.mmd -o convergence_stacked_sink.svgRendered map
Convergence Sink Above
An input section sits above the shared sink it feeds, while its line is declared last. The sink's entry bundle is slotted by feeder approach (the feeder whose source sits highest takes the topmost lane) rather than by declaration order, so the line runs straight into the port instead of dropping down across its bundle-mate.
Mermaid source
%%metro title: Convergence Sink Above%%metro style: dark%%metro compact_offsets: true%%metro line: lower | Lower | #e63946%%metro line: upper | Upper | #0570b0%%metro grid: up_in | 0,0%%metro grid: low_in | 0,1%%metro grid: sink | 1,1
graph LR subgraph up_in [Upper Input] u1[Load] u2[Prep] u1 -->|upper| u2 end subgraph low_in [Lower Input] d1[Load] d2[Prep] d1 -->|lower| d2 end subgraph sink [Merge] s1[Collect] s2[Report] s1 -->|lower,upper| s2 end d2 -->|lower| s1 u2 -->|upper| s1CLI command
nf-metro render examples/topologies/convergence_sink_above.mmd -o convergence_sink_above.svgRendered map
Terminus Join
Two lines converge on a single file-icon terminus in a sectionless flat graph, so the join lands directly on the terminus rather than a synthesised convergence junction.
Mermaid source
%%metro title: Terminus Join%%metro style: dark%%metro line: l1 | Line 1 | #e63946%%metro line: l2 | Line 2 | #2db572%%metro file: sink_out | OUT | Results
graph LR src_a[Process A] src_b[Process B] sink_out[ ] src_a -->|l1| sink_out src_b -->|l2| sink_outCLI command
nf-metro render examples/topologies/terminus_join.mmd -o terminus_join.svgRendered map
Merge Port Above Approach
A line descending into a multi-feeder merge port from a section above keeps the above-trunk slot all the way to the output, so its riser joins the bundle without crossing the trunk on the outgoing run (issue #704).
Mermaid source
%%metro title: Above Approach Merge%%metro style: dark%%metro line: trunk | Trunk | #2db572%%metro line: bypass | Bypass | #e63946
%%metro grid: above_src | 0,0%%metro grid: horiz_src | 0,1%%metro grid: sink | 1,1%%metro grid: out | 2,1
graph LR subgraph above_src [Above Source] %%metro exit: right | bypass a1[Start A] a2[Prep A] a1 -->|bypass| a2 end
subgraph horiz_src [Horizontal Source] %%metro exit: right | trunk h1[Start B] h2[Prep B] h1 -->|trunk| h2 end
subgraph sink [Sink] %%metro entry: left | trunk,bypass %%metro exit: right | trunk,bypass s1[Merge] s2[Combine] s1 -->|trunk,bypass| s2 end
subgraph out [Output] o1[Report] end
a2 -->|bypass| s1 h2 -->|trunk| s1 s2 -->|trunk,bypass| o1CLI command
nf-metro render examples/topologies/merge_port_above_approach.mmd -o merge_port_above_approach.svgRendered map
Junction Entry Collision
A three-line fan-out where one line continues straight to its own destination while the other two branch away: the straight line keeps a constant bundle slot across the source exit so its trunk stays horizontal (issue #704).
Mermaid source
%%metro title: Junction Entry Collision Skip%%metro style: dark%%metro line_order: span%%metro line: beta | Beta | #2db572%%metro line: alpha | Alpha | #e63946%%metro line: gamma | Gamma | #0570b0
%%metro grid: pre | 0,0%%metro grid: src | 1,0%%metro grid: dst_a | 2,0%%metro grid: dst_bg | 3,0
graph LR subgraph pre [Pre] pre1[Start] pre2[Prep] pre1 -->|alpha,beta,gamma| pre2 end
subgraph src [Source] %%metro exit: right | alpha,beta,gamma s_a[Alpha Tool] s_b[Beta Tool] s_g[Gamma Tool] end
subgraph dst_a [Dest Alpha] %%metro entry: left | alpha da1[Output A] end
subgraph dst_bg [Dest Beta+Gamma] %%metro entry: left | beta,gamma dbg1[Output B+G] dbg2[Report] dbg1 -->|beta,gamma| dbg2 end
pre2 -->|alpha| s_a pre2 -->|beta| s_b pre2 -->|gamma| s_g s_a -->|alpha| da1 s_b -->|beta| dbg1 s_g -->|gamma| dbg1CLI command
nf-metro render examples/topologies/junction_entry_collision.mmd -o junction_entry_collision.svgRendered map
Junction Entry Align
A two-line bundle whose order is preserved across the junction-to-entry-port boundary, so the straight-through line stays horizontal instead of slanting to swap slots (issue #704).
Mermaid source
%%metro title: Junction Entry Port Align%%metro style: dark%%metro line_order: span%%metro line: alpha | Alpha | #e63946%%metro line: beta | Beta | #2db572
%%metro grid: pre | 0,0%%metro grid: src | 1,0%%metro grid: dst_a | 2,0%%metro grid: dst_b | 3,0%%metro grid: beta_extra_1 | 0,1%%metro grid: beta_extra_2 | 1,1
graph LR subgraph pre [Pre] pre1[Start] pre2[Prep] pre1 -->|alpha,beta| pre2 end
subgraph beta_extra_1 [Beta Extra 1] be1_1[Step] be1_2[Step 2] be1_1 -->|beta| be1_2 end
subgraph beta_extra_2 [Beta Extra 2] be2_1[Step] be2_2[Step 2] be2_1 -->|beta| be2_2 end
subgraph src [Source] %%metro exit: right | alpha,beta s_a[Tool Alpha] s_b[Tool Beta] end
subgraph dst_a [Dest Alpha] %%metro entry: left | alpha da1[Process A] da2[Output A] da1 -->|alpha| da2 end
subgraph dst_b [Dest Beta] %%metro entry: left | beta db1[Process B] db2[Output B] db1 -->|beta| db2 end
pre2 -->|alpha| s_a pre2 -->|beta| s_b pre2 -->|beta| be1_1 be1_2 -->|beta| be2_1 s_a -->|alpha| da1 s_b -->|beta| db1CLI command
nf-metro render examples/topologies/junction_entry_align.mmd -o junction_entry_align.svgRendered map
Merge Trunk Out Of Range Section
Two same-row sources merge into one sink past an intervening section while another row's section sits outside the merge column range, so the merge trunk keeps its same-row bypass channel rather than crossing below the out-of-range section.
Mermaid source
%%metro title: Merge Trunk Out-of-Range Section%%metro style: dark%%metro line: main | Main | #2db572%%metro grid: src_far | 0, 0%%metro grid: mid | 1, 0%%metro grid: src_near | 2, 0%%metro grid: sink | 3, 0%%metro grid: extra | 4, 0%%metro grid: other | 5, 1
graph LR subgraph src_far [Source Far] %%metro exit: right | main far1[Far] end
subgraph mid [Mid] %%metro entry: left | main %%metro exit: right | main m1[Mid Step] end
subgraph src_near [Source Near] %%metro entry: left | main %%metro exit: right | main near1[Near] end
subgraph sink [Sink] %%metro entry: left | main merge[Merge] report[Report] merge -->|main| report end
subgraph extra [Extra] %%metro entry: left | main e1[Extra Step] end
subgraph other [Other Row] %%metro entry: top | main o1[Other] end
m1 -->|main| near1 far1 -->|main| merge near1 -->|main| merge far1 -->|main| e1 near1 -->|main| e1 e1 -->|main| o1CLI command
nf-metro render examples/topologies/merge_trunk_out_of_range_section.mmd -o merge_trunk_out_of_range_section.svgRendered map
Merge Trunk Over Low Section
A same-row merge trunk bypasses past a tall intervening section while a lower-row section sits within the merge column range. The inter-row gap clears the lower section's header, so the trunk (and its branches) route through that gap rather than diving below the whole canvas.
Mermaid source
%%metro title: Merge Trunk Over Low Section%%metro style: dark%%metro line: flow | Flow | #0570b0%%metro line: side | Side | #2db572
%%metro grid: ingest | 0,0%%metro grid: tall | 1,0%%metro grid: proc2 | 2,0%%metro grid: collect | 3,0%%metro grid: sub | 2,1
graph LR subgraph ingest [Ingest] i1[Read] i2[Split] i1 -->|flow,side| i2 end
subgraph tall [Tall] ta[Branch] tb1[Path A] tb2[Path B] tb3[Path C] ta -->|flow| tb1 ta -->|flow| tb2 ta -->|flow| tb3 end
subgraph proc2 [Proc 2] q1[Step] end
subgraph collect [Collect] c1[Gather] c2[Report] c1 -->|flow| c2 end
subgraph sub [Sub] d1[Aux] d2[Done] d1 -->|side| d2 end
i2 -->|flow| ta i2 -->|flow| c1 tb1 -->|flow| q1 tb1 -->|flow| c1 q1 -->|flow| c1 i2 -->|side| d1CLI command
nf-metro render examples/topologies/merge_trunk_over_low_section.mmd -o merge_trunk_over_low_section.svgRendered map
Merge Bottom Row Bypass
A merge whose entry sits in the bottommost grid row: the trunk's inter-row bypass routes in the cramped gap above that row. Placement reserves the gap so the channel clears the upper row's section boxes instead of grazing them.
Mermaid source
%%metro title: Bottommost-Row Merge Inter-Row Bypass%%metro style: dark%%metro line: a | A | #e63946%%metro line: b | B | #0570b0%%metro grid: src_fanA | 2,0%%metro grid: src_fanB | 2,1%%metro grid: side_a | 3,0%%metro grid: middle | 1,1%%metro grid: target | 0,2
graph LR subgraph src_fanA [Fan Source A] fsa1[In] fsa2[Out] fsa1 -->|a| fsa2 end subgraph src_fanB [Fan Source B] fsb1[In] fsb2[Out] fsb1 -->|a| fsb2 end subgraph side_a [Side] %%metro entry: left | a sia1[Side] sia2[Out] sia1 -->|a| sia2 end subgraph middle [Middle] m1[Process] m2[Out] m1 -->|b| m2 end subgraph target [Target] %%metro direction: RL %%metro entry: right | a t1[Process] t2[Out] t1 -->|a| t2 end fsa2 -->|a| t1 fsa2 -->|a| sia1 fsb2 -->|a| t1 fsb2 -->|a| sia1CLI command
nf-metro render examples/topologies/merge_bottom_row_bypass.mmd -o merge_bottom_row_bypass.svgRendered map
Merge Pullaway
One line converges on a merge from two stacked rows of the same column; the cross-row feeder drops onto the trunk's pull-away bypass channel and the two travel as a single stroke into the entry.
Mermaid source
%%metro title: Merge trunk pull-away cross-row sibling%%metro style: dark%%metro line: main | Main | #0570b0%%metro grid: wide_src | 0,0%%metro grid: obstacle | 1,0%%metro grid: sibling_sec | 0,1%%metro grid: side_dst | 2,1%%metro grid: target | 2,0
graph LR subgraph wide_src [Wide Source] w1[Start] w2[Out] w1 -->|main| w2 end subgraph obstacle [Obstacle] o1[Block] o2[Pass] o1 -->|main| o2 end subgraph sibling_sec [Sibling] s1[Step] s2[Done] s1 -->|main| s2 end subgraph side_dst [Side Dest] sd1[Side] sd2[Out] sd1 -->|main| sd2 end subgraph target [Target] %%metro entry: left | main t1[Merge] t2[Report] t1 -->|main| t2 end w2 -->|main| o1 w2 -->|main| t1 s2 -->|main| sd1 s2 -->|main| t1CLI command
nf-metro render examples/topologies/merge_pullaway.mmd -o merge_pullaway.svgRendered map
Merge Right Entry
One line converges on a RIGHT entry whose consumer is the sink's flow-start station: the sink flows right-to-left so the merge arrives beside its consumer, and the trunk loops under the sink onto that channel rather than slicing across the box to the far station (#885).
Mermaid source
%%metro title: Merge Right Entry Cross Row%%metro style: dark%%metro line: main | Main | #0570b0%%metro grid: sink | 0,0%%metro grid: source | 2,1%%metro grid: extra | 4,1%%metro grid: step_a | 6,1
graph LR subgraph sink [Sink] %%metro entry: right | main t1[Collect] t2[Report] t1 -->|main| t2 end subgraph source [Source] s1[Produce] s2[Prepare] s1 -->|main| s2 end subgraph extra [Extra] e1[Extra] e2[Extra Out] e1 -->|main| e2 end subgraph step_a [Step A] a1[Process A] a2[Out A] a1 -->|main| a2 end s2 -->|main| e1 s2 -->|main| t1 e2 -->|main| a1 e2 -->|main| t1 a2 -->|main| t1CLI command
nf-metro render examples/topologies/merge_right_entry.mmd -o merge_right_entry.svgRendered map
Peeloff Riser Respace
Four lines from two sources ride one shared bypass trunk and rise into a common destination entry port, where the trunk-Y order and the entry-port slot order disagree. Each source bundle keeps its declaration order at the peel-off corner instead of inverting (issue #695).
Mermaid source
%%metro title: Peel-off Riser Respace%%metro style: dark%%metro line: l1 | Line 1 | #e63946%%metro line: l2 | Line 2 | #2db572%%metro line: l3 | Line 3 | #0570b0%%metro line: l4 | Line 4 | #f5c542%%metro grid: src_a | 0,0%%metro grid: src_b | 1,0%%metro grid: mid | 2,0%%metro grid: dst | 3,0
graph LR subgraph src_a [Source A] %%metro exit: right | l1,l2 sa_in[Input A] sa_out[Output A] sa_in -->|l1,l2| sa_out end
subgraph src_b [Source B] %%metro entry: left | l3,l4 %%metro exit: right | l3,l4 sb_in[Input B] sb_out[Output B] sb_in -->|l3,l4| sb_out end
subgraph mid [Mid] m1[Mid Process] end
subgraph dst [Destination] %%metro entry: left | l1,l2,l3,l4 d1[Process D1] d2[Process D2] d1 -->|l1,l2,l3,l4| d2 end
sa_out -->|l1,l2| d1 sb_out -->|l3,l4| d1CLI command
nf-metro render examples/topologies/peeloff_riser_respace.mmd -o peeloff_riser_respace.svgRendered map
Peeloff Extra Line Consumer
Same peel-off topology as peeloff_riser_respace but the destination section also carries an extra internal branch (l5). The riser reorder must still fire and keep the bundle crossing-free at the shared entry port regardless of extra lines in the consumer section (issue #751).
Mermaid source
%%metro title: Peel-off Extra Line Consumer%%metro style: dark%%metro line: l1 | Line 1 | #e63946%%metro line: l2 | Line 2 | #2db572%%metro line: l3 | Line 3 | #0570b0%%metro line: l4 | Line 4 | #f5c542%%metro line: l5 | Line 5 | #9b59b6%%metro grid: src_a | 0,0%%metro grid: src_b | 1,0%%metro grid: mid | 2,0%%metro grid: dst | 3,0
graph LR subgraph src_a [Source A] %%metro exit: right | l1,l2 sa_in[Input A] sa_out[Output A] sa_in -->|l1,l2| sa_out end
subgraph src_b [Source B] %%metro entry: left | l3,l4 %%metro exit: right | l3,l4 sb_in[Input B] sb_out[Output B] sb_in -->|l3,l4| sb_out end
subgraph mid [Mid] m1[Mid Process] end
subgraph dst [Destination] %%metro entry: left | l1,l2,l3,l4 d1[Process D1] d2[Process D2] d3[Process D3] d1 -->|l1,l2,l3,l4| d2 d2 -->|l5| d3 end
sa_out -->|l1,l2| d1 sb_out -->|l3,l4| d1CLI command
nf-metro render examples/topologies/peeloff_extra_line_consumer.mmd -o peeloff_extra_line_consumer.svgRendered map
Merge Leftmost Sink Branch
A leftward merge whose trunk reaches a leftmost-column sink's LEFT entry: the trunk wraps to rise on the box's far (left) side, with the branch feeders converging on its shared channel, rather than crossing the sink interior to the far-side port.
Mermaid source
%%metro title: Merge Leftmost Sink Branch%%metro style: dark%%metro line: a | A | #e63946
%%metro grid: blocker | 1,0%%metro grid: step_a | 3,0%%metro grid: step_b | 5,0%%metro grid: extra | 6,0%%metro grid: sink | 0,1
graph LR subgraph blocker [Blocker] bl1[Block Start] bl2[Block End] bl1 -->|a| bl2 end
subgraph step_a [Step A] a1[Process A] a2[Out A] a1 -->|a| a2 end
subgraph step_b [Step B] b1[Process B] b2[Out B] b1 -->|a| b2 end
subgraph extra [Extra] e1[Extra] e2[Extra Out] e1 -->|a| e2 end
subgraph sink [Sink] t1[Collect] t2[Report] t1 -->|a| t2 end
bl2 -->|a| a1 a2 -->|a| b1 a2 -->|a| t1 b2 -->|a| e1 b2 -->|a| t1CLI command
nf-metro render examples/topologies/merge_leftmost_sink_branch.mmd -o merge_leftmost_sink_branch.svgRendered map
Merge Around Below Leftmost
Two sources merging into a leftmost-column LEFT entry: the trunk routes around the target's left side to enter from outside while the second merge target is reached in-row.
Mermaid source
%%metro title: Merge Around Below Leftmost%%metro style: nfcore%%metro line: a | A | #e63946%%metro grid: src1 | 1,0%%metro grid: src2 | 2,0%%metro grid: extra | 3,0%%metro grid: tgt | 0,1
graph LR subgraph src1 [Source 1] a1[Step A] a2[Out A] a1 -->|a| a2 end
subgraph src2 [Source 2] b1[Step B] b2[Out B] b1 -->|a| b2 end
subgraph extra [Extra] %%metro entry: left | a e1[Extra Step] e2[Extra Out] e1 -->|a| e2 end
subgraph tgt [Target] %%metro entry: left | a t1[Combine] t2[Result] t1 -->|a| t2 end
a2 -->|a| e1 a2 -->|a| t1 b2 -->|a| e1 b2 -->|a| t1CLI command
nf-metro render examples/topologies/merge_around_below_leftmost.mmd -o merge_around_below_leftmost.svgRendered map
Post Convergence Trunk
Two stacked inputs converge on a station inside one LR section. The merge station's single linear successor continues flat on the merge row rather than dropping back onto one of the incoming branch rows, so the post-merge trunk runs straight instead of zigzagging.
Mermaid source
%%metro title: Post-convergence trunk%%metro line: fastq | FASTQ | #2db572%%metro line: ubam | uBAM | #0570b0%%metro line: bam | BAM | #f5c542
graph LR subgraph prep [Prep] fq[FQ] ub[UB] mm[minimap2] st[samtools] fq -->|fastq| mm ub -->|ubam| mm mm -->|bam| st endCLI command
nf-metro render examples/topologies/post_convergence_trunk.mmd -o post_convergence_trunk.svgRendered map
Junction Fanout Convergence
Three lines converge into one joint-calling entry port: two bypass the intervening sections and climb risers into the port while the third joins flat from the adjacent column. The flat shallow feeder takes the port-near slot on top of the climbing pair so the bundle turns into the port concentrically, instead of the flat line weaving across the risers at the corner.
Mermaid source
%% Three lines converge into one LEFT entry port on a single-row grid: a and b%% bypass the intervening sections and climb risers into the port, while c joins%% flat from the adjacent column. The shallow feeder c must nest port-near on%% top of the climbing pair so the bundle turns concentrically rather than%% weaving c across the risers at the corner (#940).%%metro title: Junction Fan-out Convergence%%metro style: dark%%metro line: a | Line A | #e63946%%metro line: b | Line B | #f5c542%%metro line: c | Line C | #9d4edd%%metro grid: stepA | 0,0%%metro grid: stepB | 1,0%%metro grid: stepC | 2,0%%metro grid: joint | 3,0
graph LR subgraph stepA [Caller A] sa[Call A] end subgraph stepB [Caller B] sb[Call B] end subgraph stepC [Caller C] sc[Call C] end subgraph joint [Joint Calling] merge[Merge] collect[Collect] end
sa -->|a| merge sb -->|b| merge sc -->|c| merge merge -->|a,b,c| collectCLI command
nf-metro render examples/topologies/junction_fanout_convergence.mmd -o junction_fanout_convergence.svgRendered map
Aligner Row Pinned Continuation
Three sibling aligners feed one dedup hub that lands on the lead aligner's row, while one aligner's line continues on a track pinned to the section bottom by hidden continuation stations. The aligners stack on consecutive grid rows instead of the low-line aligner being dragged down to crowd its neighbour and strand the middle row (#1071).
Mermaid source
%%metro title: Aligner row vs pinned continuation%%metro line: star_rsem | STAR/RSEM | #0570b0%%metro line: star_salmon | STAR/Salmon | #2db572%%metro line: hisat2 | HISAT2 | #f5c542%%metro line: bowtie2_salmon | Bowtie2/Salmon | #ff8c00
graph LR subgraph preproc [Pre-processing] %%metro exit: right | star_salmon, star_rsem, hisat2, bowtie2_salmon fastqc_filtered[FastQC] end
subgraph genome_align [Genome alignment & quantification] %%metro entry: left | star_salmon, star_rsem, hisat2, bowtie2_salmon %%metro exit: right | star_salmon, star_rsem %%metro exit: right | hisat2 star[STAR] hisat2_align[HISAT2] bowtie2_align[Bowtie2] rsem[RSEM] salmon_quant[Salmon] umi_tools_dedup[UMI-tools Dedup] tximport_ga[tximport] summarized_exp_ga[Sum. Exp.] multiqc_bowtie2[MultiQC] report_bowtie2[ ] _h1[hidden] _h2[hidden] _h3[hidden]
star -->|star_rsem,star_salmon| umi_tools_dedup hisat2_align -->|hisat2| umi_tools_dedup bowtie2_align -->|bowtie2_salmon| umi_tools_dedup umi_tools_dedup -->|star_rsem| rsem umi_tools_dedup -->|star_salmon| salmon_quant umi_tools_dedup -->|hisat2| _h1 _h1 -->|hisat2| _h2 _h2 -->|hisat2| _h3 salmon_quant -->|star_salmon| tximport_ga rsem -->|star_rsem| tximport_ga tximport_ga -->|star_salmon,star_rsem| summarized_exp_ga umi_tools_dedup -->|bowtie2_salmon| salmon_quant salmon_quant -->|bowtie2_salmon| multiqc_bowtie2 multiqc_bowtie2 -->|bowtie2_salmon| report_bowtie2 end
subgraph postproc [Post-processing] %%metro direction: TB %%metro entry: left | star_salmon, star_rsem, hisat2 samtools[SAMtools] picard[Picard]
samtools -->|star_salmon,star_rsem,hisat2| picard end
fastqc_filtered -->|star_salmon,star_rsem| star fastqc_filtered -->|hisat2| hisat2_align fastqc_filtered -->|bowtie2_salmon| bowtie2_align summarized_exp_ga -->|star_salmon,star_rsem| samtools _h3 -->|hisat2| samtoolsCLI command
nf-metro render examples/topologies/aligner_row_pinned_continuation.mmd -o aligner_row_pinned_continuation.svgRendered map
Fanin Distant Terminus
Two sibling methods feed one report icon while a third continues through a longer ORF chain that pushes the report to the far end of the section. The siblings converge at a local junction one column on and a single trunk carries the merged line to the report, instead of the two legs bowing out and running parallel the whole way to the distant merge (issue #1296).
Mermaid source
%%metro title: Fan-in to a distant terminus%%metro file: report | HTML | Report%%metro line: a | Line A | #e6007e
graph LR subgraph s1 [Translational efficiency] prep[Prep] anota[anota2seq] delta[deltaTE] dotseq[DOTSeq] orf_quant[ORFquant] orf_test[ORFtest] prep -->|a| anota prep -->|a| delta prep -->|a| dotseq dotseq -->|a| orf_quant orf_quant -->|a| orf_test anota -->|a| report delta -->|a| report orf_test -->|a| report endCLI command
nf-metro render examples/topologies/fanin_distant_terminus.mmd -o fanin_distant_terminus.svgRendered map
Off-track & Rails
Off Track Convergence
Multiple off-track file inputs converging on a single consumer. The trunk stays horizontal while the inputs stack above the consumer column.
Mermaid source
%%metro title: Off-Track Convergence%%metro style: dark%%metro line: main | Main | #2db572%%metro file: ref_in | FASTA | Reference%%metro file: gtf_in | GTF | Annotation%%metro file: vcf_in | VCF | Known Variants%%metro file: bed_in | BED | Targets%%metro off_track: ref_in, gtf_in, vcf_in, bed_in
graph LR subgraph input [Input] reads[Reads] prep[Prepare] reads -->|main| prep end
subgraph process [Process] ref_in[ ] gtf_in[ ] vcf_in[ ] bed_in[ ] align[Align] annotate[Annotate]
ref_in -->|main| align gtf_in -->|main| align vcf_in -->|main| align bed_in -->|main| align align -->|main| annotate end
subgraph output [Output] report[Report] end
prep -->|main| align annotate -->|main| reportCLI command
nf-metro render examples/topologies/off_track_convergence.mmd -o off_track_convergence.svgRendered map
Off Track Convergence Multiline
A multi-line bundle enters a section and converges on a deep first station that also consumes off-track file inputs. The consumer stays on the section trunk, level with its continuation, rather than being dragged to the section floor (issue #650).
Mermaid source
%%metro title: Off-Track Convergence Multiline%%metro style: dark%%metro line: dna | DNA | #2db572%%metro line: rna | RNA | #e63946%%metro line: qc | QC | #f4a261%%metro file: ref_in | FASTA | Reference%%metro file: gtf_in | GTF | Annotation%%metro off_track: ref_in, gtf_in
graph LR subgraph input [Input] reads[Reads] prep[Prepare] reads -->|dna,rna,qc| prep end
subgraph process [Process] ref_in[ ] gtf_in[ ] align[Align] sort[Sort] index[Index]
ref_in -->|dna,rna| align gtf_in -->|rna| align align -->|dna,rna,qc| sort sort -->|dna,rna,qc| index end
subgraph output [Output] report[Report] end
prep -->|dna,rna,qc| align index -->|dna,rna,qc| reportCLI command
nf-metro render examples/topologies/off_track_convergence_multiline.mmd -o off_track_convergence_multiline.svgRendered map
Off Track Input Above Consumer
A section whose mid-trunk station consumes an off-track input while a neighbouring station feeds an off-track output. The input hugs one row above its consumer instead of towering an extra slot up because it shares an anchor with the differently-columned output (issue #651).
Mermaid source
%%metro title: Long-read Methylation & Variant Atlas%%metro style: dark%%metro line: dna | DNA variants | #2db572%%metro line: rna | RNA expression | #e63946%%metro line: qc | QC stream | #f4a261
%%metro file: ref_fa | FASTA | Reference%%metro file: gtf_in | GTF | Annotation%%metro file: cpg_bed | BED | CpG islands%%metro off_track: ref_fa, gtf_in, cpg_bed
%%metro file: raw_bam | BAM | Aligned%%metro file: meth_bw | bigWig | Methylation%%metro off_track: raw_bam, meth_bw
graph LR subgraph intake [Intake & Basecall] in_pod5[POD5] in_basecall[Basecall] in_demux[Demux] in_qc[ReadQC]
in_pod5 -->|dna,rna,qc| in_basecall in_basecall -->|dna,rna,qc| in_demux in_demux -->|dna,rna,qc| in_qc end
subgraph align [Alignment] ref_fa[ ] gtf_in[ ] al_minimap[minimap2] al_sort[Sort] al_index[Index] raw_bam[ ]
ref_fa -->|dna,rna| al_minimap gtf_in -->|rna| al_minimap al_minimap -->|dna,rna,qc| al_sort al_sort -->|dna,rna,qc| al_index al_sort -->|dna| raw_bam end
subgraph methcall [Methylation Calling] mc_modkit[modkit] mc_pileup[Pileup] mc_dmr[DMR] cpg_bed[ ] meth_bw[ ]
cpg_bed -->|dna| mc_pileup mc_modkit -->|dna| mc_pileup mc_pileup -->|dna| mc_dmr mc_pileup -->|dna| meth_bw end
subgraph variants [Variant Calling] vc_clair[Clair3] vc_phase[Phase] vc_filter[Filter]
vc_clair -->|dna| vc_phase vc_phase -->|dna| vc_filter end
subgraph expr [Expression] ex_isoquant[IsoQuant] ex_count[Count] ex_norm[Normalize]
ex_isoquant -->|rna| ex_count ex_count -->|rna| ex_norm end
subgraph fusion [Fusion Detection] fu_jaffal[JAFFAL] fu_annotate[Annotate]
fu_jaffal -->|rna| fu_annotate end
subgraph merge [Merge & Annotate] mg_collect[Collect] mg_vep[VEP] mg_classify[Classify]
mg_collect -->|dna,rna| mg_vep mg_vep -->|dna,rna| mg_classify end
subgraph report [Report] rp_aggregate[Aggregate] rp_multiqc[MultiQC] rp_final[Report]
rp_aggregate -->|dna,rna,qc| rp_multiqc rp_multiqc -->|dna,rna,qc| rp_final end
in_qc -->|dna,rna,qc| al_minimap al_index -->|dna| mc_modkit al_index -->|dna| vc_clair al_index -->|rna| ex_isoquant al_index -->|rna| fu_jaffal al_index -->|qc| rp_aggregate mc_dmr -->|dna| mg_collect vc_filter -->|dna| mg_collect ex_norm -->|rna| mg_collect fu_annotate -->|rna| mg_collect mg_classify -->|dna,rna| rp_aggregateCLI command
nf-metro render examples/topologies/off_track_input_above_consumer.mmd -o off_track_input_above_consumer.svgRendered map
Off Track Terminal Noop
A station marked off_track whose only continuation is an inter-section edge to the next section, with no in-section successor. It renders inline on the trunk rather than lifting into a bump that immediately drops back down to reach the exit port (issue #1295).
Mermaid source
%%metro title: Off-track Terminal Has Nothing to Protect%%metro style: dark%%metro line: a | Line A | #2db572
%%metro file: out1 | GTF | Output%%metro off_track: out1
graph LR subgraph s1 [S1] %%metro exit: right | a n1[N1] n2[N2] n1 -->|a| n2 n2 -->|a| out1 end
subgraph s2 [S2] %%metro entry: left | a m1[M1] out1 -->|a| m1 endCLI command
nf-metro render examples/topologies/off_track_terminal_noop.mmd -o off_track_terminal_noop.svgRendered map
Tb Off Track Output Row
A `direction: TB` section whose trunk stations feed off-track outputs. Each output hangs off its producer via an S -- a flow-axis lead down the trunk, a diagonal, then a flat tail into the icon -- on the side opposite the beside-trunk labels, the rotation of the LR off-track idiom, rather than leaving perpendicular or dropping onto the label side (issue #1384).
Mermaid source
%%metro title: TB off-track output row%% Regression for #1384: in a `direction: TB` section an off-track output%% (producer-fed sink) hangs off its producer via an S -- a flow-axis lead down%% the trunk, a diagonal, then a flat tail into the icon -- on the side opposite%% the beside-trunk labels, the rotation of the LR off-track idiom. The trunk%% descent along the flow axis must not be read as a downward branch (which%% would flip the output onto the label side).%%metro line: core | Core | #2db572
%%metro file: trimmed_out | FASTQ%%metro file: recal_out | CRAM%%metro off_track: trimmed_out%%metro off_track: recal_out
graph LR subgraph pre [Pre-processing] %%metro direction: TB fastp[fastp] align[align] markdup[markduplicates] recal[recalibrate] collect[collect metrics] trimmed_out[ ] recal_out[ ]
fastp -->|core| align align -->|core| markdup markdup -->|core| recal recal -->|core| collect
fastp -->|core| trimmed_out recal -->|core| recal_out endCLI command
nf-metro render examples/topologies/tb_off_track_output_row.mmd -o tb_off_track_output_row.svgRendered map
Tb Offtrack Fork Baseline
A `direction: TB` section with an asymmetric fork whose branch (markduplicates) overshoots the trunk toward the lift side. The off-track downward-branch test anchors its trunk baseline to the through-trunk column rather than the lift-most station, so main-trunk producers downstream of the fork keep their off-track outputs on the lift side instead of flipping them onto the beside-trunk label side (issue #1388).
Mermaid source
%%metro title: TB off-track fork baseline%% Regression for #1388: in a `direction: TB` section an asymmetric fork sends%% one branch (markduplicates) further toward the lift side than the trunk.%% The off-track "downward branch" test derives the trunk baseline on the cross%% axis; taking the lift-most on-track station let that fork branch become the%% baseline, so every main-trunk producer downstream (mosdepth, applybqsr) read%% as a branch and its off-track output flipped onto the beside-trunk label%% side, colliding with a neighbour label. The baseline must anchor to the%% trunk column the through-line runs on, not the lift-most extreme.%%metro font_scale: 1.34%%metro line: core | Core | #2db572%%metro line: alt | Alt | #d62728%%metro file: samtools_out | CRAM%%metro file: recal_out | CRAM%%metro off_track: samtools_out%%metro off_track: recal_out
graph LR subgraph prep [Pre-processing] %%metro direction: TB a[convert] b[FastQC] c[mapping] d1[bam convert] d2[markduplicates] h[mosdepth, samtools] i[prepare recalibration] j[applybqsr] k[mosdepth, samtools] l[NGSCheckmate]
a -->|core| b b -->|core| c c -->|core| d1 c -->|alt| d2 d1 -->|core| h d2 -->|alt| h h -->|core| samtools_out h -->|core| i i -->|core| j j -->|core| recal_out j -->|core| k k -->|core| l endCLI command
nf-metro render examples/topologies/tb_offtrack_fork_baseline.mmd -o tb_offtrack_fork_baseline.svgRendered map
Rail Inter Section
Two `%%metro line_spread: rails` sections joined by an inter-section edge. The connector wraps cleanly from the upstream right exit port, down the right margin, across the inter-section gap, and down the left margin into the downstream left entry port - no dangling port stubs and no avoidable crossings between co-travelling lines.
Mermaid source
%%metro title: Rail inter-section connector%%metro style: dark%%metro line_spread: rails%%metro line: a | A | #2db572%%metro line: b | B | #f4a300
graph LR subgraph one [Section one] s1[Start] s2[Middle] s1 -->|a,b| s2 end subgraph two [Section two] t1[Next] t2[End] t1 -->|a,b| t2 end s2 -->|a,b| t1CLI command
nf-metro render examples/topologies/rail_inter_section.mmd -o rail_inter_section.svgRendered map
Rail Offtrack Io
A `%%metro line_spread: rails` section with off-track `%%metro file:` input and output. Each off-track file terminus carries a buffer-stop nub at the rail-side end of its vertical stub (like the on-rail CRAM/VCF termini) seated clear of its under-icon caption, rather than the line ending bare at the icon.
Mermaid source
%%metro title: Rail off-track file input and output%%metro style: dark%%metro line_spread: rails%%metro line: a | A | #2db572%%metro line: b | B | #f4a300%%metro file: cram_in | CRAM%%metro file: aux_in | BED | Targets%%metro file: side_out | QC%%metro off_track: aux_in%%metro off_track: side_out
graph LR subgraph sec [Calling] cram_in[ ] align[Align] call[Call] report[Report] aux_in[ ] side_out[ ]
cram_in -->|a,b| align align -->|a,b| call call -->|a,b| report aux_in -->|a| call call -->|a| side_out endCLI command
nf-metro render examples/topologies/rail_offtrack_io.mmd -o rail_offtrack_io.svgRendered map
Rail Offtrack Plain Io
A `%%metro line_spread: rails` section with plain (non-file) off-track input and output. Each plain off-track node renders a station marker at its line end rather than a bare stub, and the input's label sits above the node clear of its drop and the adjacent station's label.
Mermaid source
%%metro title: Rail off-track plain input and output%%metro style: dark%%metro line_spread: rails%%metro line: a | A | #2db572%%metro line: b | B | #f4a300%%metro file: cram_in | CRAM
graph LR subgraph sec [Calling] cram_in[ ] align[Align] call[Call] report[Report] aux[Targets BED] qc[QC report]
cram_in -->|a,b| align align -->|a,b| call call -->|a,b| report aux -->|a| call call -->|a| qc end%%metro off_track: aux%%metro off_track: qcCLI command
nf-metro render examples/topologies/rail_offtrack_plain_io.mmd -o rail_offtrack_plain_io.svg