-
Notifications
You must be signed in to change notification settings - Fork 81
Proposal: New standard library functions #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Signed-off-by: Ben Sherman <[email protected]>
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
def temp_pf = file(".params_${timestamp}.json") | ||
temp_pf.text = toJson(params, true) | ||
|
||
nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") | ||
temp_pf.copyTo("${outdir}/pipeline_info/params_${timestamp}.json") | ||
temp_pf.delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to make the file and then copy it? Couldn't we just make it in the outdir?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We certainly could! 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just rewriting this in nf-utils, and Idk why that's in the template either 🤔 @mirpedrol or @mashehu any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from nf-core/modules, I found the which that added the change, but I don't know the reason nf-core/modules@4c0a9b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @maxulysse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't remember.
Pretty sure just me being stupid.
Sorry about that
Signed-off-by: Ben Sherman <[email protected]>
|
This PR demonstrates some helper functions that I am thinking about adding to Nextflow, to reduce some of the boilerplate code that I see in nf-core pipelines.
For now I have added these functions to nf-boost so that they are easy to play with. If people like them, I'll try to add them to Nextflow.
These functions are meant to minimize the use of custom classes like
Yaml
andJsonOutput
, providing a simpler functional interface.Helper functions are documented in the nf-boost README.