diff --git a/conf/test_github.config b/conf/test_github.config index ee83537..8086af2 100644 --- a/conf/test_github.config +++ b/conf/test_github.config @@ -14,8 +14,8 @@ params { config_profile_name = 'Github test profile' config_profile_description = 'Minimal test dataset to check pipeline function' - max_cpus = 2 - max_memory = '6.GB' + max_cpus = 4 + max_memory = '15.GB' max_time = '6.h' // Limit resources so that this can run on GitHub Actions diff --git a/modules/local/bamtobed_sort.nf b/modules/local/bamtobed_sort.nf index c4d1db6..2f89d16 100644 --- a/modules/local/bamtobed_sort.nf +++ b/modules/local/bamtobed_sort.nf @@ -22,7 +22,7 @@ process BAMTOBED_SORT { script: def prefix = args.ext.prefix ?: "${meta.id}" def st_cores = task.cpus > 4 ? 4 : "${task.cpus}" - def buffer_mem = task.memory.toGiga() / 2 + def buffer_mem = (task.memory.toGiga() / 2).round() """ samtools view -@${st_cores} -u -F0x400 ${bam} | bamToBed | sort -k4 --parallel=${task.cpus} -S ${buffer_mem}G -T . > ${prefix}_merged_sorted.bed