Is it still recommended/necessary to run `.first()...
# help
j
Is it still recommended/necessary to run
.first()
after mixing module versions into
ch_versions
? Given
.unique
is run prior passing to MultiQC, is there any overhead benefit for taking just the
version.yaml
from the first module invocation vs passing all
versions.yml
and running unique
m
I don't think we ever needed
.first()
j
FFS
😂 1
j
Ahhh ff
m
we have 4 left in sarek
j
@Jim Downie you are right. I bow down
🥲 1
Wait
But rnaseq uses it a lot
taxprofiler uses it a lot
As does the subworkflows...
allthough methylseq does not...
OK I'll rmove it and see if people complain
Wait how does that even work hough
versions.yml
do not have any metta
Copy code
softwareVersionsToYAML(ch_versions)
        .collectFile(
            storeDir: "${params.outdir}/pipeline_info",
            name: 'nf_core_' + 'mag_software_' + 'mqc_' + 'versions.yml',
            sort: true,
            newLine: true,
        )
        .set { ch_collated_versions }
I guess this reads them all without caring they have the same file name
m
check the function
j
But why do we have
first()
in the first place?
m
Don't use it if possible, in particular if you want the versions collation thing to cache at any point.
➕ 1
j
I see Mahesh typing furiously
OK that works for me
m
historical reasons mainly I'd say
j
It's everywhere in subworkflows etc
So maybe a good linting rule?
m
We had it to reduce channel traffic, but it wasn't really needed
➕ 1
👍 1
It propagated because of it's use in nf-core/rnaseq
j
OK
!
I wipe them from mag then
Thank you all!
m
and it's not in sarek because I like contradicting people
🇫🇷 1
m
I can't find where I wrote about it on nf-core but here is my own note from my own pipeline on it: https://github.com/NBISweden/Earth-Biogenome-Project-pilot/issues/241#issue-3199323086
n
We'll be going to channel topics anyways (I hope soon)
m
We are