Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ modules/msk/neosv/** @johnoooh @nikhil @mskcc-omics-workflows/reviewers
modules/msk/netmhc3/** @johnoooh @nikhil @mskcc-omics-workflows/reviewers
modules/msk/netmhcpan4/** @johnoooh @nikhil @mskcc-omics-workflows/reviewers
modules/msk/netmhcstabpan/** @johnoooh @nikhil @mskcc-omics-workflows/reviewers
modules/msk/oncokb/mafannotate/** @johnoooh @mskcc-omics-workflows/reviewers
modules/msk/phylowgs/createinput/** @pintoa1-mskcc @mskcc-omics-workflows/reviewers
modules/msk/phylowgs/multievolve/** @nikhil @mskcc-omics-workflows/reviewers
modules/msk/phylowgs/parsecnvs/** @pintoa1-mskcc @mskcc-omics-workflows/reviewers
Expand Down
7 changes: 7 additions & 0 deletions .github/actions/nf-test-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ runs:
python -m pip install cryptography
nextflow secrets set SENTIEON_AUTH_DATA $(python3 tests/modules/nf-core/sentieon/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE")

- name: Set up nextflow ONCOKB secrets
if: env.ONCOKB_TOKEN != ''
shell: bash
run: |
nextflow secrets set ONCOKB_TOKEN $ONCOKB_TOKEN


# TODO Skip failing conda tests and document their failures
# https://github.com/nf-core/modules/issues/7017
- name: Run nf-test
Expand Down
2 changes: 2 additions & 0 deletions .github/conda_skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ exclude:
path: modules/msk/neosv
- profile: conda
path: modules/msk/netmhc3
- profile: conda
path: modules/msk/oncokb/mafannotate
3 changes: 2 additions & 1 deletion .github/skip_nf_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"modules/msk/phylowgs/parsecnvs",
"modules/msk/pvmaf/concat",
"modules/msk/pvmaf/tagtraceback",
"subworkflows/msk/genome_nexus"
"subworkflows/msk/genome_nexus",
"modules/msk/oncokb/mafannotate"
],
"docker": [
],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
env:
NXF_ANSI_LOG: false
TOTAL_SHARDS: 5

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
Expand Down Expand Up @@ -130,6 +129,7 @@ jobs:
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }}
SENTIEON_AUTH_MECH: "GitHub Actions - token"
ONCOKB_TOKEN: ${{ secrets.ONCOKB_TOKEN }}
with:
profile: ${{ matrix.profile }}
shard: ${{ matrix.shard }}
Expand Down
6 changes: 6 additions & 0 deletions modules/msk/oncokb/mafannotate/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "oncokb=version"
51 changes: 51 additions & 0 deletions modules/msk/oncokb/mafannotate/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
process ONCOKB_MAFANNOTATE {
tag "$meta.id"
label 'process_single'

secret 'ONCOKB_TOKEN'
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'ghcr.io/mskcc-omics-workflows/oncokb:3.4.1':
'ghcr.io/mskcc-omics-workflows/oncokb:3.4.1' }"

input:
tuple val(meta), path(inputMaf)

output:
tuple val(meta), path("*.oncokb.maf"), emit: oncokb_maf
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:

def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
python3 /usr/bin/oncokb/MafAnnotator.py \
-i ${inputMaf} \
-o ${prefix}.oncokb.maf \
-b ${ONCOKB_TOKEN}
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
MafAnnotator: \$(echo \$(MafAnnotator.py -v))
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
mkdir ${prefix}_out
touch ${prefix}.oncokb.maf

cat <<-END_VERSIONS > versions.yml
"${task.process}":
MafAnnotator: \$(echo \$(MafAnnotator.py -v))
END_VERSIONS
"""
}
46 changes: 46 additions & 0 deletions modules/msk/oncokb/mafannotate/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "oncokb_mafannotate"
description:
Takes a Maf and annotates it using OncoKB.
keywords:
- oncokb
- maf
- annotation
tools:
- oncokb:
description: "OncoKB is a precision oncology knowledge base that annotates the biological consequences and clinical implications (therapeutic, diagnostic, and prognostic) of genetic variants in cancer. In order to use this you must provide a config file containing your own oncoKB api key in the args."
documentation: "https://github.com/oncokb/oncokb-annotator"
licence: ["GNU"]
identifier: ""

input:
- - meta:
type: map
description: |
Groovy Map containing sample information.
e.g. `[ id:'sample1']`
- inputMaf:
type: file
description: MAF, perferrably annotated by vcf2maf. Required cols are listed in the docs.
pattern: "*.maf"
output:
- oncokb_maf:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1']`
- "*.oncokb.maf":
type: file
description: A maf file annotated by oncokb
pattern: "*.{maf}"
- versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@johnoooh"
maintainers:
- "@johnoooh"

66 changes: 66 additions & 0 deletions modules/msk/oncokb/mafannotate/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
nextflow_process {

name "Test Process ONCOKB_MAFANNOTATE"
script "../main.nf"
process "ONCOKB_MAFANNOTATE"

tag "modules"
tag "modules_nfcore"
tag "modules_msk"
tag "oncokb"
tag "oncokb/mafannotate"


test("test") {


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)
]
"""
}
}

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

)
}

}


test("test normal - 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)
]
"""
}
}

then {
assertAll(
{ assert process.success }

)
}

}

}
39 changes: 39 additions & 0 deletions modules/msk/oncokb/mafannotate/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"test": {
"content": [
{
"0": [
[
{
"id": "test",
"case_id": "sample1",
"control_id": "sample2"
},
"test.oncokb.maf:md5,dd58c4431ec26cb47fb97236d063c6a5"
]
],
"1": [
"versions.yml:md5,030d3dd4facf29936752666113de5897"
],
"oncokb_maf": [
[
{
"id": "test",
"case_id": "sample1",
"control_id": "sample2"
},
"test.oncokb.maf:md5,dd58c4431ec26cb47fb97236d063c6a5"
]
],
"versions": [
"versions.yml:md5,030d3dd4facf29936752666113de5897"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.04.4"
},
"timestamp": "2025-03-03T13:18:05.707580942"
}
}
2 changes: 2 additions & 0 deletions modules/msk/oncokb/mafannotate/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
genomenexus/annotationpipeline:
- "modules/msk/oncokb/mafannotate/**"