Skip to content

unnecessary offset-sized diagonal jog at alignment->novel_transcripts section boundary #1833

Description

@pinin4fjords

Problem

Rendering the nf-core/riboseq metro map produces a small, offset-sized diagonal
jog on the inter-section edge crossing from the alignment section into the
novel_transcripts section (both in grid row 0: preprocessing, alignment, novel_transcripts | 0,0). The edge in question is the rnaseq-line edge
umi_dedup -->|rnaseq| stringtie.

There is no structural reason for a diagonal here: either the novel_transcripts
stations (stringtie, gffcompare, hybrid_merge) could be placed at the
Y-offset needed for a straight horizontal run-in from umi_dedup, or the
alignment section's relevant stations could be raised to match, or the engine
could resolve the offset with a full, deliberate 45-degree run (per the
"formed curve via central machinery, full radius runway" convention) rather than
a small partial-offset kink. As reported, the diagonal is just large enough to
look like an unintentional residual offset, not a deliberate routing choice.

Repro

No committed .mmd source exists yet for this map in the repo. Save the
following as riboseq.mmd and render it:

%%metro title: nf-core/riboseq
%%metro center_ports: true
%%metro style: dark
%%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: 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

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]

        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]

        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]

        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]

        ribowaltz -->|riboseq| quantify_orf_psite
        plastid_psite -->|riboseq| plastid_wiggle
        plastid_wiggle -->|riboseq| quantify_orf_psite
        plastid_wiggle -->|riboseq| psite_counts_gene
    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_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_out
        deltate -->|riboseq,rnaseq| te_out
        dotseq -->|riboseq,rnaseq| te_out
    end

    subgraph reporting [Reporting]
        multiqc_final[MultiQC]

        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
    umi_dedup -->|riboseq| plastid_psite
    orf_merge -->|riboseq| quantify_orf_psite
    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
    anota2seq -->|riboseq,rnaseq| multiqc_final
    hybrid_merge -->|annotation| star_hybrid
    hybrid_merge -->|annotation| ribotish
    hybrid_merge -->|annotation| ribotricer
    hybrid_merge -->|annotation| ribocode
Loading
python -m nf_metro render riboseq.mmd -o /tmp/riboseq.svg --x-spacing 70 --no-chrome-css
python -c "import cairosvg; cairosvg.svg2png(url='/tmp/riboseq.svg', write_to='/tmp/riboseq.png', scale=2)"

Expected

The umi_dedup -->|rnaseq| stringtie edge either runs straight into stringtie
(entry/exit stations aligned at the same Y), or takes a deliberate full-radius
45-degree diagonal per the project's routing convention. It should not carry a
small residual offset-sized diagonal that reads as an alignment mistake.

Notes

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