Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Genome Nexus Subworkflow + Modules (for nucleovar nf-core lint check) #141

Merged
merged 16 commits into from
Sep 9, 2024
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
name: "genomenexus_annotationpipeline"
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- "YOUR-TOOL-HERE"
- "genomenexus=version"
14 changes: 7 additions & 7 deletions modules/msk/genomenexus/annotationpipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ process GENOMENEXUS_ANNOTATIONPIPELINE {


container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'ghcr.io/msk-access/genomenexus_annotation-pipeline:1.0.5':
'ghcr.io/msk-access/genomenexus_annotation-pipeline:1.0.5' }"
'ghcr.io/msk-access/genomenexus_annotation-pipeline:1.0.4':
'ghcr.io/msk-access/genomenexus_annotation-pipeline:1.0.4' }"

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

output:
tuple val(meta), path("*.maf"), emit: annotated_maf
tuple val(meta), path("${meta.control_id}_${meta.case_id}_annotated.maf"), emit: annotated_maf
path "versions.yml" , emit: versions

when:
Expand All @@ -22,11 +22,11 @@ process GENOMENEXUS_ANNOTATIONPIPELINE {
def prefix = task.ext.prefix ?: "${meta.id}"

"""
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 -jar /genome-nexus-annotation-pipeline/annotationPipeline/target/annotationPipeline.jar --filename ${input_maf} --output-filename ${meta.id}_annotated.maf

cat <<-END_VERSIONS > versions.yml
"${task.process}":
genomenexus: 'annotation pipeline version 1.0.5'
genomenexus: 'annotationpipeline version 1.0.4'
END_VERSIONS
"""

Expand All @@ -35,11 +35,11 @@ process GENOMENEXUS_ANNOTATIONPIPELINE {
def prefix = task.ext.prefix ?: "${meta.id}"

"""
touch ${meta.id}_annotated.maf
touch ${meta.control_id}_${meta.case_id}_annotated.maf

cat <<-END_VERSIONS > versions.yml
"${task.process}":
genomenexus: 'annotation pipeline version 1.0.5'
genomenexus: 'annotationpipeline version 1.0.4'
END_VERSIONS
"""
}
4 changes: 2 additions & 2 deletions modules/msk/genomenexus/annotationpipeline/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "genomenexus_annotationpipeline"

description: Second module in genome nexus java pipeline to perform annotation of a MAF file type using the genomenexus suite of conversion and annotation tools. Genome Nexus is a comprehensive one-stop resource for fast, automated and high-throughput annotation and interpretation of genetic variants in cancer. Genome Nexus integrates information from a variety of existing resources, including databases that convert DNA changes to protein changes, predict the functional effects of protein mutations, and contain information about mutation frequencies, gene function, variant effects, and clinical actionability.
description: DSL2 module to perform annotation of a MAF file type using the genomenexus suite of conversion and annotation tools.
keywords:
- annotate
- vcf
Expand All @@ -11,7 +11,7 @@ keywords:
- genomics
tools:
- "genomenexus":
description: "Second module in genome nexus java pipeline to perform an annotation of MAF file type using the genomenexus suite of conversion and annotation tools. Genome Nexus is a comprehensive one-stop resource for fast, automated and high-throughput annotation and interpretation of genetic variants in cancer. Genome Nexus integrates information from a variety of existing resources, including databases that convert DNA changes to protein changes, predict the functional effects of protein mutations, and contain information about mutation frequencies, gene function, variant effects, and clinical actionability."
description: "DSL2 module to perform an annotation of MAF file type using the genomenexus suite of conversion and annotation tools."
homepage: "https://github.com/genome-nexus/genome-nexus-annotation-pipeline/"
documentation: "https://github.com/genome-nexus/.github/blob/main/profile/README.md"

Expand Down
22 changes: 11 additions & 11 deletions modules/msk/genomenexus/annotationpipeline/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ nextflow_process {
tag "genomenexus"
tag "genomenexus/annotationpipeline"


test("test normal ") {


when {
process {
"""

input[0] = [
[ id:'test'], // meta map
file(params.test_data_mskcc['genome_nexus']['test_maf'], checkIfExists: true)
[ id:'test',case_id:'sample1',control_id:'sample2'], // meta map
file(params.test_data_mskcc['genome_nexus']['sample2_sample1_annotated_maf'], checkIfExists: true)
]
"""
}
Expand All @@ -32,25 +32,25 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }

)
}

}


