Update functions.nf to be more flexible for publishing by meta keys #423
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.
Copied from Slack:
Started playing with changing the
publish_by_id
functionality we discussed a couple of weeks back. Soon realised I would have to sit down and test this all properly in a real-pipeline context. I now have something together relative to the #rnaseq pipeline hereI have renamed
publish_by_id
->publish_by_meta
and it now can either accept:true
value inmodules.config
which is the same as the old behaviour i.e.${publish_dir}/${meta.id}/
meta
that will be concatenated together to get the final directory pathe.g. as defined in modules.config :
If an entry in
publish_by_meta
isn't present in themeta
map then it will still be appended on to give developers even more control to customise the paths if they so wish e.g.mytestfolder
in the above example.If an entry in
publish_by_meta
has a boolean value in the meta map then the id is appended to the boolean value e.g.single_end_false
in the above example.