Skip to content

Commit 70ffc3f

Browse files
authored
Merge branch 'develop' into module/fingerprintparser
2 parents 3cc109e + 89a7643 commit 70ffc3f

11 files changed

Lines changed: 223 additions & 2 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ modules/msk/neosv/** @johnoooh @nikhil @mskcc-omics-workflows/reviewers
2020
modules/msk/netmhc3/** @johnoooh @nikhil @mskcc-omics-workflows/reviewers
2121
modules/msk/netmhcpan4/** @johnoooh @nikhil @mskcc-omics-workflows/reviewers
2222
modules/msk/netmhcstabpan/** @johnoooh @nikhil @mskcc-omics-workflows/reviewers
23+
modules/msk/oncokb/mafannotate/** @johnoooh @mskcc-omics-workflows/reviewers
2324
modules/msk/phylowgs/createinput/** @pintoa1-mskcc @mskcc-omics-workflows/reviewers
2425
modules/msk/phylowgs/multievolve/** @nikhil @mskcc-omics-workflows/reviewers
2526
modules/msk/phylowgs/parsecnvs/** @pintoa1-mskcc @mskcc-omics-workflows/reviewers

.github/actions/nf-test-action/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ runs:
6565
python -m pip install cryptography
6666
nextflow secrets set SENTIEON_AUTH_DATA $(python3 tests/modules/nf-core/sentieon/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE")
6767
68+
- name: Set up nextflow ONCOKB secrets
69+
if: env.ONCOKB_TOKEN != ''
70+
shell: bash
71+
run: |
72+
nextflow secrets set ONCOKB_TOKEN $ONCOKB_TOKEN
73+
74+
6875
# TODO Skip failing conda tests and document their failures
6976
# https://github.com/nf-core/modules/issues/7017
7077
- name: Run nf-test

.github/conda_skip.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@ exclude:
7474
path: modules/msk/neosv
7575
- profile: conda
7676
path: modules/msk/netmhc3
77+
- profile: conda
78+
path: modules/msk/oncokb/mafannotate

.github/skip_nf_test.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"modules/msk/pvmaf/concat",
3333
"modules/msk/pvmaf/tagtraceback",
3434
"subworkflows/msk/fingerprint_gbcms",
35-
"subworkflows/msk/genome_nexus"
35+
"subworkflows/msk/genome_nexus",
36+
"modules/msk/oncokb/mafannotate"
3637
],
3738
"docker": [
3839
],

.github/workflows/nf-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ jobs:
7979
env:
8080
NXF_ANSI_LOG: false
8181
TOTAL_SHARDS: 5
82-
8382
steps:
8483
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
8584
with:
@@ -130,6 +129,7 @@ jobs:
130129
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
131130
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }}
132131
SENTIEON_AUTH_MECH: "GitHub Actions - token"
132+
ONCOKB_TOKEN: ${{ secrets.ONCOKB_TOKEN }}
133133
with:
134134
profile: ${{ matrix.profile }}
135135
shard: ${{ matrix.shard }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
2+
channels:
3+
- conda-forge
4+
- bioconda
5+
dependencies:
6+
- "oncokb=version"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
process ONCOKB_MAFANNOTATE {
2+
tag "$meta.id"
3+
label 'process_single'
4+
5+
secret 'ONCOKB_TOKEN'
6+
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7+
'ghcr.io/mskcc-omics-workflows/oncokb:3.4.1':
8+
'ghcr.io/mskcc-omics-workflows/oncokb:3.4.1' }"
9+
10+
input:
11+
tuple val(meta), path(inputMaf)
12+
13+
output:
14+
tuple val(meta), path("*.oncokb.maf"), emit: oncokb_maf
15+
path "versions.yml", emit: versions
16+
17+
when:
18+
task.ext.when == null || task.ext.when
19+
20+
script:
21+
22+
def args = task.ext.args ?: ''
23+
def prefix = task.ext.prefix ?: "${meta.id}"
24+
25+
"""
26+
python3 /usr/bin/oncokb/MafAnnotator.py \
27+
-i ${inputMaf} \
28+
-o ${prefix}.oncokb.maf \
29+
-b ${ONCOKB_TOKEN}
30+
$args
31+
32+
cat <<-END_VERSIONS > versions.yml
33+
"${task.process}":
34+
MafAnnotator: \$(echo \$(MafAnnotator.py -v))
35+
END_VERSIONS
36+
"""
37+
38+
stub:
39+
def args = task.ext.args ?: ''
40+
def prefix = task.ext.prefix ?: "${meta.id}"
41+
42+
"""
43+
mkdir ${prefix}_out
44+
touch ${prefix}.oncokb.maf
45+
46+
cat <<-END_VERSIONS > versions.yml
47+
"${task.process}":
48+
MafAnnotator: \$(echo \$(MafAnnotator.py -v))
49+
END_VERSIONS
50+
"""
51+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
2+
name: "oncokb_mafannotate"
3+
description:
4+
Takes a Maf and annotates it using OncoKB.
5+
keywords:
6+
- oncokb
7+
- maf
8+
- annotation
9+
tools:
10+
- oncokb:
11+
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."
12+
documentation: "https://github.com/oncokb/oncokb-annotator"
13+
licence: ["GNU"]
14+
identifier: ""
15+
16+
input:
17+
- - meta:
18+
type: map
19+
description: |
20+
Groovy Map containing sample information.
21+
e.g. `[ id:'sample1']`
22+
- inputMaf:
23+
type: file
24+
description: MAF, perferrably annotated by vcf2maf. Required cols are listed in the docs.
25+
pattern: "*.maf"
26+
output:
27+
- oncokb_maf:
28+
- meta:
29+
type: map
30+
description: |
31+
Groovy Map containing sample information
32+
e.g. `[ id:'sample1']`
33+
- "*.oncokb.maf":
34+
type: file
35+
description: A maf file annotated by oncokb
36+
pattern: "*.{maf}"
37+
- versions:
38+
- versions.yml:
39+
type: file
40+
description: File containing software versions
41+
pattern: "versions.yml"
42+
authors:
43+
- "@johnoooh"
44+
maintainers:
45+
- "@johnoooh"
46+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
nextflow_process {
2+
3+
name "Test Process ONCOKB_MAFANNOTATE"
4+
script "../main.nf"
5+
process "ONCOKB_MAFANNOTATE"
6+
7+
tag "modules"
8+
tag "modules_nfcore"
9+
tag "modules_msk"
10+
tag "oncokb"
11+
tag "oncokb/mafannotate"
12+
13+
14+
test("test") {
15+
16+
17+
when {
18+
process {
19+
"""
20+
21+
input[0] = [
22+
[ id:'test',case_id:'sample1',control_id:'sample2'], // meta map
23+
file(params.test_data_mskcc['genome_nexus']['sample2_sample1_annotated_maf'], checkIfExists: true)
24+
]
25+
"""
26+
}
27+
}
28+
29+
then {
30+
assertAll(
31+
{ assert process.success },
32+
{ assert snapshot(process.out).match() }
33+
34+
)
35+
}
36+
37+
}
38+
39+
40+
test("test normal - stub") {
41+
42+
options "-stub"
43+
44+
when {
45+
process {
46+
"""
47+
48+
49+
input[0] = [
50+
[ id:'test',case_id:'sample1',control_id:'sample2'], // meta map
51+
file(params.test_data_mskcc['genome_nexus']['sample2_sample1_annotated_maf'], checkIfExists: true)
52+
]
53+
"""
54+
}
55+
}
56+
57+
then {
58+
assertAll(
59+
{ assert process.success }
60+
61+
)
62+
}
63+
64+
}
65+
66+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"test": {
3+
"content": [
4+
{
5+
"0": [
6+
[
7+
{
8+
"id": "test",
9+
"case_id": "sample1",
10+
"control_id": "sample2"
11+
},
12+
"test.oncokb.maf:md5,dd58c4431ec26cb47fb97236d063c6a5"
13+
]
14+
],
15+
"1": [
16+
"versions.yml:md5,030d3dd4facf29936752666113de5897"
17+
],
18+
"oncokb_maf": [
19+
[
20+
{
21+
"id": "test",
22+
"case_id": "sample1",
23+
"control_id": "sample2"
24+
},
25+
"test.oncokb.maf:md5,dd58c4431ec26cb47fb97236d063c6a5"
26+
]
27+
],
28+
"versions": [
29+
"versions.yml:md5,030d3dd4facf29936752666113de5897"
30+
]
31+
}
32+
],
33+
"meta": {
34+
"nf-test": "0.9.2",
35+
"nextflow": "24.04.4"
36+
},
37+
"timestamp": "2025-03-03T13:18:05.707580942"
38+
}
39+
}

0 commit comments

Comments
 (0)