Skip to content

Commit

Permalink
Remove containers with cache with snpEff too (#3670)
Browse files Browse the repository at this point in the history
* update tests for snpeff

* remove containers in config

* fix cache version in tests

* update meta.yml

* fix meta.yml

* fix meta data

* fix md5sum

* re-enable conda tests
  • Loading branch information
maxulysse authored Jul 25, 2023
1 parent 9f9e1fc commit 4d584d5
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 30 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pytest-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ jobs:
tags: gatk4/determinegermlinecontigploidy
- profile: "conda"
tags: subworkflows/bcl_demultiplex
- profile: "conda"
tags: subworkflows/vcf_annotate_ensemblvep_snpeff
- profile: "conda"
tags: subworkflows/fasta_clean_fcs
- profile: "conda"
Expand Down
6 changes: 5 additions & 1 deletion modules/nf-core/snpeff/download/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: SNPEFF_DOWNLOAD
description: Genetic variant annotation and functional effect prediction toolbox
keywords:
- annotation
- effect prediction
- snpeff
- variant
- vcf
tools:
- snpeff:
description: |
Expand All @@ -21,7 +25,7 @@ input:
description: |
vcf to annotate
- db:
type: value
type: string
description: |
which db to annotate with
output:
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/snpeff/snpeff/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ process SNPEFF_SNPEFF {
input:
tuple val(meta), path(vcf)
val db
path cache
tuple val(meta2), path(cache)

output:
tuple val(meta), path("*.ann.vcf"), emit: vcf
Expand Down
4 changes: 3 additions & 1 deletion modules/nf-core/snpeff/snpeff/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: SNPEFF_SNPEFF
description: Genetic variant annotation and functional effect prediction toolbox
keywords:
- annotation
- variant
- effect prediction
- snpeff
- variant
- vcf
tools:
- snpeff:
description: |
Expand Down
8 changes: 5 additions & 3 deletions tests/modules/nf-core/snpeff/download/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ nextflow.enable.dsl = 2

include { SNPEFF_DOWNLOAD } from '../../../../../modules/nf-core/snpeff/download/main.nf'

workflow test_snpeff_download {
input = [ [ id:'test' ], "WBcel235", "105"]
snpeff_cache_version = "105"
snpeff_genome = "WBcel235"
snpeff_cache_input = Channel.of([[id:"${snpeff_genome}.${snpeff_cache_version}"], snpeff_genome, snpeff_cache_version])

SNPEFF_DOWNLOAD ( input )
workflow test_snpeff_download {
SNPEFF_DOWNLOAD(snpeff_cache_input)
}
17 changes: 13 additions & 4 deletions tests/modules/nf-core/snpeff/snpeff/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

nextflow.enable.dsl = 2

include { SNPEFF_SNPEFF } from '../../../../../modules/nf-core/snpeff/snpeff/main.nf'
include { SNPEFF_DOWNLOAD } from '../../../../../modules/nf-core/snpeff/download/main'
include { SNPEFF_SNPEFF } from '../../../../../modules/nf-core/snpeff/snpeff/main'

snpeff_cache_version = "105"
snpeff_genome = "WBcel235"
snpeff_cache_input = Channel.of([[id:"${snpeff_genome}.${snpeff_cache_version}"], snpeff_genome, snpeff_cache_version])

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

SNPEFF_DOWNLOAD(snpeff_cache_input)

snpeff_cache = SNPEFF_DOWNLOAD.out.cache.first()

SNPEFF_SNPEFF ( input, "WBcel235.105", [] )
SNPEFF_SNPEFF(input, "${snpeff_genome}.${snpeff_cache_version}", snpeff_cache)
}
4 changes: 0 additions & 4 deletions tests/modules/nf-core/snpeff/snpeff/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

withName: SNPEFF_SNPEFF {
container = 'docker.io/nfcore/snpeff:5.1.WBcel235'
}

}
2 changes: 1 addition & 1 deletion tests/modules/nf-core/snpeff/snpeff/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- snpeff/snpeff
files:
- path: output/snpeff/test.ann.vcf
md5sum: e933384e572fc5ed0cce0faf1c0b2cc9
md5sum: 9dc12cf54c78516abf3558672d3746d0
- path: output/snpeff/test.csv
- path: output/snpeff/test.genes.txt
md5sum: 130536bf0237d7f3f746d32aaa32840a
Expand Down
18 changes: 14 additions & 4 deletions tests/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
nextflow.enable.dsl = 2

include { ENSEMBLVEP_DOWNLOAD } from '../../../../modules/nf-core/ensemblvep/download/main'
include { SNPEFF_DOWNLOAD } from '../../../../modules/nf-core/snpeff/download/main'
include { VCF_ANNOTATE_ENSEMBLVEP_SNPEFF } from '../../../../subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/main'

snpeff_cache_version = "105"
snpeff_genome = "WBcel235"
snpeff_cache_input = Channel.of([[id:"${snpeff_genome}.${snpeff_cache_version}"], snpeff_genome, snpeff_cache_version])
vep_cache_version = "110"
vep_genome = "WBcel235"
vep_species = "caenorhabditis_elegans"
Expand Down Expand Up @@ -61,6 +65,10 @@ workflow vcf_annotate_ensemblvep_snpeff_snpeff {
]
])

