Conversation
LouisLeNezet
left a comment
There was a problem hiding this comment.
Just a small comment 😉
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
| { assert snapshot( | ||
| file(process.out.html[0][3]).name, | ||
| file(process.out.zip[0][3]).name, | ||
| process.out.html.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, |
There was a problem hiding this comment.
i prefer the shorter version tbh
There was a problem hiding this comment.
I would agree, but the snapshot is much more concise with this.
I am hoping to put this in nft-utils to make clearer assertion such as:
process.out.html.getAllFilenames()
There was a problem hiding this comment.
i don't see much difference in the snapshot. what do you mean exactly?
There was a problem hiding this comment.
We now only have the file, not the meta map, the process and the tool name (which is the structure we choose for the multiqc_files topic).
and much more simpler to use since I don't have to figure which index it's located at
subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf
Outdated
Show resolved
Hide resolved
| tuple val(meta) , path("*.html") , emit: html | ||
| tuple val(meta) , path("*.zip") , emit: zip | ||
| tuple val(meta), val("${task.process}"), val('fastqc'), path("*.html"), topic: multiqc_files, emit: html | ||
| tuple val(meta), val("${task.process}"), val('fastqc'), path("*.zip"), topic: multiqc_files, emit: zip |
There was a problem hiding this comment.
| tuple val(meta), val("${task.process}"), val('fastqc'), path("*.zip"), topic: multiqc_files, emit: zip | |
| tuple val(meta), path("*.zip"), topic: multiqc_files, emit: zip |
Why can't we just do this? Why do we need the extra pieces like the versions topic?
There was a problem hiding this comment.
So I need the val('fastqc') to know which tool this topic is coming from in order to publish it or not, and to choose where, and we agreed on slack when I was doing this for ensemblvep and snpeff that maybe having the task.process could be useful too.
There was a problem hiding this comment.
Yeah, I think maybe we need to separate:
- Sending things to multiqc
- Publishing
I think the basis for making publishing decisions from topics is wobbly right now
There was a problem hiding this comment.
I think it works well:
https://github.com/maxulysse/nf-core_rnavar/blob/topics_again_again/main.nf#L202-L216
for me, if I can put these reports into a topics for multiQC, then it's much more simpler if I use the same for publishing while I'm at it.
And we can filter out if we don't want to publish reports coming from tools/process...
There was a problem hiding this comment.
Yeah, I think I'll be controlling publishing separately, I don't think we should be conflating these things.
There was a problem hiding this comment.
But could I as a lazy bioinformatician just conflate all these things?
There was a problem hiding this comment.
@pinin4fjords what is wobbly at the moment with topics and publishing?Looking at the rnavar PR it does look very clean, so I am inclined to use it, but not if my files don't end up where they need to be
There was a problem hiding this comment.
Sneaking topic-based publishing in via the back door of the MultiQC topic is the wrong precedent to set, IMHO.
I actually think topics would be a great mechanism for publishing. The problem is that modules shouldn't know how their calling workflows will publish their outputs, so topic-based publishing really needs to be initiated from the workflow side. That's why I asked @bentsherman for a channel-to-topic operator (nextflow-io/nextflow#6756), though I'm not sure it's going to happen.
MultiQC is a bit of an exception here, because we do know how calling workflows will use those files - they'll go to MultiQC. But overloading that topic with publishing metadata unrelated to the MultiQC run itself isn't the right approach to my mind.
There was a problem hiding this comment.
Maybe when you move to typed processes it could become cleaner:
output:
record(meta: meta, html: files("*.html"), zip: files('*.zip'))
topic:
tuple(meta, task.process, 'fastqc', files("*.html")) >> 'multiqc_files'
tuple(meta, task.process, 'fastqc', files("*.zip")) >> 'multiqc_files'There was a problem hiding this comment.
Thanks @bentsherman I now know what I need to do
cf:
current implementation in nf-core/rnavar#285
PR checklist
Closes #XXX
topic: versions- See version_topicslabelnf-core modules test <MODULE> --profile dockernf-core modules test <MODULE> --profile singularitynf-core modules test <MODULE> --profile condanf-core subworkflows test <SUBWORKFLOW> --profile dockernf-core subworkflows test <SUBWORKFLOW> --profile singularitynf-core subworkflows test <SUBWORKFLOW> --profile conda