diff --git a/conf/base.config b/conf/base.config index 8cc6fe4..4c76bb4 100644 --- a/conf/base.config +++ b/conf/base.config @@ -111,10 +111,9 @@ process { // Runtime for 1 billion reads on 12 threads is a function of the logarithm of the genome size // Runtime is considered proportional to the number of reads and inversely to number of threads time = { check_max( 3.h * task.attempt * Math.ceil(positive_log(meta2.genome_size/100000, 10)) * Math.ceil(meta.read_count/1000000000) * 12 / log_increase_cpus(6, 6*task.attempt, meta.read_count/1000000000, 2), 'time' ) } - // Memory usage for 1 BWAMEM2 thread is 500 MB for every 1 Gbp. - // Memory usage of BWAMEM2 is about proportional to the number of threads but need to add about 6 GB to avoid MEMLIMIT. + // Base RAM usage is about 6 times the genome size. Each thread takes an additional 800 MB RAM // Memory usage of SAMTOOLS_VIEW is negligible. - memory = { check_max( 6.GB + 500.MB * Math.ceil(meta2.genome_size / 1000000000) * log_increase_cpus(6, 6*task.attempt, meta.read_count/1000000000, 2), 'memory' ) } + memory = { check_max( 6.GB * Math.ceil(meta2.genome_size / 1000000000) + 800.MB * log_increase_cpus(6, 6*task.attempt, meta.read_count/1000000000, 2), 'memory' ) } } withName: MINIMAP2_ALIGN {