Skip to content

[bug]: terminal output file node forks up into an occupied row instead of the free space below #1813

Description

@pinin4fjords

Problem

A terminal output node (%%metro file:) attached to a station on the section trunk is placed on the
row above the trunk, and its lead-in crosses whatever already occupies that row, including the
section's own outgoing trunk bundle. The space below the producer is free.

Two instances on the same map (nf-metro 1.1.0 @ 0e629e76, PYTHONHASHSEED=0), reported by
layout_validator.check_route_segment_crossings:

Lines 'rnaseq' (genomecov->bigwig_out) and 'riboseq' (umi_dedup->alignment__exit_right_1) cross at (1092,178)
Lines 'tiseq'  (genomecov->bigwig_out) and 'rnaseq'  (umi_dedup->alignment__exit_right_1) cross at (1094,182)
Lines 'tiseq'  (genomecov->bigwig_out) and 'riboseq' (umi_dedup->alignment__exit_right_1) cross at (1096,178)
Lines 'rnaseq' (stringtie->gffcompare) and 'riboseq' (salmon_quant->counts_out) cross at (1392,124)
  • The first three: the coverage bigWig output forks up from genomecov and crosses all three lines
    of the bundle leaving the section to the right. Below genomecov is empty.
  • The fourth: a gene-counts TSV forks up from salmon_quant and lands between stringtie and
    gffcompare, i.e. inside another chain's row, so its attachment marker sits on that chain's
    path. The entire lower half of that section is empty.

The second one is the clearer statement of the bug: the file node is not merely on a busy row, it is
planted in the middle of an unrelated station-to-station edge.

What does not fix it

  • %%metro off_track: counts_out — no change (identical crossing set). Per docs/guide.mdx:267
    off-track lifts output artefacts above the main track, which is the same direction the layout
    already chose, so it cannot express "put it below".
  • Reordering the station declarations within the section — no change.

The only workaround found was restructuring which section the producer lives in, which changes the
diagram's meaning rather than its layout.

Expected

A terminal output node should prefer a free lane. When the row above is occupied by another chain or
by the section's outgoing bundle and the row below is empty, fork down.

Repro

Minimal shape for the second instance: a section with two independent chains, where one chain's
station carries a %%metro file: output and the other chain occupies the row above.

%%metro title: File node forks into an occupied row
%%metro file: counts_out | TSV | Gene counts
%%metro file: gtf_out | GTF | Hybrid GTF
%%metro line: riboseq | Ribo-seq | #e6007e
%%metro line: rnaseq | Matched RNA-seq | #2db572

%%metro grid: src | 0,0
%%metro grid: sec | 0,1

graph LR
    subgraph src [Source]
        a1[A one]
        a2[A two]
        a1 -->|riboseq,rnaseq| a2
    end

    subgraph sec [Two chains]
        stringtie[StringTie]
        gffcompare[gffcompare]
        hybrid_merge[Merge &\nfilter GTF]
        salmon[Salmon]

        stringtie -->|rnaseq| gffcompare
        gffcompare -->|rnaseq| hybrid_merge
        hybrid_merge -->|rnaseq| gtf_out
        salmon -->|riboseq,rnaseq| counts_out
    end

    a2 -->|rnaseq| stringtie
    a2 -->|riboseq,rnaseq| salmon

The full map it was found on is riboseq_metro_map_review.mmd from this session (see #1812 for the
same map's ORF section).

Metadata

Metadata

Assignees

No one assigned

    Labels

    riboseqFound while authoring the nf-core/riboseq metro map

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions