From 306ecfcc5cefd5bb8f2f7a2449b95246448b2e12 Mon Sep 17 00:00:00 2001 From: Tanubrata Dey Date: Fri, 9 Feb 2024 12:21:39 -0500 Subject: [PATCH] BugFix: Addresses chr mismatch issue for ASCAT --- bigpurple.config | 46 +++++++++++++++++++++++++++++++++++++ bin/ascat_seg.R | 1 + conf/base.config | 4 ++-- modules/local/jabba/main.nf | 4 ++-- 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 bigpurple.config diff --git a/bigpurple.config b/bigpurple.config new file mode 100644 index 0000000..822cb90 --- /dev/null +++ b/bigpurple.config @@ -0,0 +1,46 @@ + +params { + config_profile_name = 'mskilab-org NYU BigPurple Cluster Profile' + config_profile_description = """ + mskilab-org NYU School of Medicine BigPurple cluster profile to run nf-JaBbA. + !!Make sure to load both singularity/3.1 and squashfs-tools/4.3 before running nf-JaBbA with this profile!! + Ideal to make work folder on scratch as it generates whole lot of temporary files to run the pipeline + Make sure to submit the run as an SBATCH job since we don't own our own node at NYU yet!! + """.stripIndent() + config_profile_contact = "Tanubrata Dey (tanubrata.dey@nyulangone.org)" + config_profile_url = "https://www.mskilab.org/" + + // Resources + max_memory = 700.GB + max_cpus = 256 + max_time = 10.d +} +process { + + // default SLURM node config + beforeScript = """ + module load singularity/3.9.8 + module load squashfs-tools/4.3 + + """ + .stripIndent() + + executor='slurm' + + // memory errors which should be retried. otherwise error out + errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' } + maxRetries = 3 + maxErrors = '-1' + +} +executor { + name = 'slurm' + queueSize = 500 + submitRateLimit = '10 sec' +} +singularity { + enabled = true + autoMounts = true + cacheDir = "/gpfs/data/imielinskilab/singularity_files/nextflow_singularity_cache" +} + diff --git a/bin/ascat_seg.R b/bin/ascat_seg.R index 835a6df..ae2bacd 100644 --- a/bin/ascat_seg.R +++ b/bin/ascat_seg.R @@ -625,6 +625,7 @@ if (grepl(pattern = "txt$", x = opt$variants)) { variants.dt = fread(opt$variants) + variants.dt[[1]] <- gsub("chr","",variants.dt[[1]]) variants.dt[, ":="(alt.count.n = as.numeric(as.character(alt.count.n)), ref.count.n = as.numeric(as.character(ref.count.n)), alt.count.t = as.numeric(as.character(alt.count.t)), diff --git a/conf/base.config b/conf/base.config index 5a1d56b..3090ba6 100644 --- a/conf/base.config +++ b/conf/base.config @@ -103,11 +103,11 @@ process { } withName: 'SVABA' { cpus = 4 - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { check_max( 72.GB * task.attempt, 'memory' ) } time = 84.h } withName: 'GRIDSS' { - cpus = { check_max( 8 * task.attempt, 'cpus' ) } + cpus = { check_max( 4 * task.attempt, 'cpus' ) } memory = { check_max( 72.GB * task.attempt, 'memory' ) } time = 84.h } diff --git a/modules/local/jabba/main.nf b/modules/local/jabba/main.nf index f97e527..23c0242 100644 --- a/modules/local/jabba/main.nf +++ b/modules/local/jabba/main.nf @@ -3,8 +3,8 @@ process JABBA { label 'process_high' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - '/gpfs/commons/home/tdey/lab/singularity_files/nextflow_singularity_cache/mskilab-jabba_cplex-latest.img': - 'mskilab/jabba:latest' }" + 'docker://mskilab/jabba_cplex:latest': + 'mskilab/jabba_cplex:latest' }" input: tuple val(meta), path(cov_rds)