Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions modules/msk/genomenexus/annotationpipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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}":
Expand All @@ -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
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@ 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)
]
"""
}
}

then {
assertAll(
{ assert process.success }
{ assert process.success },
{ assert snapshot(process.out).match() }

)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"case_id": "sample1",
"control_id": "sample2"
},
"test-annotated.maf:md5,4547e768939e82f6d1f44e1c64b64c3a"
"test-annotated.maf:md5,a8b47024c381dc8f2e5b2c0da0b24029"
]
],
"1": [
Expand All @@ -22,14 +22,55 @@
"case_id": "sample1",
"control_id": "sample2"
},
"test-annotated.maf:md5,4547e768939e82f6d1f44e1c64b64c3a"
"test-annotated.maf:md5,a8b47024c381dc8f2e5b2c0da0b24029"
]
],
"versions": [
"versions.yml:md5,3eec02db5105ee47caf6ea6efb53f12c"
]
}
],
"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"
}
}
Loading