Got a thorny one I'd like input on. Might just be ...
# team-maintainers
j
Got a thorny one I'd like input on. Might just be "go away Jon, you're doing something weird", but I'm going to ask anyway. It's about versions. It's long, so for the lazy among you: TL; DR: Should nf-core modules emit meta-tagged versions, so pipelines running MultiQC more than once per workflow can build per-run versions YAMLs without a workflow-global barrier? To expand... Modules have always been engineered so they don't pass meta through to the versions channel (now topic). Any summary process consuming that channel has no way to link a version back to individual iterations of a process, so we have to aggregate without meta, which means we always block execution of any process (mostly but not exclusively MultiQC) reporting those versions. That was fine with one MultiQC report per run. In fact it was kind of the point. But a couple of us have started running MultiQC multiple times per run, and it means NONE of those MultiQC processes can run until ALL their inputs are ready. I've taken this to the nth degree with recent #CE8SSJV3N changes: one report per sample in a certain mode. That mode is designed to let rnaseq work at scale, churning out sample-wise results without agglomeration. But with versions in the mix, no single sample can finish and execute its final step until every sample can. My current workaround: don't feed the versions YAML into per-sample MultiQC at all in that mode, and trust that folks can track back from the workflow git SHA if they need provenance later. The 'proper' fix would be to emit metas from the versions topic in all modules:
Copy code
tuple val("${task.process}"), val('fastqc'), eval('fastqc --version | sed "/FastQC v/!d; s/.*v//"'), emit: versions_fastqc, topic: versions
to
Copy code
tuple val(meta), val("${task.process}"), val('fastqc'), eval('fastqc --version | sed "/FastQC v/!d; s/.*v//"'), emit: versions_fastqc, topic: versions
Most folks would instantly discard that info at the workflow level and uniqify by process, but those of us who need it could unblock our workflow completions and pass meta-specific versions to reporting. Topic handling at workflow level is easy enough now that this doesn't feel major, it just needs an update to all modules. Again. Thoughts?
👀 1
r
@Maxime Garcia @Franziska Bonath isn't #C06PHJM0Y3D running mqc multiple times? how do you handle this?
j
I would bet money they've got blocking behaviour, or they're not adding versions
m
so indeed #C06PHJM0Y3D is running multiqc multiple times, let me check what we're doing
j
you probably don't care if you're running it a handful of times
m
that being said, before even checking anything, I am in favor of adding the meta map so that the versions topic stays on par with the multiqc_files topic
But in our case, all our mlutiqc reports are actually finals, and cover all processes, it's more a question of dividing samples that share tags
this 1
n
This is fine by me, but keep in mind that this would need an update to the template first before we can implement this 🙂
party this 1
j
Mine cover all processes too.
Totally get I'm asking a LOT, just flagging the issue created by the existing system. Also wouldn't actually be very complicated to implement conceptually (even though it touches a lot of things)
m
just one question
Basically you can separate every samples, but still want a global multiqc?
so that's more or less the same setup as we have in #C06PHJM0Y3D
j
No, I want sample-wise multiqc
m
where we separate groups of sample and have a global multiqc
j
... or some other meta-wise MultiQC in future
m
yeah, that's exactly what we have in multiqc
it's based on the tags that are in the input samplesheet
so it could be sample based
yet I haven't encountered any blockage due to topics
j
Point me at it?
so we run MULTIQC_SAV for a global multiqc because of illumina interop possibilities
which is just disabled when we don't need it, and it's just plain multiqc
otherwise multiqc_per_tag is multiqc
versions are collected and fed to multiqc_extra_files https://github.com/nf-core/seqinspector/blob/dev/workflows/seqinspector.nf#L320
which then goes into ch_multiqc_extra_files_global and multiqc_extra_files_per_tag
(now that I see that, I realize I might not need the
_extra
affix.)
j
Yeah, I think you still have the blocking there, you're still using
collated_versions
in
multiqc_extra_files_per_tag
m
Oh, I see what you mean
yeah, I don't care much here than 1 sample/1group of samples finishes faster to produce a multiqc reports as they are final
so versions are shared for all reports no matter what happens
j
Like I say, I've taken it to the extreme, but I do think we've baked in something unnecessarily rigid, and the solution is relatively trivial...
m
I am on-board with adding the meta map to the topic tuple
👍 1
I did add it to the multiqc_files tuple
and it really simplified publishing reports, and I wish we add that on modules for more modules to be honest
thankyou 1
but that's another discussion
r
this might solve a different issue too, that I am not sure we have encountered yet but one could imagine a closure for the containers were some samples are run with one version and some with another...
➕ 1
j
That did occur to me also. It would be scientifically more correct to retain a process association, even if we mostly simplify by removing it in most cases.
m
one could imagine a closure for the containers were some samples are run with one version and some with another
That sounds like a dirty hack I would love to build
l
I would also be in favor, but that would mean to update all the modules ... again 🫠
j
I could probably get Claude to do it in batches of N
👍 1
m
I’ve seen the blocking behaviour but didn’t think it had to do with meta/filtering. My understanding is that
channel.topic
blocks until all the providers of this topic are exhausted. In my case, I run MultiQC near the end of the pipeline, not exactly at the end. I had to identify which modules run after MultiQC and make these modules output no versions topic.
a
at some point you want a log of the process details rather than a versions file? Like if you just dumped an audit log of what Nextflow did, it would contain all this information without having to consider a "versions" file a process output
I think I'm trying to say...is an "output file" the right way of viewing software versions
j
I think it's sensible that each process reports the version actually run, in a way tied to the actual task that was run, rather than to the generic process name.