From 982a2843deb5cc03711992745d8cc5112fb92146 Mon Sep 17 00:00:00 2001
From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com>
Date: Wed, 20 Nov 2024 18:25:08 +0000
Subject: [PATCH 1/2] Move parameters to above profiles for correct handling of
 params

---
 hello-nextflow/hello-modules/nextflow.config  | 39 +++++++++---------
 hello-nextflow/hello-nf-test/nextflow.config  | 40 +++++++++----------
 .../solutions/hello-config/5-nextflow.config  | 38 +++++++++---------
 3 files changed, 61 insertions(+), 56 deletions(-)

diff --git a/hello-nextflow/hello-modules/nextflow.config b/hello-nextflow/hello-modules/nextflow.config
index 46bc2d83..2efec7cb 100644
--- a/hello-nextflow/hello-modules/nextflow.config
+++ b/hello-nextflow/hello-modules/nextflow.config
@@ -1,5 +1,26 @@
 docker.fixOwnership = true
 
+/*
+ * Pipeline parameters
+ */
+
+params {
+    // Primary input (file of input files, one per line)
+    reads_bam        = null
+    
+    // Output directory
+    params.outdir = "results_genomics"
+
+    // Accessory files
+    reference        = null
+    reference_index  = null
+    reference_dict   = null
+    intervals        = null
+
+    // Base name for final output file
+    cohort_name      = "my_cohort"
+}
+
 profiles {
     docker_on {
         docker.enabled = true
@@ -47,21 +68,3 @@ process {
         cpus = 4
     }
 }
-
-/*
- * Pipeline parameters
- */
-
-params {
-    // Primary input (file of input files, one per line)
-    reads_bam        = null
-
-    // Accessory files
-    reference        = null
-    reference_index  = null
-    reference_dict   = null
-    intervals        = null
-
-    // Base name for final output file
-    cohort_name      = "my_cohort"
-}
diff --git a/hello-nextflow/hello-nf-test/nextflow.config b/hello-nextflow/hello-nf-test/nextflow.config
index 58a16e19..2efec7cb 100644
--- a/hello-nextflow/hello-nf-test/nextflow.config
+++ b/hello-nextflow/hello-nf-test/nextflow.config
@@ -1,7 +1,25 @@
 docker.fixOwnership = true
 
-// Default output directory
-params.outdir = 'results_genomics'
+/*
+ * Pipeline parameters
+ */
+
+params {
+    // Primary input (file of input files, one per line)
+    reads_bam        = null
+    
+    // Output directory
+    params.outdir = "results_genomics"
+
+    // Accessory files
+    reference        = null
+    reference_index  = null
+    reference_dict   = null
+    intervals        = null
+
+    // Base name for final output file
+    cohort_name      = "my_cohort"
+}
 
 profiles {
     docker_on {
@@ -50,21 +68,3 @@ process {
         cpus = 4
     }
 }
-
-/*
- * Pipeline parameters
- */
-
-params {
-    // Primary input (file of input files, one per line)
-    reads_bam        = null
-
-    // Accessory files
-    reference        = null
-    reference_index  = null
-    reference_dict   = null
-    intervals        = null
-
-    // Base name for final output file
-    cohort_name      = "my_cohort"
-}
diff --git a/hello-nextflow/solutions/hello-config/5-nextflow.config b/hello-nextflow/solutions/hello-config/5-nextflow.config
index 150bff59..a65fe7e6 100644
--- a/hello-nextflow/solutions/hello-config/5-nextflow.config
+++ b/hello-nextflow/solutions/hello-config/5-nextflow.config
@@ -1,5 +1,25 @@
 docker.fixOwnership = true
 
+
+/*
+ * Pipeline parameters
+ */
+
+params {
+    // Primary input (file of input files, one per line)
+    reads_bam        = null
+
+    // Accessory files
+    reference        = null
+    reference_index  = null
+    reference_dict   = null
+    intervals        = null
+
+    // Base name for final output file
+    cohort_name      = "my_cohort"
+}
+
+
 profiles {
     docker_on {
         docker.enabled = true
@@ -44,21 +64,3 @@ process {
         cpus = 4
     }
 }
-
-/*
- * Pipeline parameters
- */
-
-params {
-    // Primary input (file of input files, one per line)
-    reads_bam        = null
-
-    // Accessory files
-    reference        = null
-    reference_index  = null
-    reference_dict   = null
-    intervals        = null
-
-    // Base name for final output file
-    cohort_name      = "my_cohort"
-}

From b79be3262711c0d87205e5e2cdc2446babfedb49 Mon Sep 17 00:00:00 2001
From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com>
Date: Wed, 20 Nov 2024 18:30:19 +0000
Subject: [PATCH 2/2] Add params.outdir to solutions config

---
 hello-nextflow/solutions/hello-config/5-nextflow.config | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hello-nextflow/solutions/hello-config/5-nextflow.config b/hello-nextflow/solutions/hello-config/5-nextflow.config
index a65fe7e6..24d06833 100644
--- a/hello-nextflow/solutions/hello-config/5-nextflow.config
+++ b/hello-nextflow/solutions/hello-config/5-nextflow.config
@@ -9,6 +9,9 @@ params {
     // Primary input (file of input files, one per line)
     reads_bam        = null
 
+    // Output directory
+    params.outdir = "results_genomics"
+
     // Accessory files
     reference        = null
     reference_index  = null