I am trying to create a metro map for <#C06R4FC4C1...
# metro-maps
i
I am trying to create a metro map for #C06R4FC4C1E using nf-metro (since it feels easier than maintaining the manual SVG) and I have run into an issue. I get a CurveInvariantError with a specific station and line layout. The layout is hard to describe, but I will attach an example in the thread. Uncommenting both connections at the very end at once is what breaks it. I believe this is a bug in the renderer rather than my own error, but I don't know the system well enough to tell
Copy code
%%metro title: nf-core/reportho
%%metro style: dark
%%metro line: main | Main flow | #24b064
%%metro line: report | Report flow | #0dcaf0
%%metro line: samplesheets | Samplesheet flow | #f59e0b
%%metro legend: bl

%%metro file: id_in | ID | Uniprot ID
%%metro file: fasta_in | FASTA | Protein sequence
%%metro file: query_reports | HTML | Per-query reports
%%metro file: msa_samplesheet | CSV | MSA samplesheet

graph LR
    subgraph input [Input]
        id_tax [Identify taxon]
    end

    subgraph fetch_seqs [Fetch sequences]
        source_merge [Merge sequences]
    end

    subgraph score_orthologs [Score orthologs]
        make_score_table [Make score table]
        make_plots [Make plots]
        filter_hits [Filter hits]

        make_score_table -->|main| filter_hits
        make_score_table -->|main| make_plots
    end

    subgraph create_samplesheets [Create samplesheets]
        create_msa [Create MSA samplesheet]
        msa_samplesheet [ ]

        create_msa -->|samplesheets| msa_samplesheet
    end

    subgraph report [Report]
        generate_reports [Generate reports]
        query_reports [ ]

        generate_reports -->|main| query_reports
    end

    %% inter-section connectors
    id_tax -->|main| source_merge
    source_merge -->|main| make_score_table
    make_plots -->|main| generate_reports

    %% either of the connections below works, but not both at once
    source_merge -->|samplesheets| create_msa
    %% filter_hits -->|samplesheets| create_msa
j
Let me take a look.
i
I don't know what you've done, but it's indeed fixed, even my original code works. Have you updated the renderer in some way?
j
Yep, it was a bug! It's a lot harder than you'd think to get this stuff working bug-free.
The 'report a bug' button on the playground there is the easiest way of getting issues to me in future, it even puts the mmd in the issue body for you.
i
I just tried, but my .mmd is a bit too big for GitHub to accept it. I ran into another issue, my report flow turned into fine Italian pasta when I added it (it renders, but the lines are completely messed up)
In this case I don't want to minimize the .mmd cause I think the complexity of the diagram contributes to the issue
j
It shouldn't be too big unless you added a logo, so just don't do that for reporting purposes
i
I did not add the logo, still fails (nota bene: my real .mmd has ~130 lines, the example I sent was a MWE for the bug)
j
OK, just post the mmd here for me
(or just attach to an issue)
i
I have opened an issue. I tried to deconvolve the 2 bugs, but without much success (it works much better when I remove some nodes from the graph)
j
Thanks! I'm got a lot of things ongoing, but will try to get a fix out in the next few days
FWIW I think you should probably just stick with your hand-drawn version right now though, nf-metro probably isn't going to be as pretty in the imminent future
i
I want to make the switch eventually, since bug-free nf-metro is much more sustainable than manual edits (especially if new changes force a layout update), but I might just patch up what I have for now
➕ 1