SNPEFF_DOWNLOAD(snpeff_cache_input)

snpeff_cache = SNPEFF_DOWNLOAD.out.cache.first()

VCF_ANNOTATE_ENSEMBLVEP_SNPEFF (
input,
[[],[]],
Expand All @@ -69,8 +77,8 @@ workflow vcf_annotate_ensemblvep_snpeff_snpeff {
[],
[],
[],
"WBcel235.99",
[],
"${snpeff_genome}.${snpeff_cache_version}",
snpeff_cache,
["snpeff"],
5
)
Expand All @@ -93,7 +101,9 @@ workflow vcf_annotate_ensemblvep_snpeff_both {
])

ENSEMBLVEP_DOWNLOAD(vep_cache_input)
SNPEFF_DOWNLOAD(snpeff_cache_input)

snpeff_cache = SNPEFF_DOWNLOAD.out.cache.first()
vep_cache = ENSEMBLVEP_DOWNLOAD.out.cache.map{ meta, cache -> [cache] }.first()

VCF_ANNOTATE_ENSEMBLVEP_SNPEFF (
Expand All @@ -104,8 +114,8 @@ workflow vcf_annotate_ensemblvep_snpeff_both {
vep_cache_version,
vep_cache,
[],
"WBcel235.99",
[],
"${snpeff_genome}.${snpeff_cache_version}",
snpeff_cache,
["ensemblvep", "snpeff"],
5
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,4 @@ process {
].join(" ")}
}

withName: SNPEFF_SNPEFF {
container = 'docker.io/nfcore/snpeff:5.0.WBcel235'
}

}
17 changes: 13 additions & 4 deletions tests/subworkflows/nf-core/vcf_annotate_snpeff/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

nextflow.enable.dsl = 2

include { VCF_ANNOTATE_SNPEFF } from '../../../../subworkflows/nf-core/vcf_annotate_snpeff/main.nf'
include { SNPEFF_DOWNLOAD } from '../../../../modules/nf-core/snpeff/download/main'
include { VCF_ANNOTATE_SNPEFF } from '../../../../subworkflows/nf-core/vcf_annotate_snpeff/main'

snpeff_cache_version = "105"
snpeff_genome = "WBcel235"
snpeff_cache_input = Channel.of([[id:"${snpeff_genome}.${snpeff_cache_version}"], snpeff_genome, snpeff_cache_version])

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

SNPEFF_DOWNLOAD(snpeff_cache_input)

snpeff_cache = SNPEFF_DOWNLOAD.out.cache.first()

VCF_ANNOTATE_SNPEFF ( input, "WBcel235.99", [] )
VCF_ANNOTATE_SNPEFF ( input, "${snpeff_genome}.${snpeff_cache_version}", snpeff_cache )
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

withName: SNPEFF_SNPEFF {
container = 'docker.io/nfcore/snpeff:5.0.WBcel235'
publishDir = [
path: { "output/snpeff/test/" },
pattern: "*{csv,html,genes.txt}"
Expand Down

0 comments on commit 4d584d5

Please sign in to comment.