Skip to content

Commit

Permalink
move gatk4/svcluster to nf-test (nf-core#4919)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthdsm authored and jennylsmith committed Mar 20, 2024
1 parent 6d4a97b commit cceb02b
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 75 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/gatk4/svcluster/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- bioconda::gatk4=4.4.0.0
- bioconda::gatk4=4.5.0.0
4 changes: 2 additions & 2 deletions modules/nf-core/gatk4/svcluster/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GATK4_SVCLUSTER {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.4.0.0--py36hdfd78af_0':
'biocontainers/gatk4:4.4.0.0--py36hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.5.0.0--py36hdfd78af_0':
'biocontainers/gatk4:4.5.0.0--py36hdfd78af_0' }"

input:
tuple val(meta), path(vcfs), path(indices)
Expand Down
51 changes: 51 additions & 0 deletions modules/nf-core/gatk4/svcluster/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "manta"
tag "manta/germline"
tag "gatk4"
tag "gatk4/svcluster"

test("test_gatk4_svcluster") {
setup {
run("MANTA_GERMLINE") {
script "../../../manta/germline/main.nf"
process {
"""
input[0] = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), [], []])
input[1] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)])
input[2] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)])
input[3] = []
"""
}
}
}

when {
process {
"""
input[0] = MANTA_GERMLINE.out.diploid_sv_vcf.combine(MANTA_GERMLINE.out.diploid_sv_vcf_tbi, by: 0)
input[1] = file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/svcluster/samples_ploidy.tsv", checkIfExists:true)
input[2] = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true))
input[3] = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true))
input[4] = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true))
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.clustered_vcf.get(0).get(1)).name,
process.out.clustered_vcf_index.get(0).get(1),
).match("test_gatk4_svcluster") }
)
}
}
}
13 changes: 13 additions & 0 deletions modules/nf-core/gatk4/svcluster/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions modules/nf-core/gatk4/svcluster/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
process {
withName: MANTA_GERMLINE {
enabled: false
]
}
}
3 changes: 3 additions & 0 deletions modules/nf-core/gatk4/svcluster/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gatk4/svcluster:
- "modules/nf-core/gatk4/svcluster/**"
- "modules/nf-core/manta/germline/**"
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -858,9 +858,6 @@ gatk4/splitcram:
gatk4/splitintervals:
- modules/nf-core/gatk4/splitintervals/**
- tests/modules/nf-core/gatk4/splitintervals/**
gatk4/svcluster:
- modules/nf-core/gatk4/svcluster/**
- tests/modules/nf-core/gatk4/svcluster/**
gatk4/variantfiltration:
- modules/nf-core/gatk4/variantfiltration/**
- tests/modules/nf-core/gatk4/variantfiltration/**
Expand Down
48 changes: 0 additions & 48 deletions tests/modules/nf-core/gatk4/svcluster/main.nf

This file was deleted.

11 changes: 0 additions & 11 deletions tests/modules/nf-core/gatk4/svcluster/nextflow.config

This file was deleted.

10 changes: 0 additions & 10 deletions tests/modules/nf-core/gatk4/svcluster/test.yml

This file was deleted.

0 comments on commit cceb02b

Please sign in to comment.