Skip to content
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

Use store_object_as_json to store parameters #170

Closed
nwiltsie opened this issue Aug 12, 2024 · 0 comments · Fixed by #189
Closed

Use store_object_as_json to store parameters #170

nwiltsie opened this issue Aug 12, 2024 · 0 comments · Fixed by #189

Comments

@nwiltsie
Copy link
Member

All UCLA pipelines should use the store_object_as_json method from https://github.com/uclahs-cds/pipeline-Nextflow-config to save the final parameters to the nextflow-log/ directory.

Here is an example (from this PR) of using the method. The json_extractor.store_object_as_json() call must be the last step of methods.setup().

--- a/config/methods.config
+++ b/config/methods.config
@@ -4,6 +4,7 @@ includeConfig "${projectDir}/external/pipeline-Nextflow-config/config/bam/bam_pa
 includeConfig "${projectDir}/external/pipeline-Nextflow-config/config/methods/common_methods.config"
 includeConfig "${projectDir}/external/pipeline-Nextflow-config/config/schema/schema.config"
 includeConfig "${projectDir}/external/pipeline-Nextflow-config/config/retry/retry.config"
+includeConfig "${projectDir}/external/pipeline-Nextflow-config/config/store_object_as_json/store_object_as_json.config"

 methods {

@@ -129,5 +130,10 @@ methods {
         methods.setup_docker_cpus()
         methods.verify_input_deletion()
         methods.set_recal_tables()
+
+        json_extractor.store_object_as_json(
+            params,
+            new File("${params.log_output_dir}/nextflow-log/params.json")
+        )
     }
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant