Jonathan Rondeau-Leclaire
08/13/2026, 1:38 PM.command.{err,out,log,trace,run,sh,begin} , which doesn't break the cache), about 200k files. Resuming, I quickly hit 1M again, with the four Dastools steps generating a lot of files, in my caes for 240 samples * 2 assemblers * 5 binners=2400 dastools jobs.
I realise that I could use fewer binners (haven't even used them all!) or just one assembler, but even doing that, a larger project might hit these quotas with more reasonable tool choices (or even space quotas; my scratch stands at 5.6Tb before dastools; mostly bowtie's .bam files fault, but still).
Example (work dirs picked at random):
RENAME_PREDASTOOL
$ ls work/1e/cf7148e4544a679a1244a47113e4d1/ | head
SPAdes-CONCOCTRefined-761_Jinc.0.fa
SPAdes-CONCOCTRefined-761_Jinc.1.fa
SPAdes-CONCOCTRefined-761_Jinc.10.fa
SPAdes-CONCOCTRefined-761_Jinc.11.fa
SPAdes-CONCOCTRefined-761_Jinc.12.fa
SPAdes-CONCOCTRefined-761_Jinc.13.fa
SPAdes-CONCOCTRefined-761_Jinc.14.fa
SPAdes-CONCOCTRefined-761_Jinc.15.fa
SPAdes-CONCOCTRefined-761_Jinc.16.fa
SPAdes-CONCOCTRefined-761_Jinc.17.fa
$ ls work/1e/cf7148e4544a679a1244a47113e4d1/ | wc
88 88 3222
DASTOOL_DASTOOL
ls work/03/524ee2d50fb5d91f18f607081c8d16/
SPAdes-DASTool-754_J90.seqlength SPAdes-DASTool-754_J90_DASTool_summary.tsv SPAdes-DASTool-754_J90_proteins.faa.archaea.scg versions.yml
SPAdes-DASTool-754_J90_DASTool.log SPAdes-DASTool-754_J90_allBins.eval SPAdes-DASTool-754_J90_proteins.faa.bacteria.scg
SPAdes-DASTool-754_J90_DASTool_bins SPAdes-DASTool-754_J90_proteins.faa SPAdes-DASTool-754_J90_proteins.faa.findSCG.b6
SPAdes-DASTool-754_J90_DASTool_contig2bin.tsv SPAdes-DASTool-754_J90_proteins.faa.all.b6 SPAdes-DASTool-754_J90_proteins.faa.scg.candidates.faa
ls work/03/524ee2d50fb5d91f18f607081c8d16/SPAdes-DASTool-754_J90_DASTool_bins/
SPAdes-COMEBinRefined-754_J90.1077_sub.fa SPAdes-COMEBinRefined-754_J90.6346.fa SPAdes-MaxBin2Refined-754_J90.005_sub.fa
SPAdes-COMEBinRefined-754_J90.14186.fa SPAdes-CONCOCTRefined-754_J90.11_sub.fa SPAdes-MetaBAT2Refined-754_J90.11.fa
SPAdes-COMEBinRefined-754_J90.2994.fa SPAdes-CONCOCTRefined-754_J90.22_sub.fa SPAdes-MetaBAT2Refined-754_J90.1_sub.fa
SPAdes-COMEBinRefined-754_J90.3814.fa SPAdes-CONCOCTRefined-754_J90.46_sub.fa SPAdes-MetaBinnerRefined-754_J90.1.fa
SPAdes-COMEBinRefined-754_J90.40.fa SPAdes-MaxBin2Refined-754_J90.003_sub.fa unbinned.fa
RENAME_DASTOOLS
$ ls work/f8/9271613dfbf74be1f5a3c7d1aec5f0/
SPAdes-COMEBinRefined-754_J14.0.fa.gz SPAdes-COMEBinRefined-754_J14.5171.fa.gz SPAdes-COMEBinRefined-754_J14.973.fa.gz
SPAdes-COMEBinRefined-754_J14.10914.fa.gz SPAdes-COMEBinRefined-754_J14.5511.fa.gz SPAdes-CONCOCTRefined-754_J14.21_sub.fa.gz
SPAdes-COMEBinRefined-754_J14.13267.fa.gz SPAdes-COMEBinRefined-754_J14.7396.fa.gz SPAdes-CONCOCTRefined-754_J14.70_sub.fa.gz
SPAdes-COMEBinRefined-754_J14.17146.fa.gz SPAdes-COMEBinRefined-754_J14.8199.fa.gz SPAdes-DASToolUnbinned-754_J14.fa.gz
SPAdes-COMEBinRefined-754_J14.2769_sub.fa.gz SPAdes-COMEBinRefined-754_J14.9517.fa.gz versions.yml
So for a single sample x assembler x binner combination, we have about 170 files produced by Dastools (if we include 4 processes producing 7 .command* files each + versions.yml and .exitcode) where the target output is only 15 fasta files. I've looked at the average over multiple samples and estimate 350,000 files generated by the DASTOOLS processes alone for my 240 samples project.
My thinking is that the _"_easy_"_ thing to do (emphasizing the quotes) would be to wrap certain processes (e.g. the four Dastools processes) in a single subworkflow where these four steps are part of a single job; I would argue that having access to the renamed versions of bins we already have elsewhere is a waste of space, so that seems reasonable. In the example above, that would shrink the number of files generated by DASTOOLS in work/ from ~350,000 to ~60,000 assuming that sample is representative; the work dir would only contain what the RENAME_DASTOOLS dir has.
Metabinner could benefit from a similar treatment too, but it's really not as impactful as dastools.
Other quota gobblers that don't need wrapping, but could have their work/ output cleaned up:
⢠QUAST_BINS, which generates on average 243 files per bin in work/. I'm estimating from my completed jobs (cause pipeline can't complete) that I'll get about 500 bins, which means about 120k files just for QUAST_BINS.
⢠and QUAST, generating on average 22 files per assembly (not as bad). Is there a use for all of this, since nearly none of it is being published to results?
Thoughts? holes? questions?
Imposter syndrome Ć my very short experience with nextflow = I might be missing something obvious that justifies this file overload, but here's hoping I'M on to something...Diego Alvarez Saravia
08/13/2026, 2:19 PMDiego Alvarez Saravia
08/13/2026, 2:22 PMJonathan Rondeau-Leclaire
08/13/2026, 2:26 PMJonathan Rondeau-Leclaire
08/13/2026, 2:27 PMDiego Alvarez Saravia
08/13/2026, 2:28 PMDiego Alvarez Saravia
08/13/2026, 2:29 PMIf the pipeline can even be used in a way where it can stop after each module (e.g. do assembly only, generate an input csv for the next step, done) that would be awesome.This is a good idea to reduce the friction between stages!
Diego Alvarez Saravia
08/13/2026, 2:31 PMJim Downie
08/13/2026, 2:39 PM--busco_clean to mag which deletes a bunch of the "working" files that aren't removed.
For example here, QUAST as a software is completely overkill for what the pipeline uses it for - we would be better off replacing it with a tool that writes a single file containing summary statistics - bonus points if it can run on multiple input files!
In any case, having a bin entry point is something I think would be very valuable; although alternatively I would suggest that MAG should produce bins and stop, and the analysis should be done by another pipeline šJim Downie
08/13/2026, 2:42 PMJim Downie
08/13/2026, 2:44 PMnf-boost plugin to automatically cleanup work directories as a pipeline runs. But afaik it may break resume...
github.com/bentsherman/nf-boost#configurationDaniel Straub
08/13/2026, 2:44 PM--*_clean params might help to a certain degree. Changing software might be also an option, but popular software is not always efficient (but is siught after also in pipelines).Diego Alvarez Saravia
08/13/2026, 2:45 PM--ultra-clean flag that deletes everything but strictly required files š
James Fellows Yates
08/13/2026, 2:46 PMJames Fellows Yates
08/13/2026, 2:46 PMJames Fellows Yates
08/13/2026, 2:47 PMDiego Alvarez Saravia
08/13/2026, 2:47 PMFor example here, QUAST as a software is completely overkill for what the pipeline uses it for - we would be better off replacing it with a tool that writes a single file containing summary statistics - bonus points if it can run on multiple input files!Yeah, personally I also think that QUAST is overkill for what we use it. We can look for an alternative (or make one)
James Fellows Yates
08/13/2026, 2:47 PMJames Fellows Yates
08/13/2026, 2:48 PMJim Downie
08/13/2026, 2:48 PMPoor design decisions of the tools that field use can't really be our responsibilityThis is true, but as we write the modules /and/ choose the tools, we have a lot of control over both what tool is run and what is retained on disk. And we should be more mindful of doing that, though I would stop far short of /requiring/ that e.g. non-published files are cleaned up.
Jim Downie
08/13/2026, 2:49 PMYeah, personally I also think that QUAST is overkill for what we use it. We can look for an alternative (or make one)
seqkit stats šDiego Alvarez Saravia
08/13/2026, 2:53 PMseqkit stats š
Not enough Rust on that one, where is the fun?
On a serious note, I personally like seqfu more, but yeah, we can definitively evaluate this change to make things lighter on that pointJim Downie
08/13/2026, 2:53 PMJonathan Rondeau-Leclaire
08/13/2026, 7:35 PMJonathan Rondeau-Leclaire
08/13/2026, 7:37 PMDiego Alvarez Saravia
08/13/2026, 7:43 PMJonathan Rondeau-Leclaire
09/02/2026, 11:31 AMJames Fellows Yates
09/02/2026, 11:42 AMDiego Alvarez Saravia
09/02/2026, 7:28 PM