Jim Downie
05/05/2026, 1:08 PM[merge, view, sort, markdup]) and it constructs a module script that streams a BAM or set of BAMs (dependent on starting tool) through all the subcommands, each of which pull in their respective argsX variable.
Could be a nice way to easily perform a bunch of streaming operations though some tools while minimally impacting disk space (which is a problem if you otherwise chain a bunch of modules!)
https://github.com/prototaxites/modules/blob/samtools-pipeline/modules/nf-core/samtools/pipeline/main.nfIgor Trujnara
05/05/2026, 1:18 PMMahesh Binzer-Panchal
05/05/2026, 1:35 PMJim Downie
05/05/2026, 1:36 PMJim Downie
05/05/2026, 1:37 PMIgor Trujnara
05/05/2026, 2:03 PMSimon Pearce
05/05/2026, 2:08 PMIgor Trujnara
05/05/2026, 2:10 PMJim Downie
05/05/2026, 2:20 PMmeta.yml
There are other tools where you might also reasonable expect similar modules could be constructed because they're built around the same principles - bedtools, pairtools come to mind. It's the latter I was thinking about when I built this - I just thought samtools would be a better start point for the proposition.Simon Pearce
05/05/2026, 2:26 PMYou might be in the ideological minority once againSure, but James is on holiday for 2 weeks, so if we just get on with it it'll be merged and he'll never know.
Igor Trujnara
05/05/2026, 2:28 PMIgor Trujnara
05/05/2026, 2:29 PMJim Downie
05/05/2026, 2:29 PMext.suffix if we can have thisSimon Pearce
05/05/2026, 2:29 PMSimon Pearce
05/05/2026, 2:30 PMext.suffix if we can have this
Too little, too lateSimon Pearce
05/05/2026, 2:30 PMSimon Pearce
05/05/2026, 2:30 PMIgor Trujnara
05/05/2026, 2:31 PMI thought that Mahesh was actually in favour of this in the first placeNot sure, @Mahesh Binzer-Panchal?
Jim Downie
05/05/2026, 2:36 PMsamtools command, we don't want complex multi-tool suites where you pipe samtools to bedtools to awk. And the tool suite should be designed for this kind of sequential piping in the first place.Jose Espinosa-Carrasco
05/05/2026, 2:41 PMJose Espinosa-Carrasco
05/05/2026, 2:43 PMJim Downie
05/05/2026, 2:47 PMIgor Trujnara
05/05/2026, 2:48 PMJim Downie
05/05/2026, 2:50 PMPhil Ewels
05/05/2026, 2:51 PMPhil Ewels
05/05/2026, 2:52 PMPhil Ewels
05/05/2026, 2:52 PMPhil Ewels
05/05/2026, 2:53 PMJim Downie
05/05/2026, 2:54 PMPhil Ewels
05/05/2026, 3:38 PMPhil Ewels
05/05/2026, 3:40 PMSAMTOOLS_PIPELINE(
Channel.of([ [id: 'sample1'], file('sample1.bam') ]),
['fixmate', 'sort', 'markdup']
)
Smart!Jim Downie
05/05/2026, 3:40 PMJim Downie
05/05/2026, 3:41 PMSAMTOOLS_PIPELINE(
channel.of([id: "sample1"], [file('sample1_1.bam'), file('sample1_2.bam')]),
["cat", "view", "sort", "markdup"]
)
If you used an input command that supports multiple filesSimon Pearce
05/05/2026, 3:46 PMMahesh Binzer-Panchal
05/06/2026, 6:54 AMJim Downie
05/06/2026, 7:04 AMMahesh Binzer-Panchal
05/06/2026, 7:07 AMSimon Pearce
05/06/2026, 7:36 AM