Skip to content

Commit

Permalink
define conda dependencies at process level
Browse files Browse the repository at this point in the history
  • Loading branch information
priesgo committed Nov 8, 2021
1 parent ff0cf30 commit c3f5308
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 26 deletions.
13 changes: 0 additions & 13 deletions Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions environment.yml

This file was deleted.

9 changes: 9 additions & 0 deletions modules/bwa_aln.nf
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
params.cpus = 8
params.memory = "8g"
params.reference = false
params.enable_conda = false


process BWA_ALN {
cpus "${params.cpus}"
memory "${params.memory}"
tag "${name}"

conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)

input:
tuple val(name), file(fastq)

Expand All @@ -25,6 +28,8 @@ process BWA_SAMPE {
tag "${name}"
publishDir params.output, mode: "move"

conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)

input:
// joins both channels by key using the first element in the tuple, the name
tuple val(name), file(fastq1), file(sai1), file(fastq2), file(sai2)
Expand All @@ -43,6 +48,8 @@ process BWA_SAMSE {
tag "${name}"
publishDir params.output, mode: "move"

conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)

input:
// joins both channels by key using the first element in the tuple, the name
tuple val(name), file(fastq), file(sai)
Expand All @@ -61,6 +68,8 @@ process BWA_ALN_INCEPTION {
tag "${name}"
publishDir params.output, mode: "move"

conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)

input:
// joins both channels by key using the first element in the tuple, the name
tuple val(name), file(fastq1), file(fastq2)
Expand Down
5 changes: 5 additions & 0 deletions modules/bwa_mem.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
params.cpus = 8
params.memory = "8g"
params.reference = false
params.enable_conda = false


process BWA_MEM {
Expand All @@ -9,6 +10,8 @@ process BWA_MEM {
tag "${name}"
publishDir params.output, mode: "move"

conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)

input:
// joins both channels by key using the first element in the tuple, the name
tuple val(name), file(fastq1), file(fastq2)
Expand All @@ -27,6 +30,8 @@ process BWA_MEM_SE {
tag "${name}"
publishDir params.output, mode: "move"

conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)

input:
// joins both channels by key using the first element in the tuple, the name
tuple val(name), file(fastq)
Expand Down
6 changes: 6 additions & 0 deletions modules/fastp.nf
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
params.memory = "3g"
params.cpus = 1
params.output = "."
params.enable_conda = false
params.enable_docker = true


process FASTP_PAIRED {
cpus params.cpus
memory params.memory
publishDir "${params.output}", mode: "copy", pattern: "*fastp_stats*"

conda (params.enable_conda ? "bioconda::fastp=0.20.1" : null)

input:
tuple val(name), file(fastq1), file(fastq2)

Expand All @@ -34,6 +38,8 @@ process FASTP_SINGLE {
memory params.memory
publishDir "${params.output}", mode: "copy", pattern: "*fastp_stats*"

conda (params.enable_conda ? "bioconda::fastp=0.20.1" : null)

input:
tuple val(name), file(fastq1)

Expand Down
5 changes: 3 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* -------------------------------------------------
*/


profiles {
conda { process.conda = "$baseDir/environment.yml" }
conda {
params.enable_conda = true
}
debug { process.beforeScript = 'echo $HOSTNAME' }
test {
params.input_files = "test_data/test_input_paired.txt"
Expand Down

0 comments on commit c3f5308

Please sign in to comment.