READY FOR REVIEW: Adapt output declarations #7244
Open
+282
−282
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.
When adapting nf-core code, I realized that some modules declare their output paths using single-quoted strings (e.g.
path('*.txt')
), while others use double-quoted strings (likepath("*.txt")
). When adapting the code, this leads to inconsistencies:Within single quoted outputs, process variables (such as
meta.id
) cannot be referenced using the usual mechanism${meta.id}
. This makes the code significantly harder to adapt, since using this reference mechanism in single-quoted strings leads to a (not very helpful) "Output file not found" error. I also have not found any helpful information on how to debug this problem, so it took quite some time to fix. Changing output declarations to double-quoted strings everywhere would not bring any disadvantages I'm aware of, but just enable better adaptability because the usual reference mechanism for nextflow process variables with `$' could be used in all output declarations.Especially the inconsistent use of both single- and double-quoted strings in the different modules makes no sense. I would therefore propose to change all output path declarations to double-quoted strings.
PR checklist
versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
nf-core subworkflows test <SUBWORKFLOW> --profile docker
nf-core subworkflows test <SUBWORKFLOW> --profile singularity
nf-core subworkflows test <SUBWORKFLOW> --profile conda