Skip to content

Commit

Permalink
Use nf-tests for checkQC
Browse files Browse the repository at this point in the history
  • Loading branch information
matrulda committed Oct 18, 2023
1 parent cb012c4 commit 808885c
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 33 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/checkqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process CHECKQC {
label 'process_low'
stageInMode 'copy'
errorStrategy 'ignore'

conda "bioconda::checkqc=3.6.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
Expand Down
40 changes: 40 additions & 0 deletions modules/nf-core/checkqc/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
nextflow_process {

name "Test Process CHECKQC"
script "modules/nf-core/checkqc/main.nf"
process "CHECKQC"
tag "checkqc"
tag "modules"
tag "modules_nfcore"

test("Run checkqc without error") {
config "./test_checkqc.config"

setup {
run("UNTAR") {
script "modules/nf-core/untar/main.nf"
process {
"""
input[0] = Channel.of([ [], file(params.test_data['homo_sapiens']['illumina']['test_interop_bcl2fastqstats_flowcell'], checkIfExists: true)])
"""
}
}
}

when {
process {
"""
input[0] = UNTAR.out.untar.map{ it[1] }
input[1] = []
"""
}
}

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

}

}
21 changes: 21 additions & 0 deletions modules/nf-core/checkqc/tests/main.nf.test.snap

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

2 changes: 2 additions & 0 deletions modules/nf-core/checkqc/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
checkqc:
- modules/nf-core/checkqc/**
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
process {

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


withName: CHECKQC {
ext.args = '--downgrade-errors ReadsPerSampleHandler'
}
}
4 changes: 0 additions & 4 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -708,10 +708,6 @@ checkm/qa:
- modules/nf-core/checkm/qa/**
- tests/modules/nf-core/checkm/qa/**

checkqc:
- modules/nf-core/checkqc/**
- tests/modules/nf-core/checkqc/**

checkv/downloaddatabase:
- modules/nf-core/checkv/downloaddatabase/**
- tests/modules/nf-core/checkv/downloaddatabase/**
Expand Down
2 changes: 2 additions & 0 deletions tests/config/test_data.config
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ params {

varlociraptor_scenario = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/varlociraptor/scenario.yml"

test_interop_bcl2fastqstats_flowcell = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/interop_bcl2fastqstats/test_flowcell_stats.tar.gz"

contig_ploidy_priors_table = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/gatk/contig_ploidy_priors_table.tsv"

purecn_ex1_bam = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/purecn/purecn_ex1.bam"
Expand Down
18 changes: 0 additions & 18 deletions tests/modules/nf-core/checkqc/main.nf

This file was deleted.

9 changes: 0 additions & 9 deletions tests/modules/nf-core/checkqc/test.yml

This file was deleted.

0 comments on commit 808885c

Please sign in to comment.