@@ -20,8 +20,8 @@ process {
2020
2121 // BCL convert
2222 withName: BCLCONVERT {
23- cpus = { check_max( 18 , "cpus" ) }
24- memory = { check_max( 144.GB, "memory" ) }
23+ cpus = 18
24+ memory = 144.GB
2525 ext.args = {[
2626 meta.lane ? "--bcl-only-lane ${meta.lane}" : "",
2727 "--force",
@@ -79,7 +79,7 @@ process {
7979 params.trim_front > 0 ? "--trim_front1 ${params.trim_front}" : "",
8080 params.trim_tail > 0 ? "--trim_tail1 ${params.trim_tail}" : "",
8181 params.adapter_R1 ? "--adapter_sequence ${params.adapter_R1}" : "",
82- params.adapter_R2 ? "--adapter_sequence ${params.adapter_R2}" : "",
82+ params.adapter_R2 ? "--adapter_sequence_r2 ${params.adapter_R2}" : "",
8383 ].join(" ").trim()}
8484 publishDir = [
8585 [
@@ -93,8 +93,8 @@ process {
9393 // FASTQ_TO_UCRAM
9494 //// Samtools Import
9595 withName: ".*FASTQ_TO_UCRAM:SAMTOOLS_IMPORT" {
96- cpus = { check_max( 9 , "cpus" ) }
97- memory = { check_max( 36.GB * task.attempt, "memory" ) }
96+ cpus = 9
97+ memory = { 36.GB * task.attempt }
9898 // WARNING: Do NOT escape the RG tag tabs when adding a readgroup
9999 ext.args = {[
100100 meta.readgroup ? "--rg-line \"@RG\t" + meta.readgroup.findResults{ it.value?.trim() ? "$it.key:$it.value" : null }.join("\t") + "\"" : "",
@@ -105,8 +105,8 @@ process {
105105 }
106106
107107 withName: ".*FASTQ_TO_UCRAM:SAMTOOLS_CAT" {
108- cpus = { check_max( 9 , "cpus" ) }
109- memory = { check_max( 36.GB * task.attempt, "memory" ) }
108+ cpus = 9
109+ memory = { 36.GB * task.attempt }
110110 }
111111
112112 // FASTQ_TO_CRAM
@@ -135,6 +135,11 @@ process {
135135 meta.readgroup ? "--rg " + meta.readgroup.findResults{ it.value?.trim() ? "$it.key:$it.value" : null }.join(" --rg ") : ""
136136 ].join(" ").trim()}
137137 ext.args2 = "--fast"
138+ publishDir = [
139+ path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}"},
140+ mode: params.publish_dir_mode,
141+ pattern: "*.log"
142+ ]
138143 }
139144
140145 //// BWA mem/BWA mem2
@@ -167,8 +172,6 @@ process {
167172
168173 //// SNAP
169174 withName: SNAP_ALIGN {
170- cpus = { check_max( 18 , "cpus" ) }
171- memory = { check_max( 72.GB , "memory" ) }
172175 ext.args = {[
173176 "-b-",
174177 "-sm 20",
@@ -288,7 +291,7 @@ process {
288291 // coverage
289292 //// Mosdepth
290293 withName: ".*COVERAGE:MOSDEPTH" {
291- cpus = { check_max( 4 , "cpus" ) }
294+ cpus = 4
292295 // filter reads with flag 1804
293296 // read unmapped (0x4)
294297 // mate unmapped (0x8)*
@@ -334,7 +337,7 @@ process {
334337
335338 //// Picard
336339 withName= ".*PICARD.*" {
337- memory = { check_max( 8.GB * task.attempt , "memory" ) }
340+ memory = { 8.GB * task.attempt }
338341 ext.args = "--MAX_RECORDS_IN_RAM 10000000"
339342 }
340343
0 commit comments