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: nfcore%%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: nf-core-rnaseq_logo_light.png | nf-core-rnaseq_logo_dark.png%%metro style: nfcore%%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: nf-core-rnaseq_logo_light.png | nf-core-rnaseq_logo_dark.png%%metro style: nfcore%%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: nfcore%%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: nfcore%%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: nfcore%%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: nfcore%%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
Inactive Lines
Grey out optional routes to highlight what actually ran. The two optional subworkflows carry the `inactive` fifth field on their `%%metro line:` directive, so they (and the stations, labels, and legend swatches only they touch) render muted while the default STAR path stays full colour. Muting reaches the interchange the two optional routes share and the banner file icon they end at, both greyed to match. Override per-render with `--inactive-lines` (an empty value forces every line active).
Mermaid source
%%metro title: Inactive Lines%%metro style: nfcore%%metro line: star | STAR alignment (default) | #2db572%%metro line: salmon | Salmon pseudo-alignment (inactive) | #ff8c00 | solid | inactive%%metro line: sv | Structural variants (inactive) | #e63946 | dashed | inactive%%metro marker: sortmerge | square, #6a4c93%%metro interchange: sortmerge | salmon | sv%%metro files: sv_vcf | VCF | | banner
graph LR reads[Reads] qc[QC] star_align[STAR] salmon_align[Salmon] sortmerge[Samtools sort] manta[Manta] quant[tximport] sv_vcf[ ] report[MultiQC]
reads -->|star,salmon| qc qc -->|star| star_align qc -->|salmon| salmon_align star_align -->|star| quant star_align -->|sv| sortmerge salmon_align -->|salmon| sortmerge sortmerge -->|salmon| quant sortmerge -->|sv| manta manta -->|sv| sv_vcf quant -->|star,salmon| reportCLI command
nf-metro render examples/inactive_lines.mmd -o inactive_lines.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: nfcore%%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 with multiline captions: 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: nfcore%%metro diamond_style: symmetric%%metro line: main | Pipeline | #4CAF50
%%metro file: ref_in | FASTA | Reference\nGenome%%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
File Node With Outgoing Edge
A produced GTF artifact feeds a downstream consumer while retaining its file icon and human-readable caption on the pipeline trunk.
Mermaid source
%%metro title: File node with an outgoing edge%%metro line: main | Main | #e6007e%%metro file: made_gtf | GTF | Hybrid GTF%%metro file: final_report | HTML | Report
graph LR subgraph a [Alpha] a1[Make GTF] a2[Use GTF] a1 -->|main| made_gtf made_gtf -->|main| a2 a2 -->|main| final_report endCLI command
nf-metro render examples/topologies/file_node_with_outgoing_edge.mmd -o file_node_with_outgoing_edge.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: nfcore%%metro logo: 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: nfcore%%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: nfcore%%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: nfcore%%metro diamond_style: symmetric%%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
Metagenomics Input
A `%%metro direction: TB` input section whose `Short reads` FASTQ terminus is a source, so its file icon sits above the station on the vertical flow. The caption seats clear above the icon instead of striking the station marker.
Mermaid source
%%metro title: Metagenomic profiling (input slice)%%metro style: nfcore%%metro line: prof | Functional profiling | #3f9e5c%%metro files: input_reads | FASTQ | Short reads | banner
graph LR subgraph input [Input] %%metro direction: TB input_reads[ ] fastqc[FastQC] input_reads -->|prof| fastqc end
subgraph profiling [Profiling] %%metro entry: left | prof host_removal[Host removal] profile[Profile pathways] host_removal -->|prof| profile end
fastqc -->|prof| host_removalCLI command
nf-metro render examples/metagenomics_input.mmd -o metagenomics_input.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: nfcore%%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
Straight Drop Below
A branch fans off at a junction and drops into a section directly below it, in a column that clears both neighbouring boxes. The connecting leg descends as one straight vertical run into the top-entry port rather than leading out to a parallel channel and jogging back onto the port at the section boundary.
Mermaid source
%%metro title: Straight Drop Below%%metro directional: true%%metro line: main | Main | #2db572%%metro line: branch | Branch | #e64980%%metro grid: top | 0,0%%metro grid: bottom | 0,1%%metro grid: sink | 1,1
graph LR subgraph top [Top] t0[Source] end subgraph bottom [Bottom] %%metro entry: top | branch b0[Assemble] end subgraph sink [Sink] s0[Collect] end t0 -->|branch| b0 t0 -->|main| s0CLI command
nf-metro render examples/topologies/straight_drop_below.mmd -o straight_drop_below.svgRendered map
Peeloff Straight Drop Near Wall
A branch peels off an inter-section trunk at a junction and drops into a single-line section two rows directly below, sharing the junction's X with the top-entry port. The drop column runs one curve radius outside the flanking boxes' walls on both sides; the leg still descends as one straight vertical into the port rather than stepping out past the column and jogging back onto the port at the boundary.
Mermaid source
%%metro title: Peel-off Straight Drop Near Wall%%metro directional: true%%metro line: ribo | Ribo | #2db572%%metro line: rnaseq | RNA | #e64980%%metro grid: preprocessing | 0,0%%metro grid: alignment | 1,0%%metro grid: quantification | 2,0%%metro grid: te | 1,1%%metro grid: novel_transcripts | 1,2
graph LR subgraph preprocessing [Preprocessing] p0[Trim] end subgraph alignment [Alignment] a0[Align] end subgraph quantification [Quantification] q0[Quantify] end subgraph te [TE] %%metro entry: right | ribo t0[TE] end subgraph novel_transcripts [Novel Transcripts] %%metro entry: top | rnaseq nt0[Assemble] end p0 -->|ribo| a0 a0 -->|ribo| q0 a0 -->|rnaseq| nt0 q0 -->|ribo| t0CLI command
nf-metro render examples/topologies/peeloff_straight_drop_near_wall.mmd -o peeloff_straight_drop_near_wall.svgRendered map
Top Entry Bundle Offset Seam
A line splits off a shared multi-line trunk and drops into a section through its `entry: top` port while carrying a within-bundle offset. The inter-section descent tapers that offset away before the boundary so it lands on the port's own X, meeting the intra-section drop as one continuous stroke rather than stepping sideways across the top edge.
Mermaid source
%%metro title: Top-entry bundle-offset seam%%metro line: a | Line A | #e6007e%%metro line: b | Line B | #2db572%%metro line: c | Line C | #2b6cb0%%metro grid: src | 0,0%%metro grid: other | 3,0%%metro grid: dst | 2,1%%metro grid: mid | 1,1
graph LR subgraph src [Src] %%metro exit: right | a, b, c s1[S1] end subgraph other [Other] %%metro entry: left | a, b, c o1[O1] end subgraph dst [Dst] %%metro direction: RL %%metro entry: top | b %%metro exit: left | b d1[D1] d2[D2] d3[D3] d1 -->|b| d2 d2 -->|b| d3 end subgraph mid [Mid] %%metro direction: RL %%metro entry: right | b m1[M1] end s1 -->|a,b,c| o1 s1 -->|b| d1 d3 -->|b| m1CLI command
nf-metro render examples/topologies/top_entry_bundle_offset_seam.mmd -o top_entry_bundle_offset_seam.svgRendered map
Multirow Source Stacked Fan
A source section spanning three grid rows feeds three vertically stacked downstream sections through one right-exit port, while an in-section terminal forces the exiting lines onto a bypass. The three lines descend together from the trunk to the lower exit row over a diagonal flattened toward 45 degrees, so they read as distinct parallel tracks rather than fusing into one stroke on a near-vertical drop.
Mermaid source
%%metro title: Multi-row source, stacked fan%%metro file: reads_in | FASTQ | Reads%%metro line: align | Alignment | #2db572%%metro line: qc | QC | #e6550d%%metro line: quant | Quantification | #0570b0%%metro line: fusion | Fusion detection | #756bb1%%metro grid: align_sec | 0,0,3,1%%metro grid: qc_sec | 1,0,1,1%%metro grid: quant_sec | 1,1,1,1%%metro grid: fusion_sec | 1,2,1,1
graph LR subgraph align_sec [Alignment] %%metro exit: right | qc, quant, fusion reads_in[ ] bbduk[BBDuk trim] star[STAR 2-pass] cram[samtools CRAM] reads_in -->|align,qc,quant,fusion| bbduk bbduk -->|align,qc,quant,fusion| star star -->|align| cram end subgraph qc_sec [QC] %%metro entry: left | qc flagstat[flagstat + mosdepth] markdup[sambamba markdup] rnaseqc[RNA-SeQC] star -->|qc| flagstat star -->|qc| markdup markdup -->|qc| rnaseqc end subgraph quant_sec [Quantification] %%metro entry: left | quant rsem[RSEM] geneann[Gene annotation] star -->|quant| rsem rsem -->|quant| geneann end subgraph fusion_sec [Fusion detection] %%metro entry: left | fusion arriba[Arriba] starfusion[STAR-Fusion] merge[Merge fusions] draw[Draw fusions] star -->|fusion| arriba star -->|fusion| starfusion arriba -->|fusion| merge starfusion -->|fusion| merge merge -->|fusion| draw endCLI command
nf-metro render examples/topologies/multirow_source_stacked_fan.mmd -o multirow_source_stacked_fan.svgRendered map
Top Entry Left Neighbour
A section with a `entry: top` port fed by its left neighbour in the same grid row. The connector rises in the inter-section gap to just above the target's top edge, runs across to the port's column, and drops straight in. The port rides the top edge even when the box grows upward to align with a taller row-mate, and the up-leg clears only the header badge rather than overshooting into the shared inter-row channel.
Mermaid source
%%metro title: Top Entry Fed From Left Neighbour%%metro directional: true%%metro line: main | Main | #2db572%%metro file: aux | Ref%%metro off_track: aux%%metro grid: intake | 0,0%%metro grid: screen | 1,0%%metro grid: producer | 1,1%%metro grid: consumer | 2,1
graph LR subgraph intake [Intake] i0[Load] end subgraph screen [Screen] s0[Filter] end subgraph producer [Producer] aux[ ] -->|main| p0 p0[Prep] end subgraph consumer [Consumer] %%metro entry: top | main c0[Analyse] end i0 -->|main| s0 p0 -->|main| c0CLI command
nf-metro render examples/topologies/top_entry_left_neighbour.mmd -o top_entry_left_neighbour.svgRendered map
Offtrack Output Peel Before Successor
A two-line filter fans to a dead-end file output and on to the next station. The output's branch peels off between the two rather than overrunning the successor's column, so the icon clears the downstream stations and their labels.
Mermaid source
%%metro title: Off-track output peel-off before successor%%metro line: a | Line A | #0570b0%%metro line: b | Line B | #d94801%%metro file: early_out | VCF | Early%%metro off_track: early_out
graph LR subgraph s [Section] filt[Filter step] annot[Annotate step] final[Finalize] early_out[ ] final_out[ ]
filt -->|a,b| early_out filt -->|a,b| annot annot -->|a,b| final final -->|a,b| final_out endCLI command
nf-metro render examples/topologies/offtrack_output_peel_before_successor.mmd -o offtrack_output_peel_before_successor.svgRendered map
Paired Input Fan Branch Tree
A paired-input map: the source fans to two stacked converters and threads the two-track bundle cleanly between them to the branch tree, whose dead-end outputs peel off onto full grid rows without crowding their neighbours.
Mermaid source
%%metro title: Paired-track demo%%metro diamond_style: symmetric%%metro style: dark%%metro legend: bl%%metro files: pairs_in | FILE | Input set%%metro files: out_a1 | OUT | Track A%%metro file: out_a2 | OUT | Output A2%%metro file: out_a3 | OUT | Output three%%metro file: out_b | OUT | Probe value%%metro files: out_c | OUT | Chain out%%metro line: track_a | Track A | #0570b0%%metro line: track_b | Track B | #d94801
graph LR subgraph input_sec [Inputs] pairs_in[ ] convert_a[Convert one\ntrack a] convert_b[Convert two\ntrack b]
pairs_in -->|track_a| convert_a pairs_in -->|track_b| convert_b end
subgraph branch_sec [Branching stage] stage_a1[Upstream\nprimary stage] stage_a2[Filter step] stage_a3[Fork\nannotation] stage_a4[Terminal\nsegment] out_a1[ ] out_a2[ ] out_a3[ ]
pairs_in -->|track_a| stage_a1 pairs_in -->|track_b| stage_a1 stage_a1 -->|track_a,track_b| stage_a2 stage_a2 -->|track_a,track_b| out_a1 stage_a2 -->|track_a,track_b| stage_a3 stage_a3 -->|track_a,track_b| out_a2 stage_a3 -->|track_a,track_b| stage_a4 stage_a4 -->|track_a,track_b| out_a3 end
subgraph probe_sec [Hub] stage_b1[merge node] out_b[ ]
convert_a -->|track_a| stage_b1 convert_b -->|track_b| stage_b1 stage_b1 -->|track_a,track_b| out_b end
subgraph chain_sec [Downstream chain] split_a[Region split\ntrack a] split_b[Region split\ntrack b] stage_c1[Assemble\nstage] stage_c2[Collate\nmerge step] stage_c3[Fit and rank\nstage] stage_c4[Adjust to\nscale] out_c[ ]
convert_a -->|track_a| split_a convert_b -->|track_b| split_b split_a -->|track_a| stage_c1 split_b -->|track_b| stage_c1 stage_c1 -->|track_a,track_b| stage_c2 stage_c2 -->|track_a,track_b| stage_c3 stage_c3 -->|track_a,track_b| stage_c4 stage_c4 -->|track_a,track_b| out_c endCLI command
nf-metro render examples/topologies/paired_input_fan_branch_tree.mmd -o paired_input_fan_branch_tree.svgRendered map
Serpentine Layout
Opposing Bypass Corridor
A line runs left-to-right into a folded row and right-to-left back out of it through the same inter-row gap. The counter-running feed and return get distinct, direction-specific corridors: the LR feed rides an upper band and the RL return keeps its own lower band a full lane beneath it, rather than folding back over one shared track.
Mermaid source
%%metro title: Opposing Bypass Corridor%%metro directional: true%%metro line: ribo | Ribo-seq | #2db572%%metro line: rnaseq | RNA-seq | #e64980%%metro grid: preprocessing | 0,0%%metro grid: alignment | 1,0%%metro grid: quantification | 2,0%%metro grid: reporting | 3,0%%metro grid: orf_calling | 3,1%%metro grid: psite_id | 2,1%%metro grid: te | 1,1%%metro grid: novel_transcripts | 4,1
graph LR subgraph preprocessing [Preprocessing] p0[Trim] end subgraph alignment [Alignment] a0[Align] end subgraph quantification [Quantification] q0[Quantify] end subgraph reporting [Reporting] r0[Report] end subgraph orf_calling [ORF Calling] %%metro exit: left | ribo o0[Call ORFs] end subgraph psite_id [P-site ID] %%metro entry: top | ribo %%metro exit: left | ribo ps0[P-sites] end subgraph te [TE] %%metro entry: right | ribo t0[TE] end subgraph novel_transcripts [Novel Transcripts] %%metro entry: top | rnaseq %%metro exit: left | rnaseq nt0[Assemble Transcripts] end p0 -->|ribo| a0 a0 -->|ribo| q0 q0 -->|ribo| r0 q0 -->|ribo| o0 o0 -->|ribo| ps0 ps0 -->|ribo| t0 a0 -->|rnaseq| nt0 nt0 -->|rnaseq| o0CLI command
nf-metro render examples/topologies/opposing_bypass_corridor.mmd -o opposing_bypass_corridor.svgRendered map
Opposing Return Row Pair
A single line drops from the top row into a right-hand section then returns leftward to a sibling below. The descending feed and the returning leg share one inter-row gap; each takes its own horizontal corridor a clear lane apart instead of the two grazing at a 4px sliver.
Mermaid source
%%metro title: Opposing Return-Row Pair%%metro directional: true%%metro line: main | Main | #2db572%%metro grid: intake | 0,0%%metro grid: process | 1,0%%metro grid: collect | 2,0%%metro grid: left_out | 1,1%%metro grid: right_out | 3,1
graph LR subgraph intake [Intake] i0[Intake] end subgraph process [Process] pr0[Process] end subgraph collect [Collect] c0[Collect] end subgraph left_out [Left Out] %%metro entry: top | main lo0[Left] end subgraph right_out [Right Out] %%metro entry: top | main %%metro exit: left | main ro0[Right] end i0 -->|main| pr0 pr0 -->|main| c0 pr0 -->|main| ro0 ro0 -->|main| lo0CLI command
nf-metro render examples/topologies/opposing_return_row_pair.mmd -o opposing_return_row_pair.svgRendered map
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
Serpentine Rl Right Entry Bundle
A two-line boustrophedon fold with both rows packed into one grid cell, so the top row's RIGHT exit descends straight into the direction: RL return row's RIGHT entry. Leaving and arriving rightward is a half-turn, so the bundle re-nests across the fold: the line on the top track going out rides the outer lane round the corner and lands on the bottom track coming back (issue #1767).
Mermaid source
%%metro title: Serpentine RL Right-Entry Bundle%%metro style: dark%%metro line: dna | DNA | #4a90d9%%metro line: rna | RNA | #e63946%%metro grid: alignment, quantification | 0,0%%metro grid: variant_calling, annotation | 0,1
graph LR subgraph alignment [Alignment] al1[Trim] al2[Map] al1 -->|dna,rna| al2 end
subgraph quantification [Quantification] qu1[Count] qu2[Normalise] qu1 -->|dna,rna| qu2 end
subgraph variant_calling [Variant Calling] %%metro direction: RL vc1[Call] vc2[Filter] vc1 -->|dna,rna| vc2 end
subgraph annotation [Annotation] %%metro direction: RL an1[Annotate] an2[Report] an1 -->|dna,rna| an2 end
al2 -->|dna,rna| qu1 qu2 -->|dna,rna| vc1 vc2 -->|dna,rna| an1CLI command
nf-metro render examples/topologies/serpentine_rl_right_entry_bundle.mmd -o serpentine_rl_right_entry_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
Packed Cell Cellmate Bypass Cross Row
The packed-cell cell-mate bypass where the bypassing line's source is itself a member of the packed cell, and the target sits a row below and a column over rather than sharing the source's row. The default L-shape's source-row leg used to run the full row width before turning, cutting straight through the source's own cell-mate. When the gap between the source and cell-mate is clear the route drops through it in one straight channel and turns along the target row (PR #1405).
Mermaid source
%%metro title: Packed cell-mate bypass (cross-row)%%metro line: a | Line A | #e6007e%%metro line: b | Line B | #2db572%%metro grid: quant, rep | 1,0%%metro grid: sink | 2,1
graph LR subgraph quant [Quant] %%metro exit: right | a, b q1[Q1] end subgraph rep [Rep] %%metro entry: left | a, b r1[R1] end subgraph sink [Sink] %%metro entry: left | b k1[K1] end
q1 -->|a,b| r1 q1 -->|b| k1CLI command
nf-metro render examples/topologies/packed_cell_cellmate_bypass_cross_row.mmd -o packed_cell_cellmate_bypass_cross_row.svgRendered map
Packed Cell Right Exit Left Entry Wrap
A RIGHT exit on the far member of a packed cell feeds a LEFT entry in the row below. The route leads outward from the source, crosses through the inter-row gap, descends outside the target's left edge, and enters from the port's outward side without crossing either box (issue #1631).
Mermaid source
%%metro title: nf-core/genomeassembler%%metro row_align: top%%metro line_order: span%%metro center_ports: true%%metro fold_threshold: 1%%metro font_scale: 1%%metro line_spread: centered%%metro track_gap: 2%%metro mode: light%%metro line: ont | ONT | #2DD4BF%%metro line: hifi | HiFi | #C792EA%%metro line: hic | HiC | #EBD894%%metro line: short | short genomic | #98D7EC%%metro line: reference | refs | #A1834F%%metro line: annotation | annotation | #B191EE%%metro line: assembled | assembly | #808080%%metro line: qc | QC | #85D05D%%metro file: fasta | FASTA | fasta%%metro file: assembly_file_out | FASTA | assembly%%metro file: assembly_file_in | FASTA | assembly%%metro file: polished_file | FASTA | polished assembly%%metro file: scaffolded_in | FASTA | (polished) assembly%%metro file: scaffolded_out | FASTA | scaffolded assembly%%metro file: liftoff_in | FASTA | assembly%%metro grid: input | 0,0%%metro grid: prep,assemble | 1,0%%metro grid: qc,annot | 2,0%%metro grid: polish | 1,1%%metro grid: scaffold | 2,1%%metro legend: br
graph LR subgraph input [Inputs] ontreads [ONT reads] hifireads [HiFi reads] hicreads [HiC reads] shortreads [short reads] ref_genome [Reference genome] ref_anno [Reference annotation] _input_out end subgraph prep [Prepare] fastplong fastp end subgraph assemble [Assemble] single [hifiasm \n flye] hybrid [hifiasm_ul] scaff_ass [Scaffold:\n ONT / HiFi] assembly_file_out single --> |assembled| assembly_file_out hybrid --> |assembled| assembly_file_out scaff_ass --> |assembled| assembly_file_out end subgraph polish [Polish] assembly_file_in polish_ont [medaka \n dorado] polish_short [pilon] polished_file assembly_file_in --> |assembled| polish_ont assembly_file_in --> |assembled| polish_short polish_ont --> |assembled| polished_file polish_short --> |assembled| polished_file end subgraph scaffold [Scaffold] scaffolded_in scaffolded_in --> |assembled|scaff_ref scaffolded_in --> |assembled|scaff_ont scaffolded_in --> |assembled|scaff_hic
scaff_ref --> |assembled|scaffolded_out scaff_ont --> |assembled|scaffolded_out scaff_hic --> |assembled|scaffolded_out
scaff_ref[Ref: \n RagTag] scaff_hic[HiC: \n yahs] scaff_ont[longstitch \n LINKS] scaffolded_out end subgraph qc [QC] fasta kmer [k-mer: meryl / merqury] quast [QUAST] busco [BUSCO] fasta --> |qc| kmer fasta --> |qc| quast fasta --> |qc| busco end
subgraph annot [Annotation] liftoff_in[ ] liftoff [liftoff] liftoff_in --> |annotation| liftoff end
ontreads --> |ont| _input_out hifireads --> |hifi| _input_out hicreads --> |hic| _input_out shortreads --> |short| _input_out _input_out --> |ont| fastplong _input_out --> |hifi| fastplong _input_out --> |hic| fastp _input_out --> |short| fastp
fastplong --> |ont,hifi| single fastplong --> |ont,hifi| hybrid fastplong --> |ont,hifi| scaff_ass fastp --> |short| kmer fastp --> |short| polish_short ref_genome --> |reference| _input_out ref_anno --> |reference| _input_out assembly_file_out --> |assembled| assembly_file_in polished_file --> |assembled| scaffolded_in _input_out --> |reference| liftoff_in _input_out --> |reference| fastaCLI command
nf-metro render examples/topologies/packed_cell_right_exit_left_entry_wrap.mmd -o packed_cell_right_exit_left_entry_wrap.svgRendered map
Packed Cell Left Entry Blocked Top Corridor
A same-row packed-cell route approaches a LEFT entry while a spanning section blocks the row-top corridor. The fallback travels beneath the row and reaches the entry from its outward side without crossing a section.
Mermaid source
%%metro title: Packed-cell LEFT-entry wrap with a blocked row-top corridor%%metro line: flow | Flow | #2db572%%metro line: obstacle | Obstacle | #8f8f8f%%metro grid: source, blocker | 0,1%%metro grid: obstacle_section | 1,0,2%%metro grid: target | 2,1
graph LR subgraph source [Source] %%metro exit: right | flow source_step[Source step] end
subgraph blocker [Packed cell-mate] blocker_step[Blocking step] end
subgraph target [Target] %%metro entry: left | flow target_step[Target step] end
subgraph obstacle_section [Spanning obstacle] obstacle_start[Obstacle start] obstacle_end[Obstacle end] obstacle_start -->|obstacle| obstacle_end end
source_step -->|flow| target_stepCLI command
nf-metro render examples/topologies/packed_cell_left_entry_blocked_top_corridor.mmd -o packed_cell_left_entry_blocked_top_corridor.svgRendered map
Packed Cell Cellmate Bypass Entry Y
A fan-out junction hangs below its packed cell-mate's box and feeds the LEFT entry of the cell member beyond it, so the hop's source Y clears the cell-mate while its target entry Y runs straight through it. Both lines take the row-top corridor over the cell-mate; the one that also enters it shares that corridor before splitting off (issue #1766).
Mermaid source
%%metro line: riboseq | Ribo-seq | #e6007e%%metro line: rnaseq | RNA-seq | #2db572%%metro file: bigwig_out | BW | Coverage%%metro grid: preprocessing, alignment, novel_transcripts, quantification | 0,0%%metro grid: orf_calling | 0,1
graph LR subgraph preprocessing [Pre-processing] ribodetector[RiboDetector] bowtie2_rrna[Bowtie2] infer_strand[Infer strandedness]
ribodetector -->|riboseq,rnaseq| infer_strand bowtie2_rrna -->|riboseq,rnaseq| infer_strand end
subgraph alignment [Alignment] star[STAR] umi_dedup[Dedup]
star -->|riboseq,rnaseq| umi_dedup end
subgraph novel_transcripts [Novel transcripts] stringtie[StringTie] gffcompare[GffCompare]
stringtie -->|rnaseq| gffcompare end
subgraph quantification [Quantification] genomecov[genomecov]
genomecov -->|riboseq,rnaseq| bigwig_out end
subgraph orf_calling [ORF calling] star_hybrid[STAR 2nd pass] end
infer_strand -->|riboseq,rnaseq| star umi_dedup -->|rnaseq| stringtie umi_dedup -->|riboseq,rnaseq| genomecov umi_dedup -->|riboseq| star_hybridCLI command
nf-metro render examples/topologies/packed_cell_cellmate_bypass_entry_y.mmd -o packed_cell_cellmate_bypass_entry_y.svgRendered map
Packed Cell Cellmate Bypass No Handoff
A packed cell's far member and the section past the pack are both entered over an intervening cell-mate. Neither hop's sibling reaches its target through a plain multi-column bypass, so no shared descent can be handed over and each hop draws its own corridor (issue #1844).
Mermaid source
%%metro line: riboseq | Ribo-seq | #e6007e%%metro line: rnaseq | RNA-seq | #2db572%%metro file: bigwig_out | BW | Coverage%%metro grid: preprocessing, alignment, novel_transcripts, quantification | 0,0%%metro grid: psite | 1,0
graph LR subgraph preprocessing [Pre-processing] ribodetector[RiboDetector] bowtie2_rrna[Bowtie2] infer_strand[Infer strandedness]
ribodetector -->|riboseq,rnaseq| infer_strand bowtie2_rrna -->|riboseq,rnaseq| infer_strand end
subgraph alignment [Alignment] star[STAR] umi_dedup[Dedup]
star -->|riboseq,rnaseq| umi_dedup end
subgraph novel_transcripts [Novel transcripts] stringtie[StringTie] gffcompare[GffCompare]
stringtie -->|rnaseq| gffcompare end
subgraph quantification [Quantification] genomecov[genomecov]
genomecov -->|riboseq,rnaseq| bigwig_out end
subgraph psite [P-site] ribowaltz[riboWaltz] end
infer_strand -->|riboseq,rnaseq| star umi_dedup -->|rnaseq| stringtie umi_dedup -->|riboseq,rnaseq| genomecov umi_dedup -->|riboseq| ribowaltzCLI command
nf-metro render examples/topologies/packed_cell_cellmate_bypass_no_handoff.mmd -o packed_cell_cellmate_bypass_no_handoff.svgRendered map
Bypass Left Entry From Right
A source junction sits beyond an intervening section and feeds a LEFT entry behind it. The generic bypass loops below the row and approaches the entry from its outward side without crossing a section.
Mermaid source
%%metro title: Bypass into a far LEFT entry from a junction%%metro line: main | Main | #2db572%%metro line: side | Side | #8f8f8f%%metro line: obstacle | Obstacle | #a855f7%%metro grid: target | 0,0%%metro grid: blocker | 1,0%%metro grid: source | 2,0%%metro grid: sibling | 2,1
graph LR subgraph target [Target] %%metro entry: left | main target_step[Target step] end
subgraph blocker [Intervening section] blocker_start[Blocker start] blocker_end[Blocker end] blocker_start -->|obstacle| blocker_end end
subgraph source [Source] %%metro direction: RL %%metro exit: left | main, side source_step[Source step] end
subgraph sibling [Sibling] %%metro entry: left | side sibling_step[Sibling step] end
source_step -->|main| target_step source_step -->|side| sibling_stepCLI command
nf-metro render examples/topologies/bypass_left_entry_from_right.mmd -o bypass_left_entry_from_right.svgRendered map
Fan Bypass Shared Band
A junction fans into a local branch and a distant lower-row LEFT entry. The distant branch bypasses both intervening rows through its fan corridor while remaining clear of every unrelated section.
Mermaid source
%%metro title: Junction fan sharing a bypass band%%metro line: local | Local branch | #2db572%%metro line: long | Bypass branch | #a855f7%%metro line: obstacle | Obstacle | #f59e0b%%metro grid: source | 0,0%%metro grid: local | 1,0%%metro grid: blocker | 2,0%%metro grid: lower_blocker | 2,1%%metro grid: distant | 3,2
graph LR subgraph source [Source] %%metro exit: right | local, long source_step[Source step] end
subgraph local [Local branch] %%metro entry: left | local local_step[Local step] end
subgraph blocker [Intervening section] blocker_start[Blocker start] blocker_end[Blocker end] blocker_start -->|obstacle| blocker_end end
subgraph distant [Distant branch] %%metro entry: left | long distant_step[Distant step] end
subgraph lower_blocker [Lower intervening section] lower_start[Lower blocker start] lower_end[Lower blocker end] lower_start -->|obstacle| lower_end end
source_step -->|local| local_step source_step -->|long| distant_stepCLI command
nf-metro render examples/topologies/fan_bypass_shared_band.mmd -o fan_bypass_shared_band.svgRendered map
Packed Cell Consumer Drop In
A consumer feed into the far member of a packed cell, arriving from the row above and to the right. The member hints top/left entry, but the feed comes from the right; geometry-aware entry-side inference resolves its entry to the right edge so the feed drops straight in rather than wrapping below every section to reach a left port (issue #1311).
Mermaid source
%%metro title: Packed-cell consumer drop-in%%metro style: nfcore%%metro line: main | Main | #e6007e%%metro line: alt | Alt (optional) | #2db572%%metro grid: pre | 0,0%%metro grid: feeder | 1,0%%metro grid: leftmem, rightmem | 0,1
graph LR subgraph pre [Pre-processing] %%metro exit: right | main, alt p_in[ ] p_prep[Prep]
p_in -->|main,alt| p_prep end
subgraph feeder [Alignment] %%metro entry: left | main, alt %%metro exit: right | main, alt f_align[Align] f_dedup[Dedup]
f_align -->|main,alt| f_dedup end
subgraph leftmem [Assembly] %%metro entry: top | alt %%metro exit: right | main l_assemble[Assemble] l_merge[Merge]
l_assemble -->|alt| l_merge end
subgraph rightmem [Calling] %%metro entry: top | main %%metro entry: left | main r_call_a[Call A] r_call_b[Call B] r_call_c[Call C] end
%% Inter-section edges p_prep -->|main,alt| f_align f_dedup -->|alt| l_assemble f_dedup -->|main| r_call_a f_dedup -->|main| r_call_b f_dedup -->|main| r_call_c l_merge -->|main| r_call_aCLI command
nf-metro render examples/topologies/packed_cell_consumer_drop_in.mmd -o packed_cell_consumer_drop_in.svgRendered map
Packed Cell Left Entry Under Neighbour
A section whose packed cell-mate in the row above is wider has its LEFT entry port sitting under that neighbour's box. A fan-out junction feeding that entry opens its descent in the inter-cell gap beside the source and traverses below the neighbour, rather than descending the crossed column's outer gap and threading the neighbour's interior (issue #1486, vertical descent variant).
Mermaid source
%%metro title: Packed-cell left-entry descent under a cell-neighbour%%metro line: l1 | Line 1 | #e6007e%%metro line: l2 | Line 2 | #2db572%%metro grid: sec_a | 0,0%%metro grid: sec_b | 1,0%%metro grid: sec_f, sec_h | 2,0%%metro grid: sec_e, sec_g | 2,1
graph LR subgraph sec_a [Section A] %%metro exit: right | l1, l2 a1[A1] a1 -->|l1,l2| file1 end subgraph sec_b [Section B] %%metro entry: left | l1, l2 %%metro exit: right | l1, l2 b1[B1] b1 -->|l1,l2| file2 end subgraph sec_f [Section F] %%metro entry: left | l1, l2 %%metro exit: right | l2 f1[F1] f2[F2] f1 -->|l1,l2| f2 end subgraph sec_h [Section H] %%metro entry: left | l1 h1[H1] h2[H2] h1 -->|l1| h2 end subgraph sec_e [Section E] %%metro entry: left | l1 e1[E1] e2[E2] e3[E3] e4[E4] e5[E5] e1 -->|l1| e2 e2 -->|l1| e3 e3 -->|l1| e4 e4 -->|l1| e5 end subgraph sec_g [Section G] %%metro entry: left | l2 g1[G1] g2[G2] g1 -->|l2| g2 end a1 -->|l1,l2| b1 b1 -->|l1,l2| f1 f2 -->|l1| h1 b1 -->|l1| e1 f2 -->|l2| g1CLI command
nf-metro render examples/topologies/packed_cell_left_entry_under_neighbour.mmd -o packed_cell_left_entry_under_neighbour.svgRendered map
Fan Top Entry Over Tall Section
A fan-out junction with mixed-handler branches shares one inter-row traverse band. One branch is a TOP-entry drop into a section stacked below a different, shorter column; its horizontal trunk leg must clear the taller row-above section in the crossed column rather than skim its interior. The band is measured across the columns the fan's gap branches traverse so the run drops below that taller box (issue #1486, horizontal channel variant).
Mermaid source
%%metro title: Fan top-entry over a tall row-above section%%metro line: l1 | Line 1 | #e6007e%%metro grid: sec_a | 0,0%%metro grid: sec_b | 1,0%%metro grid: sec_f | 2,0%%metro grid: sec_c | 0,1%%metro grid: sec_d | 1,1%%metro grid: sec_e | 3,1
graph LR subgraph sec_a [Section A] %%metro exit: right | l1 a1[A1] a2[A2] a3[A3] a4[A4] a5[A5] a6[A6] a7[A7] a8[A8] a1 -->|l1| a2 a2 -->|l1| a3 a2 -->|l1| a4 a2 -->|l1| a5 a2 -->|l1| a6 a2 -->|l1| a7 a3 -->|l1| a8 a4 -->|l1| a8 a5 -->|l1| a8 a6 -->|l1| a8 a7 -->|l1| a8 end subgraph sec_b [Section B] %%metro entry: left | l1 %%metro exit: right | l1 b1[B1] b1 -->|l1| file1 end subgraph sec_f [Section F] %%metro entry: left | l1 f1[F1] f1 -->|l1| file2 end subgraph sec_c [Section C] %%metro entry: top | l1 %%metro exit: right | l1 c1[C1] c2[C2] c1 -->|l1| c2 end subgraph sec_d [Section D] %%metro entry: left | l1 d1[D1] d2[D2] d1 -->|l1| d2 end subgraph sec_e [Section E] %%metro entry: top | l1 e1[E1] e2[E2] e1 -->|l1| e2 end a8 -->|l1| b1 b1 -->|l1| c1 b1 -->|l1| f1 b1 -->|l1| e1 c2 -->|l1| d1CLI command
nf-metro render examples/topologies/fan_top_entry_over_tall_section.mmd -o fan_top_entry_over_tall_section.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
Packed Multiline Serpentine Grid
A packed multi-row grid where section G shares a grid cell with its upstream producer section E and is also fed from the section above it. Its `entry: top` and `entry: left` hints name conflicting sides; the first-declared side wins and the section enters cleanly from the top rather than resolving to a flow-opposing right entry that folds a line back over its own track.
Mermaid source
%%metro title: Packed multi-row grid%%metro style: dark%%metro legend: tr%%metro file: file1 | DATA%%metro file: file2 | DATA%%metro file: file3 | DATA%%metro file: file4 | DATA%%metro file: file5 | DATA%%metro file: file6 | DATA%%metro file: file7 | DATA%%metro line: l1 | Line 1 | #e6007e%%metro line: l2 | Line 2 | #2db572%%metro line: l3 | Line 3 | #2b6cb0%%metro grid: sec_a | 0,0%%metro grid: sec_b | 1,0%%metro grid: sec_f, sec_h | 2,0%%metro grid: sec_c,sec_d | 0,1%%metro grid: sec_e,sec_g | 2,1
graph LR subgraph sec_a [Section A] %%metro exit: right | l1, l2, l3 file1[] a1[A1] a2[A2] a3[A3] a4[A4] a5[A5] a6[A6] a7[A7] a8[A8] a9[A9] a10[A10] a11[A11] a12[A12]
file1 -->|l1,l2,l3| a1 a1 -->|l1,l2,l3| a2 a2 -->|l1,l2,l3| a3 a3 -->|l1,l2,l3| a4 a3 -->|l1,l2,l3| a5 a4 -->|l1,l2,l3| a6 a5 -->|l1,l2,l3| a6 a6 -->|l1,l2,l3| a7 a7 -->|l1,l2,l3| a8 a7 -->|l1,l2,l3| a9 a7 -->|l1,l2,l3| a10 a8 -->|l1,l2,l3| a11 a9 -->|l1,l2,l3| a11 a10 -->|l1,l2,l3| a11 a11 -->|l1,l2,l3| a12 end
subgraph sec_b [Section B] %%metro entry: left | l1, l2, l3 %%metro exit: right | l1, l2, l3 b1[B1] b2[B2]
b1 -->|l1,l2,l3| b2 end
subgraph sec_c [Section C] %%metro entry: top | l2 %%metro exit: right | l1 c1[C1] c2[C2] c3[C3]
c1 -->|l2| c2 c2 -->|l2| c3 c3 -->|l2| file2 end
subgraph sec_d [Section D] %%metro entry: top | l1 %%metro entry: left | l1 %%metro exit: right | l1 d1[D1] d2[D2] d3[D3] d4[D4] d5[D5] d6[D6] d7[D7] d8[D8]
d1 -->|l1| d2 d2 -->|l1| d4 d3 -->|l1| d8 d4 -->|l1| d8 d5 -->|l1| d8 d6 -->|l1| d8 d7 -->|l1| d8 d8 -->|l1| file3 end
subgraph sec_e [Section E] %%metro entry: top | l1 %%metro entry: left | l1 %%metro exit: right | l1 e1[E1] e2[E2] e3[E3] e4[E4] e5[E5]
e1 -->|l1| file5 e2 -->|l1| e3 e3 -->|l1| e4 file3 -->|l1| e5 e3 -->|l1| e5 end
subgraph sec_f [Section F] %%metro entry: left | l1, l2, l3 %%metro exit: right | l1, l2, l3 f1[F1] f2[F2] f3[F3]
f1 -->|l1,l2,l3| f2 f2 -->|l1,l2,l3| file4 end
subgraph sec_g [Section G] %%metro entry: top | l2 %%metro entry: left | l1 g1[G1] g2[G2] g3[G3] g4[G4] g5[G5] g6[G6] g7[G7] g8[G8] g9[G9]
g1 -->|l1,l2| g3 g1 -->|l1,l2| g4 g3 -->|l1,l2| g8 g4 -->|l1,l2| g8 g2 -->|l1,l2| g5 g2 -->|l1,l2| g6 g2 -->|l1,l2| g7 g5 -->|l1,l2| g9 g6 -->|l1,l2| g9 g7 -->|l1,l2| g9 g8 -->|l1,l2| file6 g9 -->|l1,l2| file6 end
subgraph sec_h [Section H] %%metro entry: left | l1, l2, l3 h1[H1]
h1 -->|l1,l2,l3| file7 end
%% Inter-section edges a12 -->|l1,l2,l3| b1 b2 -->|l2| c1 b2 -->|l1| d1 b2 -->|l1| d3 b2 -->|l1| d5 b2 -->|l1| d6 b2 -->|l1| d7 file2 -->|l1| d3 file2 -->|l1| d5 file2 -->|l1| d6 file2 -->|l1| d1 b2 -->|l1| e1 b2 -->|l1| e2 b2 -->|l1,l2,l3| f1 b2 -->|l1,l2,l3| f3 e4 -->|l1| g1 f3 -->|l2| g1 e5 -->|l1| g2 f3 -->|l2| g2 f3 -->|l1,l2,l3| h1CLI command
nf-metro render examples/topologies/packed_multiline_serpentine_grid.mmd -o packed_multiline_serpentine_grid.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: nfcore%%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: nfcore%%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
Rnaseq Metro
The real nf-core/rnaseq map (from the pipeline's own `manifest.diagram` PR), covering five aligner/quantification routes, a `diamond_style: symmetric` fork-join fan into STAR/Bowtie2/HISAT2, off-track FASTQ input and HTML report termini, and a folded post-processing section.
Mermaid source
%%metro title: nf-core/rnaseq%%metro logo: nf-core-rnaseq_logo_light.png | nf-core-rnaseq_logo_dark.png%%metro style: dark%%metro diamond_style: symmetric%%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: 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
%% Process mappings for live-progress mode (nf-metro serve / nf-metro check-mapping).%% process_scope factors out the shared FQN prefix so each value is the tail%% under NFCORE_RNASEQ:RNASEQ, matched literally with intermediate subworkflow%% nesting tolerated.%%metro process_scope: NFCORE_RNASEQ:RNASEQ
%% Pre-processing%%metro process: cat_fastq | CAT_FASTQ%%metro process: fastqc_raw | FASTQ_FASTQC_UMITOOLS_TRIMGALORE:FASTQC%%metro process: fastqc_raw | FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW%%metro process: umi_tools_extract | UMITOOLS_EXTRACT%%metro process: fastp | FASTP%%metro process: trimgalore | TRIMGALORE%%metro process: fastqc_trimmed | FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM%%metro process: bbsplit | BBMAP_BBSPLIT%%metro process: sortmerna | FASTQ_REMOVE_RRNA:SORTMERNA%%metro process: ribodetector | RIBODETECTOR%%metro process: bowtie2_rrna | FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:FASTQ_REMOVE_RRNA:BOWTIE2_ALIGN%%metro process: bowtie2_rrna | FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:FASTQ_REMOVE_RRNA:BOWTIE2_ALIGN_PE%%metro process: fastqc_filtered | FASTQC_FILTERED%%metro process: infer_strandedness | FASTQ_SUBSAMPLE_FQ_SALMON:SALMON_QUANT
%% Genome alignment & quantification%%metro process: star | ALIGN_STAR:STAR_ALIGN%%metro process: star | ALIGN_STAR:SENTIEON_STAR_ALIGN%%metro process: star | ALIGN_STAR:PARABRICKS_RNA_FQ2BAM%%metro process: hisat2_align | FASTQ_ALIGN_HISAT2:HISAT2_ALIGN%%metro process: bowtie2_align | ALIGN_BOWTIE2:BOWTIE2_ALIGN%%metro process: bowtie2_align | ALIGN_BOWTIE2:BOWTIE2_ALIGN_PE%%metro process: umi_tools_dedup | UMITOOLS_DEDUP%%metro process: umi_tools_dedup | UMICOLLAPSE%%metro process: rsem | RSEM_CALCULATEEXPRESSION%%metro process: rsem | SENTIEON_RSEMCALCULATEEXPRESSION%%metro process: salmon_quant | QUANTIFY_BAM_SALMON:SALMON_QUANT%%metro process: tximport_ga | QUANTIFY_BAM_SALMON:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:TXIMETA_TXIMPORT%%metro process: tximport_ga | QUANTIFY_RSEM:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:TXIMETA_TXIMPORT%%metro process: summarized_exp_ga | QUANTIFY_BAM_SALMON:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:SE_GENE_UNIFIED%%metro process: summarized_exp_ga | QUANTIFY_BAM_SALMON:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:SE_TRANSCRIPT_UNIFIED%%metro process: summarized_exp_ga | QUANTIFY_RSEM:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:SE_GENE_UNIFIED%%metro process: summarized_exp_ga | QUANTIFY_RSEM:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:SE_TRANSCRIPT_UNIFIED%%metro process: multiqc_bowtie2 | MULTIQC_RNASEQ:MULTIQC
%% Pseudo-alignment & quantification%%metro process: salmon_pseudo | QUANTIFY_PSEUDO_ALIGNMENT:SALMON_QUANT%%metro process: kallisto | KALLISTO_QUANT%%metro process: tximport_pa | QUANTIFY_PSEUDO_ALIGNMENT:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:TXIMETA_TXIMPORT%%metro process: summarized_exp_pa | QUANTIFY_PSEUDO_ALIGNMENT:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:SE_GENE_UNIFIED%%metro process: summarized_exp_pa | QUANTIFY_PSEUDO_ALIGNMENT:QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT:SE_TRANSCRIPT_UNIFIED%%metro process: multiqc_quant | MULTIQC_RNASEQ:MULTIQC
%% Post-processing%%metro process: picard | PICARD_MARKDUPLICATES%%metro process: bedtools | BEDTOOLS_GENOMECOV_FW%%metro process: bedtools | BEDTOOLS_GENOMECOV_REV%%metro process: bedtools | BEDTOOLS_GENOMECOV_COMBINED%%metro process: bedgraph | UCSC_BEDGRAPHTOBIGWIG%%metro process: stringtie | STRINGTIE_STRINGTIE
%% Quality control & reporting%%metro process: rseqc | RSEQC_BAMSTAT%%metro process: rseqc | RSEQC_INNERDISTANCE%%metro process: rseqc | RSEQC_INFEREXPERIMENT%%metro process: rseqc | RSEQC_JUNCTIONANNOTATION%%metro process: rseqc | RSEQC_JUNCTIONSATURATION%%metro process: rseqc | RSEQC_READDISTRIBUTION%%metro process: rseqc | RSEQC_READDUPLICATION%%metro process: rseqc | RSEQC_TIN%%metro process: preseq | PRESEQ_LCEXTRAP%%metro process: qualimap | QUALIMAP_RNASEQ%%metro process: dupradar | DUPRADAR%%metro process: featurecounts | SUBREAD_FEATURECOUNTS%%metro process: deseq2_pca | DESEQ2_QC_BAM_SALMON%%metro process: deseq2_pca | DESEQ2_QC_RSEM%%metro process: deseq2_pca | DESEQ2_QC_PSEUDO%%metro process: kraken2 | KRAKEN2%%metro process: sylph | SYLPH_PROFILE%%metro process: sylph | SYLPHTAX_TAXPROF%%metro process: multiqc_final | MULTIQC_RNASEQ:MULTIQC
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] 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 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
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 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| picard stringtie -->|star_salmon,star_rsem,hisat2| rseqcCLI command
nf-metro render examples/rnaseq_metro.mmd -o rnaseq_metro.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. `%%metro stroke_scale: 1.6` coarsens the track weight and station pills together so the map survives the downscale it needs to fit a screen.
Mermaid source
%%metro title: Example analysis pathways%%metro caption: Adapted from: Fellows Yates, James A., et al. PeerJ 9 (2021)%%metro style: nfcore%%metro logo: nf-core-sarek_logo_light.png | nf-core-sarek_logo_dark.png%%metro logo_scale: 1.0%%metro font_scale: 1.3%%metro stroke_scale: 1.6%%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
Riboseq Metro
Ribosome profiling with matched RNA-seq and TI-seq, covering multi-tool ORF calling, P-site identification, and translational efficiency analysis with cross-sample ORF merging.
Mermaid source
%%metro title: nf-core/riboseq%%metro logo: nf-core-riboseq_logo_light.png | nf-core-riboseq_logo_dark.png%%metro logo_scale: 1.15%%metro center_ports: true%%metro style: nfcore%%metro diamond_style: symmetric%%metro directional: true%%metro file: fastq_in | FASTQ%%metro file: hybrid_gtf_out | GTF | Hybrid GTF%%metro file: orf_catalogue | BED | ORF catalogue%%metro file: bigwig_out | BW | Coverage%%metro file: counts_out | TSV | Gene counts%%metro file: psite_orf_out | TSV | ORF P-site counts%%metro file: psite_gene_out | TSV | Gene P-site counts%%metro file: te_out | TSV | TE results%%metro file: report_final | HTML | MultiQC%%metro line: riboseq | Ribo-seq | #e6007e%%metro line: rnaseq | Matched RNA-seq | #2db572%%metro line: tiseq | TI-seq | #2b6cb0%%metro line: annotation | Hybrid annotation | #f2b407
%%metro grid: preprocessing, alignment, novel_transcripts | 0,0%%metro grid: orf_calling, psite_id, te, reporting | 0,1%%metro x_spacing: 70%%metro legend: br | 10,130
graph LR subgraph preprocessing [Read pre-processing] fastq_in[ ] umi_extract[UMI-tools extract] fastp[fastp] trimgalore[Trim Galore!] bbsplit[BBSplit] sortmerna[SortMeRNA] ribodetector[RiboDetector] bowtie2_rrna[Bowtie2] fastqc[FastQC] infer_strand[Infer strandedness] equalise[Equalise\nread lengths]
fastq_in -->|riboseq,rnaseq,tiseq| umi_extract umi_extract -->|riboseq,rnaseq,tiseq| fastp umi_extract -->|riboseq,rnaseq,tiseq| trimgalore fastp -->|riboseq,rnaseq,tiseq| bbsplit trimgalore -->|riboseq,rnaseq,tiseq| bbsplit bbsplit -->|riboseq,rnaseq,tiseq| sortmerna bbsplit -->|riboseq,rnaseq,tiseq| ribodetector bbsplit -->|riboseq,rnaseq,tiseq| bowtie2_rrna sortmerna -->|riboseq,rnaseq,tiseq| fastqc ribodetector -->|riboseq,rnaseq,tiseq| fastqc bowtie2_rrna -->|riboseq,rnaseq,tiseq| fastqc fastqc -->|riboseq,rnaseq,tiseq| infer_strand infer_strand -->|riboseq,rnaseq,tiseq| equalise end
subgraph alignment [Alignment & quantification] star[STAR] umi_dedup[UMI-tools dedup] genomecov[BEDTools\ngenomecov] salmon_quant[Salmon] bigwig_out[ ] counts_out[ ]
star -->|riboseq,rnaseq,tiseq| umi_dedup umi_dedup -->|riboseq,rnaseq,tiseq| genomecov genomecov -->|riboseq,rnaseq,tiseq| bigwig_out umi_dedup -->|riboseq,rnaseq,tiseq| salmon_quant salmon_quant -->|riboseq,rnaseq,tiseq| counts_out end
subgraph novel_transcripts [Transcript discovery] stringtie[StringTie] gffcompare[gffcompare] hybrid_merge[Merge &\nfilter GTF] hybrid_gtf_out[ ]
stringtie -->|rnaseq| gffcompare gffcompare -->|rnaseq| hybrid_merge hybrid_merge -->|rnaseq| hybrid_gtf_out end
subgraph orf_calling [ORF discovery & calling] star_hybrid[STAR:\nhybrid 2nd pass] ribotish[Ribo-TISH] ribocode[RiboCode] ribotricer[Ribotricer] rpbp[Rp-Bp] price[PRICE] orf_merge[Merge ORF\ncatalogue] orf_catalogue[ ]
star_hybrid -->|riboseq| ribocode ribotish -->|riboseq| orf_merge ribocode -->|riboseq| orf_merge ribotricer -->|riboseq| orf_merge rpbp -->|riboseq| orf_merge price -->|riboseq| orf_merge orf_merge -->|riboseq| orf_catalogue end
subgraph psite_id [P-site identification] ribowaltz[riboWaltz] plastid_psite[plastid\nP-site] plastid_wiggle[plastid\nwiggle] quantify_orf_psite[Quantify ORF\nP-sites] psite_counts_gene[Gene in-frame\nP-sites] psite_orf_out[ ] psite_gene_out[ ]
ribowaltz -->|riboseq| plastid_psite plastid_psite -->|riboseq| plastid_wiggle plastid_wiggle -->|riboseq| quantify_orf_psite plastid_wiggle -->|riboseq| psite_counts_gene quantify_orf_psite -->|riboseq| psite_orf_out psite_counts_gene -->|riboseq| psite_gene_out end
subgraph te [Translational efficiency] te_prep_gene[Gene count\nmatrix] te_prep_orf[ORF count\nmatrix] anota2seq[anota2seq] deltate[DESeq2 deltaTE] dotseq[DOTSeq] _te_merge[ ] te_out[ ]
te_prep_gene -->|riboseq,rnaseq| anota2seq te_prep_gene -->|riboseq,rnaseq| deltate te_prep_orf -->|riboseq,rnaseq| anota2seq te_prep_orf -->|riboseq,rnaseq| deltate te_prep_orf -->|riboseq,rnaseq| dotseq anota2seq -->|riboseq,rnaseq| _te_merge deltate -->|riboseq,rnaseq| _te_merge dotseq -->|riboseq,rnaseq| _te_merge _te_merge -->|riboseq,rnaseq| te_out end
subgraph reporting [Reporting] multiqc_final[MultiQC] report_final[ ]
multiqc_final -->|riboseq,rnaseq| report_final end
%% Inter-section edges equalise -->|riboseq,rnaseq,tiseq| star equalise -->|riboseq| star_hybrid umi_dedup -->|rnaseq| stringtie umi_dedup -->|riboseq| ribotish umi_dedup -->|riboseq| ribotricer umi_dedup -->|riboseq| rpbp umi_dedup -->|riboseq| price umi_dedup -->|riboseq| ribowaltz orf_merge -->|riboseq| ribowaltz salmon_quant -->|rnaseq| te_prep_gene salmon_quant -->|rnaseq| te_prep_orf psite_counts_gene -->|riboseq| te_prep_gene quantify_orf_psite -->|riboseq| te_prep_orf _te_merge -->|riboseq,rnaseq| multiqc_final hybrid_merge -->|annotation| star_hybrid hybrid_merge -->|annotation| ribotish hybrid_merge -->|annotation| ribotricer hybrid_merge -->|annotation| ribocodeCLI command
nf-metro render examples/riboseq_metro.mmd -o riboseq_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: nf-core-differentialabundance_logo_light.png | nf-core-differentialabundance_logo_dark.png%%metro style: nfcore%%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: nf-core-differentialabundance_logo_light.png | nf-core-differentialabundance_logo_dark.png%%metro style: nfcore%%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: nfcore%%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.svg