uclahs-cds / pipeline-call-gSV

Nextflow pipeline to call germline structural variants and copy number variants using DELLY and Manta
https://uclahs-cds.github.io/pipeline-call-gSV/
GNU General Public License v2.0
2 stars 1 forks source link

Use `store_object_as_json` to store parameters #169

Open nwiltsie opened 2 months ago

nwiltsie commented 2 months ago

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")
+        )
     }
 }