modules
modules copied to clipboard
Restructuring how symlinks work to avoid conflicts with file permissions
PR checklist
Closes #9230
- [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
- [ ] 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:
The solution follows this logic:
- Check if the .fasta file exists in the same directory as the index files with the correct pattern. a. We can use the same code as in the baseline bwa-meth nf-core module here (https://github.com/nf-core/modules/blob/master/modules/nf-core/bwa/mem/main.nf#L39) to determine what file pattern is expected.
- If it does not exist: a. Create a fake (empty) file for BAM writing. b. Use symlink for CRAM writing.
- After alignment is done, cleanup the fake empty file or the symlink. That way we do not scatter around files. a. The cleanup occurs every time? For example in case the alignment fails with an error we would still cleanup after ourselves.