Mira Sarkis
03/20/2026, 10:43 AMMahesh Binzer-Panchal
03/20/2026, 11:30 AMsamtools view module could be abused to give you want you need. ext.args2 could be supplied with a pipe command and you write out the read IDs to a file captured by an optional channel.Mira Sarkis
03/20/2026, 11:35 AMSimon Pearce
03/20/2026, 2:17 PMMira Sarkis
03/20/2026, 2:20 PMSimon Pearce
03/20/2026, 2:22 PMtuple val(meta), path("${prefix}.bam"), emit: bam, optional: true
tuple val(meta), path("${prefix}.cram"), emit: cram, optional: true
tuple val(meta), path("${prefix}.sam"), emit: sam, optional: true
tuple val(meta), path("${prefix}.${file_type}.bai"), emit: bai, optional: true
tuple val(meta), path("${prefix}.${file_type}.csi"), emit: csi, optional: true
tuple val(meta), path("${prefix}.${file_type}.crai"), emit: crai, optional: true
tuple val(meta), path("${prefix}.unselected.${file_type}"), emit: unselected, optional: true
tuple val(meta), path("${prefix}.unselected.${file_type}.{csi,crai}"), emit: unselected_index, optional: true
so yes, you could write some code that writes e.g. a foo.crai file that contains the read names (but is NOT an index), but that would be weird and unintuitiveMahesh Binzer-Panchal
03/21/2026, 8:11 PMnf-core modules patch <tool/subtool> to maintain a diff so the module is updatable, but keeps the changes you make.
E,g. you can do
nf-core modules install samtools/view
vim modules/nf-core/samtools/view/main.nf # edit the file to include post processing and new output channel
nf-core modules patch samtools/view
git add modules/nf-core/samtools/view/
git commit ...Simon Pearce
03/21/2026, 8:57 PM