From 4acc14269f09b6497c923085be31c5f464665d57 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 23 Mar 2022 13:42:02 -0500 Subject: [PATCH 1/3] Revise default process resource allocations Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- conf/base.config | 10 +++++----- conf/parameters.config | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/base.config b/conf/base.config index ebde2c07..b3e85169 100644 --- a/conf/base.config +++ b/conf/base.config @@ -59,17 +59,17 @@ process { time = { check_max( 4.h * task.attempt, 'time' ) } } withLabel:process_medium { - cpus = { check_max( 6 * task.attempt, 'cpus' ) } + cpus = { check_max( 16 * task.attempt, 'cpus' ) } memory = { check_max( 36.GB * task.attempt, 'memory' ) } - time = { check_max( 8.h * task.attempt, 'time' ) } + time = { check_max( 24.h * task.attempt, 'time' ) } } withLabel:process_high { - cpus = { check_max( 12 * task.attempt, 'cpus' ) } + cpus = { check_max( 32 * task.attempt, 'cpus' ) } memory = { check_max( 72.GB * task.attempt, 'memory' ) } - time = { check_max( 16.h * task.attempt, 'time' ) } + time = { check_max( 7.d * task.attempt, 'time' ) } } withLabel:process_long { - time = { check_max( 20.h * task.attempt, 'time' ) } + time = { check_max( 14.d * task.attempt, 'time' ) } } withLabel:process_high_memory { memory = { check_max( 200.GB * task.attempt, 'memory' ) } diff --git a/conf/parameters.config b/conf/parameters.config index dfbfc3d5..3b01f577 100644 --- a/conf/parameters.config +++ b/conf/parameters.config @@ -76,8 +76,8 @@ params { // Max resource options // Defaults only, expecting to be overwritten - max_memory = '750.GB' - max_cpus = 72 + max_memory = '128.GB' + max_cpus = 32 max_time = '240.h' // Step-skipping options From 7afc7c80f5a48a28f5ca625072e0546a50655b3b Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 23 Mar 2022 13:45:21 -0500 Subject: [PATCH 2/3] Add dynamic memory allocation for Kraken2 Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- conf/modules.config | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/conf/modules.config b/conf/modules.config index 2164878a..e58406f5 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1,5 +1,22 @@ +import static java.lang.Math.sqrt +import static java.lang.Math.round + def platform = params.platform +// Kraken memory allocation +def kraken2_db = new File("${params.kraken2_db}") +if (kraken2_db.isDirectory()) { + process { + withName: 'KRAKEN2' { + memory = { + def krakenDbSize = kraken2_db.directorySize() + def allocSize = round(sqrt(krakenDbSize) + krakenDbSize) + return "${allocSize} B" + } + } + } +} + process { // Deinterleaving parameter: take every other read withName: 'SEQKIT_SPLIT2' { From b4637325994387555862fd653abccd4510d9cebc Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 23 Mar 2022 14:10:17 -0500 Subject: [PATCH 3/3] Bump version number Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- CHANGELOG.md | 9 ++++++++- nextflow.config | 2 +- visualizer/package-lock.json | 2 +- visualizer/package.json | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf58b41..c6da8283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.6.4-alpha] - 2022=03-23 + +### Fixed + +- Kraken2 memory allocates based on the database size again + ## [0.6.3-alpha] - 2022-03-23 ### Fixed @@ -211,7 +217,8 @@ This is a major overhaul of YAVSAP to make it use nf-core's DSL2 modules. - Krona graphs of Kraken2 output - BLAST of assemblies and unclassified reads -[unreleased]: https://github.com/ksumngs/yavsap/compare/v0.6.3-alpha...HEAD +[unreleased]: https://github.com/ksumngs/yavsap/compare/v0.6.4-alpha...HEAD +[0.6.4-alpha]: https://github.com/ksumngs/yavsap/compare/v0.6.3-alpha...v0.6.4-alpha [0.6.3-alpha]: https://github.com/ksumngs/yavsap/compare/v0.6.2-alpha...v0.6.3-alpha [0.6.2-alpha]: https://github.com/ksumngs/yavsap/compare/v0.6.1-alpha...v0.6.2-alpha [0.6.1-alpha]: https://github.com/ksumngs/yavsap/compare/v0.6.0-alpha...v0.6.1-alpha diff --git a/nextflow.config b/nextflow.config index ca4b9f08..b6899dec 100644 --- a/nextflow.config +++ b/nextflow.config @@ -14,7 +14,7 @@ manifest { description = 'Intra-sample viral population analysis' mainScript = 'main.nf' nextflowVersion = '!>=21.10.6' - version = '0.6.3-alpha' + version = '0.6.4-alpha' recurseSubmodules = true } diff --git a/visualizer/package-lock.json b/visualizer/package-lock.json index 48a62cc9..bee8d78f 100644 --- a/visualizer/package-lock.json +++ b/visualizer/package-lock.json @@ -1,6 +1,6 @@ { "name": "YAVSAP", - "version": "0.6.3-alpha", + "version": "0.6.4-alpha", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/visualizer/package.json b/visualizer/package.json index da92a2ca..014fe0c9 100644 --- a/visualizer/package.json +++ b/visualizer/package.json @@ -1,6 +1,6 @@ { "name": "YAVSAP", - "version": "0.6.3-alpha", + "version": "0.6.4-alpha", "repository": { "type": "git", "url": "git+https://github.com/ksumngs/yavsap.git"