fix input and output filename collision in deacon ...
# request-review
p
fix input and output filename collision in deacon single read https://github.com/nf-core/modules/pull/11575
✅ 1
e
Left a comment; You can just override the ext.prefix on the pipeline's module.args instead.
p
Thanks, seen it now. I think the current behaviour is dangerous because deacon gives no feedback when single reads are passed. The user must be aware of the collision to modify the param.
e
Same happens with any (most?) nf-core modules that output the same format as the input. Maybe need an overall docs guide paragraph for such cases? @James Fellows Yates?
p
What about a warning if the names collide? Too invasive?
j
I think that's already documented in the specs, one sec
This then forces a pipeline developer to add a pipeline-relevant prefix in modules.conf, as @Evangelos Karatzas points out
p
what about this:
def prefix = task.ext.prefix ?: "${meta.id}_sorted"
as mentioned in the ref
j
We prefer to avoid that
(it's mostly for the samtools people...)
p
ok makes sense
j
As it could be the use of a given module doesn't match what the module default does, depending on the options of the tool set by the pipeline
p
so I guess the issue https://github.com/nf-core/modules/issues/11302 can be closed at this point.
j
So we prefer to give pipeline developers as much freedom as possible
👍 1
Mmm not necessarily
The module should not have got that far I guess
The check in the specs link I gave above should be added to the module
Copy code
```
script:
if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!"
```
👍 2
Ah stupid phone
p
If that's ok, I can modify the PR to just include that and keep the updated tests, with actual check that the filtered output is smaller than the input
❤️ 1
j
Perfect thank you!
p
No worries! Thanks for the info, I'm slowly getting into the conventions.
Ok, done :)