diff --git a/modules/msk/genomenexus/annotationpipeline/main.nf b/modules/msk/genomenexus/annotationpipeline/main.nf index f02dbd37..ae6eca40 100644 --- a/modules/msk/genomenexus/annotationpipeline/main.nf +++ b/modules/msk/genomenexus/annotationpipeline/main.nf @@ -20,9 +20,15 @@ process GENOMENEXUS_ANNOTATIONPIPELINE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def xms = Math.max(256, (task.memory.toMega() / 4) as int) + def xmx = Math.max(1, task.memory.toGiga() as int) """ - java -Xms${task.memory.toMega()/4}m -Xmx${task.memory.toGiga()}g -jar /genome-nexus-annotation-pipeline/annotationPipeline/target/annotationPipeline.jar --filename ${input_maf} --output-filename ${meta.id}-annotated.maf + java -Xms${xms}m -Xmx${xmx}g \\ + -jar /genome-nexus-annotation-pipeline/annotationPipeline/target/annotationPipeline.jar \\ + --filename ${input_maf} \\ + --output-filename ${prefix}-annotated.maf \\ + ${args} cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -31,15 +37,14 @@ process GENOMENEXUS_ANNOTATIONPIPELINE { """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${meta.id}-annotated.maf + touch ${prefix}-annotated.maf cat <<-END_VERSIONS > versions.yml "${task.process}": - genomenexus: 'annotation pipeline version 1.0.5 + genomenexus: 'annotationpipeline version 1.0.5' END_VERSIONS """ } diff --git a/modules/msk/genomenexus/annotationpipeline/tests/main.nf.test b/modules/msk/genomenexus/annotationpipeline/tests/main.nf.test index 31c68478..ffa81fff 100644 --- a/modules/msk/genomenexus/annotationpipeline/tests/main.nf.test +++ b/modules/msk/genomenexus/annotationpipeline/tests/main.nf.test @@ -41,16 +41,15 @@ nextflow_process { test("test normal - stub") { + tag "stub" options "-stub" when { process { """ - - input[0] = [ [ id:'test',case_id:'sample1',control_id:'sample2'], // meta map - file(params.test_data_mskcc['genome_nexus']['sample2_sample1_annotated_maf'], checkIfExists: true) + file('dummy.maf', checkIfExists: false) ] """ } @@ -58,7 +57,8 @@ nextflow_process { then { assertAll( - { assert process.success } + { assert process.success }, + { assert snapshot(process.out).match() } ) } diff --git a/modules/msk/genomenexus/annotationpipeline/tests/main.nf.test.snap b/modules/msk/genomenexus/annotationpipeline/tests/main.nf.test.snap index ae32464e..97fceb96 100644 --- a/modules/msk/genomenexus/annotationpipeline/tests/main.nf.test.snap +++ b/modules/msk/genomenexus/annotationpipeline/tests/main.nf.test.snap @@ -9,7 +9,7 @@ "case_id": "sample1", "control_id": "sample2" }, - "test-annotated.maf:md5,4547e768939e82f6d1f44e1c64b64c3a" + "test-annotated.maf:md5,a8b47024c381dc8f2e5b2c0da0b24029" ] ], "1": [ @@ -22,7 +22,7 @@ "case_id": "sample1", "control_id": "sample2" }, - "test-annotated.maf:md5,4547e768939e82f6d1f44e1c64b64c3a" + "test-annotated.maf:md5,a8b47024c381dc8f2e5b2c0da0b24029" ] ], "versions": [ @@ -30,6 +30,47 @@ ] } ], - "timestamp": "2024-11-26T16:50:32.331962" + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.3" + }, + "timestamp": "2026-06-10T11:03:28.679902" + }, + "test normal - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "case_id": "sample1", + "control_id": "sample2" + }, + "test-annotated.maf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,3eec02db5105ee47caf6ea6efb53f12c" + ], + "annotated_maf": [ + [ + { + "id": "test", + "case_id": "sample1", + "control_id": "sample2" + }, + "test-annotated.maf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,3eec02db5105ee47caf6ea6efb53f12c" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.3" + }, + "timestamp": "2026-06-09T17:03:25.918345" } } \ No newline at end of file