From 09cb56b3615cdec244743d931824f4da1d46639d Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Fri, 21 Feb 2020 11:32:50 -0600
Subject: [PATCH] Fix nextflow config layering problem

---
 workflow/conf/aws.config            |  4 ++++
 workflow/conf/aws_ondemand.config   |  9 ---------
 workflow/conf/aws_spot.config       |  9 ---------
 workflow/conf/aws_user.config       |  9 ---------
 workflow/conf/biohpc.config         | 24 ------------------------
 workflow/conf/biohpc_cluster.config |  7 +++++++
 workflow/conf/biohpc_local.config   | 22 ++++++++++++++++++++++
 workflow/nextflow.config            |  9 ---------
 8 files changed, 33 insertions(+), 60 deletions(-)
 delete mode 100755 workflow/conf/aws_ondemand.config
 delete mode 100755 workflow/conf/aws_spot.config
 delete mode 100644 workflow/conf/aws_user.config

diff --git a/workflow/conf/aws.config b/workflow/conf/aws.config
index 7794329..6875c65 100644
--- a/workflow/conf/aws.config
+++ b/workflow/conf/aws.config
@@ -1,11 +1,15 @@
+workDir = 's3://'
 aws.client.storageEncryption = 'AES256'
 aws {
+  region = ''
   batch {
     cliPath = '/home/ec2-user/miniconda/bin/aws'
   }
 }
 
 process {
+  executor = 'awsbatch'
+  queue = 'default-'
   cpus = 1
   memory = '10 GB'
 }
\ No newline at end of file
diff --git a/workflow/conf/aws_ondemand.config b/workflow/conf/aws_ondemand.config
deleted file mode 100755
index d12c2de..0000000
--- a/workflow/conf/aws_ondemand.config
+++ /dev/null
@@ -1,9 +0,0 @@
-workDir = 's3://
-aws {
-  region = 'us-east-2'
-}
-
-process {
-  executor = 'awsbatch'
-  queue = 'highpriority-'
-}
\ No newline at end of file
diff --git a/workflow/conf/aws_spot.config b/workflow/conf/aws_spot.config
deleted file mode 100755
index 0a81a79..0000000
--- a/workflow/conf/aws_spot.config
+++ /dev/null
@@ -1,9 +0,0 @@
-workDir = 's3://'
-aws {
-  region = 'us-east-2'
-}
-
-process {
-  executor = 'awsbatch'
-  queue = 'default-'
-}
\ No newline at end of file
diff --git a/workflow/conf/aws_user.config b/workflow/conf/aws_user.config
deleted file mode 100644
index 68dd2f5..0000000
--- a/workflow/conf/aws_user.config
+++ /dev/null
@@ -1,9 +0,0 @@
-workDir = 's3://'
-aws {
-  region = ''
-}
-
-process {
-  executor = 'awsbatch'
-  queue = ''
-}
\ No newline at end of file
diff --git a/workflow/conf/biohpc.config b/workflow/conf/biohpc.config
index eb1fc5c..bdcc3c4 100755
--- a/workflow/conf/biohpc.config
+++ b/workflow/conf/biohpc.config
@@ -1,27 +1,3 @@
-process {
-  withLabel: checkDesignFile {
-    module = ['python/3.6.1-2-anaconda']
-  }
-  withLabel: count211 {
-    module = ['cellranger/2.1.1']
-  }
-  withLabel: count301 {
-    module = ['cellranger/3.0.1']
-  }
-  withLabel: count302 {
-    module = ['cellranger/3.0.2']
-  }
-  withLabel: count310 {
-    module = ['cellranger/3.1.0']
-  }
-  withLabel: versions {
-    module = ['python/3.6.1-2-anaconda','pandoc/2.7','multiqc/1.7']
-  }
-  withLabel: multiqc {
-    module = ['multiqc/1.7']
-  }
-}
-
 params {
   // Reference file paths on BioHPC
   genomes {
diff --git a/workflow/conf/biohpc_cluster.config b/workflow/conf/biohpc_cluster.config
index 789d1e9..bebd64a 100644
--- a/workflow/conf/biohpc_cluster.config
+++ b/workflow/conf/biohpc_cluster.config
@@ -4,24 +4,31 @@ process {
   clusterOptions = '--hold'
 
   withLabel: checkDesignFile {
+    module = ['python/3.6.1-2-anaconda']
     executor = 'local'
   }
   withLabel: count211 {
+    module = ['cellranger/2.1.1']
     queue = '128GB,256GB,256GBv1,384GB'
   }
   withLabel: count301 {
+    module = ['cellranger/3.0.1']
     queue = '128GB,256GB,256GBv1,384GB'
   }
   withLabel: count302 {
+    module = ['cellranger/3.0.2']
     queue = '128GB,256GB,256GBv1,384GB'
   }
   withLabel: count310 {
+    module = ['cellranger/3.1.0']
     queue = '128GB,256GB,256GBv1,384GB'
   }
   withLabel: versions {
+    module = ['python/3.6.1-2-anaconda','pandoc/2.7','multiqc/1.7']
     executor = 'local'
   }
   withLabel: multiqc {
+    module = ['multiqc/1.7']
     executor = 'local'
   }
 }
\ No newline at end of file
diff --git a/workflow/conf/biohpc_local.config b/workflow/conf/biohpc_local.config
index 9ca703b..0eb72d4 100755
--- a/workflow/conf/biohpc_local.config
+++ b/workflow/conf/biohpc_local.config
@@ -1,3 +1,25 @@
 process {
   executor = 'local'
+
+  withLabel: checkDesignFile {
+    module = ['python/3.6.1-2-anaconda']
+  }
+  withLabel: count211 {
+    module = ['cellranger/2.1.1']
+  }
+  withLabel: count301 {
+    module = ['cellranger/3.0.1']
+  }
+  withLabel: count302 {
+    module = ['cellranger/3.0.2']
+  }
+  withLabel: count310 {
+    module = ['cellranger/3.1.0']
+  }
+  withLabel: versions {
+    module = ['python/3.6.1-2-anaconda','pandoc/2.7','multiqc/1.7']
+  }
+  withLabel: multiqc {
+    module = ['multiqc/1.7']
+  }
 }
\ No newline at end of file
diff --git a/workflow/nextflow.config b/workflow/nextflow.config
index f1a8650..9496393 100644
--- a/workflow/nextflow.config
+++ b/workflow/nextflow.config
@@ -11,15 +11,6 @@ profiles {
   aws {
     includeConfig 'conf/aws.config'
   }
-  ondemand {
-    includeConfig 'conf/aws_ondemand.config'
-  }
-  spot {
-    includeConfig 'conf/aws_spot.config'
-  }
-  awsUserDefined {
-    includeConfig 'conf/aws_user.config'
-  }
 }
 
 trace {
-- 
GitLab