Change output directory and file names for bwa index#9947
Open
pmoris wants to merge 15 commits intonf-core:masterfrom
Open
Change output directory and file names for bwa index#9947pmoris wants to merge 15 commits intonf-core:masterfrom
pmoris wants to merge 15 commits intonf-core:masterfrom
Conversation
- Changes the output directory's name from `bwa` to `${prefix}`.
- Makes prefix default to `meta.id` instead of `fasta.baseName`.
- Changes output filenames to `${fasta.baseName} .{amb,ann,bwt,pac,sa}`
This improves the following situations:
1) When index files for multiple references are processed simultaneously in a
single process (e.g. fastq screen), there are no longer identically named `bwa`
directories being staged (-> could be avoided by using stageAs in the process input).
2) Makes it easier to publish the resulting output directories when processing
multiple reference genomes sequentially (otherwise the bwa dirs would overwrite
each other; this required adaptations in modules.config to avoid like:
`path: { "${params.outdir}/reference/${meta.id}" }`).
Co-authored-by: maxulysse <maxulysse@users.noreply.github.com>
maxulysse
reviewed
Feb 9, 2026
maxulysse
reviewed
Feb 9, 2026
maxulysse
reviewed
Feb 9, 2026
Use baseName of fasta file in case neither prefix nor meta.id are set. Co-authored-by: maxulysse <maxulysse@users.noreply.github.com>
Correctly specifies second element of output tuple as a path
By changing prefix into a non-def variable, it becomes accessible in the output section (see https://www.nextflow.io/docs/latest/reference/syntax.html#variable-declaration). Co-authored-by: maxulysse <maxulysse@users.noreply.github.com>
Improves nested ternary operator to create prefix by making fallback logic clearer and explicitly transforming meta.id into a string.
Contributor
Author
|
I think this PR is more or less ready to be merged now, but as mentioned in Slack, the linter keeps failing. However, it was (at least locally) also failing for me on the master commit I started from (eb19663), and also on the current most recent commit (b94c791). How should we proceed here? |
maxulysse
reviewed
Feb 12, 2026
17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bwato${prefix}.meta.idinstead offasta.baseName.fasta.baseName.${suffix} .{amb,ann,bwt,pac,sa}This improves the following situations:
bwadirectories being staged (-> could be avoided by using stageAs in the process input). 2) Makes it easier to publish the resulting output directories when processing multiple reference genomes sequentially (otherwise the bwa dirs would overwrite each other; this required adaptations in modules.config to avoid like:path: { "${params.outdir}/reference/${meta.id}" }).See discussion here: https://nfcore.slack.com/archives/CJRH30T6V/p1770372215776389
A previous fix was proposed, but never merged: #7793
Two final considerations to make:
PR checklist
Closes #XXX
topic: versions- See version_topicslabelnf-core modules test <MODULE> --profile dockernf-core modules test <MODULE> --profile singularitynf-core modules test <MODULE> --profile condanf-core subworkflows test <SUBWORKFLOW> --profile dockernf-core subworkflows test <SUBWORKFLOW> --profile singularitynf-core subworkflows test <SUBWORKFLOW> --profile conda