Skip to content

Instantly share code, notes, and snippets.

@danielecook
Created March 3, 2020 16:40
Show Gist options
  • Save danielecook/f21bbd62ef4aff9718fe76214620b904 to your computer and use it in GitHub Desktop.
Save danielecook/f21bbd62ef4aff9718fe76214620b904 to your computer and use it in GitHub Desktop.
Dump #nextflow params to json
import groovy.json.JsonOutput
json_param_file = "${workflow.projectDir}/pipeline_info/params.json"
new File(json_param_file).withWriter('utf-8') {
writer ->
def json_params = JsonOutput.prettyPrint(JsonOutput.toJson(params));
writer.write(json_params);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment