From f63cae028ce4421e4a491e52e193152e8af45b05 Mon Sep 17 00:00:00 2001 From: Mike Lloyd Date: Thu, 2 May 2024 12:00:30 -0400 Subject: [PATCH] pta script fix. oom fixes --- ReleaseNotes.md | 4 ++++ bin/pta/merge-caller-vcfs.r | 5 +++-- modules/picard/picard_reordersam.nf | 2 +- modules/r/annotate_sv.nf | 4 ++-- modules/r/annotate_sv_mouse.nf | 4 ++-- nextflow.config | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index e3af53c..5484b84 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,9 @@ # RELEASE NOTES +## Release 0.6.2 + +In this minor release we adjust memory and wall clock statements, and modified `bin/pta/merge-caller-vcfs.r` to correct for an edge case related bug. + ## Release 0.6.1 In this minor release we added support for automatic Zenodo releases via github actions. There are no changes or additions to workflows. diff --git a/bin/pta/merge-caller-vcfs.r b/bin/pta/merge-caller-vcfs.r index fbefde4..9d9053a 100644 --- a/bin/pta/merge-caller-vcfs.r +++ b/bin/pta/merge-caller-vcfs.r @@ -1,6 +1,6 @@ ## BJS Note: this script was located in the root path of the Docker container ## gcr.io/nygc-public/sv_cnv@sha256:1c14a50d131323a2a4bab323cf224879776af8de37f93df79292fd2e63269274 -## It is reproduced below as it exists there without modification +## It is reproduced below with modification ## Merge arbitrary number of VCFs, annotate with simple event type libs = c('optparse', 'StructuralVariantAnnotation', 'VariantAnnotation', 'rtracklayer', 'stringr') @@ -264,7 +264,8 @@ mergeCallsets = function(a, b, slop) { ## Pull in non-matching SVs from b res = c(a, b[-subjectHits(overlaps)]) - + res = subset(res, (names(res) %in% res$partner) & (res$partner %in% names(res))) + return(res) } diff --git a/modules/picard/picard_reordersam.nf b/modules/picard/picard_reordersam.nf index 6b28d9a..9c4f62b 100644 --- a/modules/picard/picard_reordersam.nf +++ b/modules/picard/picard_reordersam.nf @@ -2,7 +2,7 @@ process PICARD_REORDERSAM { tag "$sampleID" cpus 1 - memory 35.GB + memory 50.GB time '06:00:00' errorStrategy {(task.exitStatus == 140) ? {log.info "\n\nError code: ${task.exitStatus} for task: ${task.name}. Likely caused by the task wall clock: ${task.time} or memory: ${task.memory} being exceeded.\nAttempting orderly shutdown.\nSee .command.log in: ${task.workDir} for more info.\n\n"; return 'finish'}.call() : 'finish'} diff --git a/modules/r/annotate_sv.nf b/modules/r/annotate_sv.nf index 71a12ae..b84cf25 100644 --- a/modules/r/annotate_sv.nf +++ b/modules/r/annotate_sv.nf @@ -2,8 +2,8 @@ process ANNOTATE_SV { tag "$sampleID" cpus 1 - memory 8.GB - time '04:00:00' + memory 10.GB + time '08:00:00' errorStrategy {(task.exitStatus == 140) ? {log.info "\n\nError code: ${task.exitStatus} for task: ${task.name}. Likely caused by the task wall clock: ${task.time} or memory: ${task.memory} being exceeded.\nAttempting orderly shutdown.\nSee .command.log in: ${task.workDir} for more info.\n\n"; return 'finish'}.call() : 'finish'} container 'quay.io/jaxcompsci/r-sv_cnv_annotate:4.1.1' diff --git a/modules/r/annotate_sv_mouse.nf b/modules/r/annotate_sv_mouse.nf index c2c02a5..cc82350 100644 --- a/modules/r/annotate_sv_mouse.nf +++ b/modules/r/annotate_sv_mouse.nf @@ -2,8 +2,8 @@ process ANNOTATE_SV { tag "$sampleID" cpus 1 - memory 8.GB - time '04:00:00' + memory 10.GB + time '08:00:00' errorStrategy {(task.exitStatus == 140) ? {log.info "\n\nError code: ${task.exitStatus} for task: ${task.name}. Likely caused by the task wall clock: ${task.time} or memory: ${task.memory} being exceeded.\nAttempting orderly shutdown.\nSee .command.log in: ${task.workDir} for more info.\n\n"; return 'finish'}.call() : 'finish'} container 'quay.io/jaxcompsci/r-sv_cnv_annotate:4.1.1' diff --git a/nextflow.config b/nextflow.config index 8fd3687..c479adc 100644 --- a/nextflow.config +++ b/nextflow.config @@ -45,7 +45,7 @@ manifest { homePage = "https://github.com/TheJacksonLaboratory/cs-nf-pipelines" mainScript = "main.nf" nextflowVersion = "!>=22.04.3" - version = "0.6.1" + version = "0.6.2" author = 'Michael Lloyd, Brian Sanderson, Barry Guglielmo, Sai Lek, Peter Fields, Harshpreet Chandok, Carolyn Paisie, Gabriel Rech, Anuj Srivastava. Copyright Jackson Laboratory 2024' }