-
Notifications
You must be signed in to change notification settings - Fork 203
Dump pipeline parameters into a json file #2425
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
Conversation
Should we also add a |
what's the difference to |
Codecov Report
@@ Coverage Diff @@
## dev #2425 +/- ##
=======================================
Coverage 71.07% 71.07%
=======================================
Files 87 87
Lines 9431 9431
=======================================
Hits 6703 6703
Misses 2728 2728
|
Here the idea is to keep all the parameters as they have been used for a given execution in a |
def jsonStr = "" | ||
jsonStr = JsonOutput.toJson(params) |
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.
def jsonStr = "" | |
jsonStr = JsonOutput.toJson(params) | |
def jsonStr = JsonOutput.toJson(params) |
output_d.mkdirs() | ||
} | ||
|
||
def output_pf = new File(output_d, "params.json") |
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 suspect that this will crash if the file already exists (eg. When resuming a pipeline). We should probably try to avoid this by checking if the file already exists, and/or incorporating a timestamp into the filename.
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 tested it and it did not crashed but yes, probably better to be in the safe lane, now is updated
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 should update the documentation of the pipeline too, here.
I think I have addressed your comments @mirpedrol and @ewels. Do you think we have to create a parameter to control for it? |
Looks OK to me to always generate this file, I wouldn't add a parameter. |
👀 👀 👀 so I know when to try adding to MultiQC ;) |
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.
Thanks!
@jfy133 its after MultiQC runs, so won't be possible as it stands. It's also all parameters, so very verbose. |
Sure, but presumably one could run the function before on complete, right? For the verboseness I was expecting that, as a second step I was actually wondering if it would be possible to make a collapsible section in the MultiQC report 😬 |
1 similar comment
Sure, but presumably one could run the function before on complete, right? For the verboseness I was expecting that, as a second step I was actually wondering if it would be possible to make a collapsible section in the MultiQC report 😬 |
@jfy133 yes I also thought about it, probably for the MultiQC report it will be an option to do something similar to what |
public static void dump_parameters(workflow, params) { maybe a dumb question but why is |
also I am wondering if this would still work if the |
Add to the template the snippet proposed on this comment to dump the pipeline parameters into a json file that can be use to re-run the pipeline with the same parameters using the
-params-file
Nextflow option.Closes #747
PR checklist
CHANGELOG.md
is updated