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 #77

Open
nwiltsie opened this issue Aug 12, 2024 · 0 comments
Open

Use store_object_as_json to store parameters #77

nwiltsie opened this issue Aug 12, 2024 · 0 comments
Labels
standardization Standardization task

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")
+        )
     }
 }
@nwiltsie nwiltsie added the standardization Standardization task label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
standardization Standardization task
Projects
None yet
Development

No branches or pull requests

1 participant