From 7347141fc161c1a297239ff42dfcba90e2da5487 Mon Sep 17 00:00:00 2001 From: shihabdider Date: Fri, 5 Jul 2024 09:27:09 -0400 Subject: [PATCH] fix: add more mem to junction_filter --- assets/schema_input.json | 42 ++++++++++++++++----------------- conf/base.config | 5 ++++ conf/modules/snv_calling.config | 2 +- workflows/nfjabba.nf | 7 +++--- 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index a6e909c..c66ddcf 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -162,36 +162,35 @@ "format": "file-path", "exists": true }, - "ploidy": { - "errorMessage": "purityploidy file must have extension '.rds' or be a number", + "cov": { + "errorMessage": "COV file cannot contain spaces and must have extension '.rds' or '.txt'", "anyOf": [ { "type": "string", - "pattern": "^\\S+\\.rds$" + "pattern": "^\\S+\\.(rds|txt)$" }, { "type": "string", - "pattern": "^NA$" - }, + "maxLength": 0 + } + ], + "format": "file-path", + "exists": true + }, + "hets": { + "errorMessage": "Pileups file and must have extension '.txt'", + "anyOf": [ { "type": "string", - "pattern": "^/dev/null$" + "pattern": "^\\S+\\.txt$" }, { "type": "string", - "maxLength": 0 + "pattern": "^NA$" }, - { - "type": "number" - } - ], - }, - "cov": { - "errorMessage": "COV file cannot contain spaces and must have extension '.rds' or '.txt'", - "anyOf": [ { "type": "string", - "pattern": "^\\S+\\.(rds|txt)$" + "pattern": "^/dev/null$" }, { "type": "string", @@ -201,12 +200,12 @@ "format": "file-path", "exists": true }, - "hets": { - "errorMessage": "Pileups file and must have extension '.txt'", + "ploidy": { + "errorMessage": "purityploidy file must have extension '.rds' or be a number", "anyOf": [ { "type": "string", - "pattern": "^\\S+\\.txt$" + "pattern": "^\\S+\\.rds$" }, { "type": "string", @@ -219,10 +218,11 @@ { "type": "string", "maxLength": 0 + }, + { + "type": "number" } ], - "format": "file-path", - "exists": true }, "vcf": { "errorMessage": "VCF file for reads 1 cannot contain spaces and must have extension '.vcf' or '.vcf.gz'", diff --git a/conf/base.config b/conf/base.config index 47372a7..537bc58 100644 --- a/conf/base.config +++ b/conf/base.config @@ -116,6 +116,11 @@ process { memory = { check_max( 48.GB * task.attempt, 'memory' ) } time = { check_max( 8.h * task.attempt, 'time' ) } } + withName: 'JUNCTION_FILTER' { + cpus = { check_max( 2 * task.attempt, 'cpus' ) } + memory = { check_max( 128.GB * task.attempt, 'memory' ) } + time = { check_max( 16.h * task.attempt, 'time' ) } + } withName: 'HETPILEUPS' { cpus = { check_max( 4 * task.attempt, 'cpus' ) } memory = { check_max( 8.GB * task.attempt, 'memory' ) } diff --git a/conf/modules/snv_calling.config b/conf/modules/snv_calling.config index a5fcd83..c445f11 100644 --- a/conf/modules/snv_calling.config +++ b/conf/modules/snv_calling.config @@ -32,7 +32,7 @@ process { pattern: "*{vcf.gz,txt.gz,vcf*,.command.*}" ] } - withName: '.*SAGE_SOMATIC' { + withName: '.*SAGE_SOMATIC|SAGE_PASS_FILTER' { ext.when = { params.tools && params.tools.split(',').contains('sage') } publishDir = [ mode: params.publish_dir_mode, diff --git a/workflows/nfjabba.nf b/workflows/nfjabba.nf index 282a214..fa74958 100644 --- a/workflows/nfjabba.nf +++ b/workflows/nfjabba.nf @@ -130,9 +130,9 @@ def handleError(step, dataType) { } input_sample = ch_from_samplesheet - .map{ meta, fastq_1, fastq_2, table, cram, crai, bam, bai, ploidy, cov, hets, vcf, vcf2, snv_vcf_somatic, snv_tbi_somatic, snv_vcf_germline, snv_tbi_germline, seg, nseg, ggraph, variantcaller -> + .map{ meta, fastq_1, fastq_2, table, cram, crai, bam, bai, cov, hets, ploidy, vcf, vcf2, snv_vcf_somatic, snv_tbi_somatic, snv_vcf_germline, snv_tbi_germline, seg, nseg, ggraph, variantcaller -> // generate patient_sample key to group lanes together - [ meta.patient + meta.sample, [meta, fastq_1, fastq_2, table, cram, crai, bam, bai, ploidy, cov, hets, vcf, vcf2, snv_vcf_somatic, snv_tbi_somatic, snv_vcf_germline, snv_tbi_germline, seg, nseg, ggraph, variantcaller] ] + [ meta.patient + meta.sample, [meta, fastq_1, fastq_2, table, cram, crai, bam, bai, cov, hets, ploidy, vcf, vcf2, snv_vcf_somatic, snv_tbi_somatic, snv_vcf_germline, snv_tbi_germline, seg, nseg, ggraph, variantcaller] ] } .tap{ ch_with_patient_sample } // save the channel .groupTuple() //group by patient_sample to get all lanes @@ -143,7 +143,7 @@ input_sample = ch_from_samplesheet .combine(ch_with_patient_sample, by: 0) // for each entry add numLanes .map { patient_sample, num_lanes, ch_items -> - (meta, fastq_1, fastq_2, table, cram, crai, bam, bai, ploidy, cov, hets, vcf, vcf2, snv_vcf_somatic, snv_tbi_somatic, snv_vcf_germline, snv_tbi_germline, seg, nseg, ggraph, variantcaller) = ch_items + (meta, fastq_1, fastq_2, table, cram, crai, bam, bai, cov, hets, ploidy, vcf, vcf2, snv_vcf_somatic, snv_tbi_somatic, snv_vcf_germline, snv_tbi_germline, seg, nseg, ggraph, variantcaller) = ch_items if (meta.lane && fastq_2) { meta = meta + [id: "${meta.sample}-${meta.lane}".toString()] def CN = params.seq_center ? "CN:${params.seq_center}\\t" : '' @@ -1835,7 +1835,6 @@ workflow NFJABBA { [] ] } - jabba_inputs.dump(tag: 'trace2') } else { // join all previous outputs to be used as input for jabba // excluding svs since they can come from either svaba or gridss