MarkDuplicates Input specificity and input refactor.
When using MarkDuplicates on an HPC with scratch enabled, the globbed *.bam copys both the input and output bam from scratch to the work directory. The output needed to be more specific. It is now ${prefix}.bam for the output so it now targets the output bam/cram instead of all files with the right file extension. For more details see the issue.
This should fix the issue for MarkDuplicates but be on the lookout for other modules where this occurs.
The second part of this may be more controversial but I found the bam/cram declaration to be a bit difficult to read. Prefix did not actually mean prefix here, it meant ${prefix}.bam. Because of this it required some logic later on to change this to cram. I cleared this up and hopefully made it easier to read.
PR checklist
Addresses #https://github.com/nf-core/modules/issues/7792, but more modules could have issues.
- [x] This comment contains a description of changes (with reason).
- [x] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If you've added a new tool - have you followed the module conventions in the contribution docs
- [x] If necessary, include test data in your PR.
- [x] Remove all TODO statements.
- [x] Emit the
versions.ymlfile. - [x] Follow the naming conventions.
- [x] Follow the parameters requirements.
- [x] Follow the input/output options guidelines.
- [x] Add a resource
label - [ ] Use BioConda and BioContainers if possible to fulfil software requirements.
- Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
- For modules:
- [ ]
nf-core modules test <MODULE> --profile docker - [ ]
nf-core modules test <MODULE> --profile singularity - [ ]
nf-core modules test <MODULE> --profile conda
- [ ]
- For subworkflows:
- [ ]
nf-core subworkflows test <SUBWORKFLOW> --profile docker - [ ]
nf-core subworkflows test <SUBWORKFLOW> --profile singularity - [ ]
nf-core subworkflows test <SUBWORKFLOW> --profile conda
- [ ]
- For modules:
@johnoooh Is this still on your list or was it resolved with the other PR?
This PR has been tagged as awaiting-changes or awaiting-feedback by an @nf-core/modules contributor. Remove stale label or add a comment if it is still useful.