test("test normal - stub") {

options "-stub"

when {
process {
"""


input[0] = [
[ id:'test'], // meta map
file(params.test_data_mskcc['genome_nexus']['test_maf'], checkIfExists: true)
[ id:'test',case_id:'sample1',control_id:'sample2'], // meta map
file(params.test_data_mskcc['genome_nexus']['sample2_sample1_annotated_maf'], checkIfExists: true)
]
"""
}
Expand All @@ -59,7 +59,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success }

)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,35 @@
"0": [
[
{
"id": "test"
"id": "test",
"case_id": "sample1",
"control_id": "sample2"
},
"test_annotated.maf:md5,4547e768939e82f6d1f44e1c64b64c3a"
"sample2_sample1_annotated.maf:md5,1a6973c12313853c23a7d99d84dc3167"
]
],
"1": [
"versions.yml:md5,faa1aee6ca139f0b49241579881c42e2"
"versions.yml:md5,f0b525b535c5b271f5325cef7920e3ec"
],
"annotated_maf": [
[
{
"id": "test"
"id": "test",
"case_id": "sample1",
"control_id": "sample2"
},
"test_annotated.maf:md5,4547e768939e82f6d1f44e1c64b64c3a"
"sample2_sample1_annotated.maf:md5,1a6973c12313853c23a7d99d84dc3167"
]
],
"versions": [
"versions.yml:md5,faa1aee6ca139f0b49241579881c42e2"
"versions.yml:md5,f0b525b535c5b271f5325cef7920e3ec"
]
}
],
"timestamp": "2024-07-25T11:12:27.03495"
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.2"
},
"timestamp": "2024-09-09T16:13:43.282868154"
}
}
4 changes: 1 addition & 3 deletions modules/msk/genomenexus/vcf2maf/environment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
name: "genomenexus_vcf2maf"
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- "YOUR-TOOL-HERE"
- "genomenexus=version"
6 changes: 3 additions & 3 deletions modules/msk/genomenexus/vcf2maf/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ process GENOMENEXUS_VCF2MAF {
tuple val(meta), path(vcf)

output:
tuple val(meta), path("vcf2maf_output/${meta.id}.maf"), emit: maf
tuple val(meta), path("vcf2maf_output/${meta.control_id}_${meta.case_id}_annotated.maf"), emit: maf
path "versions.yml" , emit: versions

when:
Expand All @@ -30,8 +30,8 @@ process GENOMENEXUS_VCF2MAF {
"""

mkdir vcf2maf_output
touch ${meta.id}.maf
cp ${meta.id}.maf vcf2maf_output/
touch ${meta.control_id}_${meta.case_id}_annotated.maf
cp ${meta.control_id}_${meta.case_id}_annotated.maf vcf2maf_output/
echo '"${task.process}": vcf2maf_lite.py v.0.0.1' > versions.yml
"""
}
4 changes: 2 additions & 2 deletions modules/msk/genomenexus/vcf2maf/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "genomenexus_vcf2maf"

description: First module in genome nexus java pipeline to perform a native conversion of VCF file type to MAF file type using the genomenexus suite of conversion and annotation tools. Genome Nexus is a comprehensive one-stop resource for fast, automated and high-throughput annotation and interpretation of genetic variants in cancer. Genome Nexus integrates information from a variety of existing resources, including databases that convert DNA changes to protein changes, predict the functional effects of protein mutations, and contain information about mutation frequencies, gene function, variant effects, and clinical actionability.
description: DSL2 module to perform a native conversion of VCF file type to MAF file type using the genomenexus suite of conversion and annotation tools.
keywords:
- convert
- vcf
Expand All @@ -11,7 +11,7 @@ keywords:
- genomics
tools:
- "genomenexus":
description: "First module in genome nexus java pipeline to perform a native conversion of VCF file type to MAF file type using the genomenexus suite of conversion and annotation tools. Genome Nexus is a comprehensive one-stop resource for fast, automated and high-throughput annotation and interpretation of genetic variants in cancer. Genome Nexus integrates information from a variety of existing resources, including databases that convert DNA changes to protein changes, predict the functional effects of protein mutations, and contain information about mutation frequencies, gene function, variant effects, and clinical actionability."
description: "DSL2 module to perform a native conversion of VCF file type to MAF file type using the genomenexus suite of conversion and annotation tools."
homepage: "https://github.com/genome-nexus"
documentation: "https://github.com/genome-nexus/.github/blob/main/profile/README.md"

Expand Down
28 changes: 14 additions & 14 deletions modules/msk/genomenexus/vcf2maf/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ nextflow_process {
name "Test Process GENOMENEXUS_VCF2MAF"
script "../main.nf"
process "GENOMENEXUS_VCF2MAF"


tag "modules"
tag "modules_nfcore"
tag "modules_msk"
tag "genomenexus"
tag "genomenexus/vcf2maf"


test("vcf2maf - test") {

when {
process {
"""


input[0] = [
[ id:'test'], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
[ id:'test',case_id:'sample1',control_id:'sample2'], // meta map
file(params.test_data_mskcc['genome_nexus']['sample2_sample1_annotated_vcf'], checkIfExists: true)
]
"""
}
Expand All @@ -32,26 +32,26 @@ nextflow_process {
then {
assertAll(
{ assert process.success }


)
}

}


test("vcf2maf - test - stub") {

options "-stub"

when {
process {
"""


input[0] = [
[ id:'test'], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
[ id:'test',case_id:'sample1',control_id:'sample2'], // meta map
file(params.test_data_mskcc['genome_nexus']['sample2_sample1_annotated_vcf'], checkIfExists: true)
]
"""
}
Expand All @@ -61,7 +61,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }

)
}

Expand Down
18 changes: 13 additions & 5 deletions modules/msk/genomenexus/vcf2maf/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
"0": [
[
{
"id": "test"
"id": "test",
"case_id": "sample1",
"control_id": "sample2"
},
"test.maf:md5,d41d8cd98f00b204e9800998ecf8427e"
"sample2_sample1_annotated.maf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
Expand All @@ -16,16 +18,22 @@
"maf": [
[
{
"id": "test"
"id": "test",
"case_id": "sample1",
"control_id": "sample2"
},
"test.maf:md5,d41d8cd98f00b204e9800998ecf8427e"
"sample2_sample1_annotated.maf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,c60e8688d2d8110c4621c279a710a890"
]
}
],
"timestamp": "2024-06-24T11:56:07.276674"
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.2"
},
"timestamp": "2024-09-06T15:02:51.827835038"
}
}
2 changes: 1 addition & 1 deletion subworkflows/msk/genome_nexus/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ workflow GENOME_NEXUS {


emit:
maf = GENOMENEXUS_VCF2MAF.out.maf // channel: [ val(meta), [ maf ] ]
maf = GENOMENEXUS_ANNOTATIONPIPELINE.out.annotated_maf // channel: [ val(meta), [ maf ] ]
versions = ch_versions // channel: [ versions.yml ]
}

16 changes: 9 additions & 7 deletions subworkflows/msk/genome_nexus/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,33 @@ nextflow_workflow {
tag "subworkflows_nfcore"
tag "subworkflows/genome_nexus"
tag "subworkflows_msk"

tag "genomenexus"
tag "genomenexus/vcf2maf"
tag "genomenexus/annotationpipeline"



test("test - vcf - normal") {

when {
workflow {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)

input[0] = [ [ id:'test',case_id:'sample1',control_id:'sample2'], // meta map
file(params.test_data_mskcc['genome_nexus']['sample2_sample1_annotated_vcf'], checkIfExists: true)
]
"""
}
}



then {
assertAll(
{ assert workflow.success}

)
}
}
}
}
Loading
Loading