Arthur
06/06/2025, 1:51 AMsamtools/merge and samtools/cat modules define their prefix differently between the script and `stub`:
prefix = task.ext.prefix ?: "${meta.id}"
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
This creates issues when you define ext.prefix in config and want to use a stub run. It also seems to me that taxk.ext.suffix isn’t used at all in the script so I am not sure why it is in the stub?
These aren’t the only modules which have different definitions for prefix between script/stub, some rough grep-ing and filtering suggests there are ~30 modules which have discrepancies. I can’t confirm which of those have a good reason for it but I’m wondering if people have any objection to aligning the samtools ones at least for now?Simon Pearce
06/06/2025, 7:49 AM${meta.id}, use something like prefix = task.ext.prefix ?: "${meta.id}_merged"Arthur
06/06/2025, 7:50 AMSimon Pearce
06/06/2025, 7:52 AMArthur
06/06/2025, 7:52 AMif ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"Arthur
06/06/2025, 7:53 AM${meta.id}.sorted but AFAICT no modules set a default that isn’t just meta.idSimon Pearce
06/06/2025, 8:03 AMArthur
06/06/2025, 8:09 AMFYI, we had a lot of discussion in the maintainers team about it, with some people being quite strongly against this.I think that was what I found when I asked about
samtools/sort wayyyy back when. I don’t actually mind at this point which way around the guidance is, as long as the application in consistent. I think with the huge number of modules we now have it’s important to keep consistency and not have the project break apart into clusters of modules run one way or the other depending on who is maintaining them.Simon Pearce
06/06/2025, 8:19 AMSimon Pearce
06/06/2025, 8:20 AMSimon Pearce
06/06/2025, 8:20 AMSimon Pearce
06/06/2025, 8:21 AMArthur
06/06/2025, 8:41 AM