From cb85367303eedadda0d0421b80a54235923f26c6 Mon Sep 17 00:00:00 2001 From: maxulysse Date: Tue, 29 Oct 2024 09:40:22 +0100 Subject: [PATCH] rename + bcfann --- tests/annotation_bcfann.nf.test | 40 +++++++++++++++++++ tests/annotation_bcfann.nf.test.snap | 40 +++++++++++++++++++ ...peff.nf.test => annotation_snpeff.nf.test} | 0 ...st.snap => annotation_snpeff.nf.test.snap} | 0 ...ion-vep.nf.test => annotation_vep.nf.test} | 0 ....test.snap => annotation_vep.nf.test.snap} | 0 tests/config/pytesttags.yml | 17 -------- tests/test_annotation_bcfann.yml | 10 ----- 8 files changed, 80 insertions(+), 27 deletions(-) create mode 100644 tests/annotation_bcfann.nf.test create mode 100644 tests/annotation_bcfann.nf.test.snap rename tests/{annotation-snpeff.nf.test => annotation_snpeff.nf.test} (100%) rename tests/{annotation-snpeff.nf.test.snap => annotation_snpeff.nf.test.snap} (100%) rename tests/{annotation-vep.nf.test => annotation_vep.nf.test} (100%) rename tests/{annotation-vep.nf.test.snap => annotation_vep.nf.test.snap} (100%) delete mode 100644 tests/test_annotation_bcfann.yml diff --git a/tests/annotation_bcfann.nf.test b/tests/annotation_bcfann.nf.test new file mode 100644 index 0000000000..a2d5430350 --- /dev/null +++ b/tests/annotation_bcfann.nf.test @@ -0,0 +1,40 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + tag "pipeline_sarek" + + test("Run with profile test | --tools bcfann") { + + when { + params { + modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' + outdir = "$outputDir" + input = "${projectDir}/tests/csv/3.0/vcf_single.csv" + step = 'annotate' + tools = 'bcfann' + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions + removeNextflowVersion("$outputDir/pipeline_info/nf_core_sarek_software_mqc_versions.yml"), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } +} diff --git a/tests/annotation_bcfann.nf.test.snap b/tests/annotation_bcfann.nf.test.snap new file mode 100644 index 0000000000..55238c7522 --- /dev/null +++ b/tests/annotation_bcfann.nf.test.snap @@ -0,0 +1,40 @@ +{ + "Run with profile test | --tools bcfann": { + "content": [ + 2, + { + "BCFTOOLS_ANNOTATE": { + "bcftools": 1.2 + }, + "Workflow": { + "nf-core/sarek": "v3.5.0dev" + } + }, + [ + "annotation", + "annotation/test", + "annotation/test/test_BCF.ann.vcf.gz", + "annotation/test/test_BCF.ann.vcf.gz.tbi", + "csv", + "multiqc", + "multiqc/multiqc_data", + "multiqc/multiqc_data/multiqc.log", + "multiqc/multiqc_data/multiqc_citations.txt", + "multiqc/multiqc_data/multiqc_data.json", + "multiqc/multiqc_data/multiqc_software_versions.txt", + "multiqc/multiqc_data/multiqc_sources.txt", + "multiqc/multiqc_report.html", + "pipeline_info", + "pipeline_info/nf_core_sarek_software_mqc_versions.yml" + ], + [ + "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-29T09:38:54.991004" + } +} \ No newline at end of file diff --git a/tests/annotation-snpeff.nf.test b/tests/annotation_snpeff.nf.test similarity index 100% rename from tests/annotation-snpeff.nf.test rename to tests/annotation_snpeff.nf.test diff --git a/tests/annotation-snpeff.nf.test.snap b/tests/annotation_snpeff.nf.test.snap similarity index 100% rename from tests/annotation-snpeff.nf.test.snap rename to tests/annotation_snpeff.nf.test.snap diff --git a/tests/annotation-vep.nf.test b/tests/annotation_vep.nf.test similarity index 100% rename from tests/annotation-vep.nf.test rename to tests/annotation_vep.nf.test diff --git a/tests/annotation-vep.nf.test.snap b/tests/annotation_vep.nf.test.snap similarity index 100% rename from tests/annotation-vep.nf.test.snap rename to tests/annotation_vep.nf.test.snap diff --git a/tests/config/pytesttags.yml b/tests/config/pytesttags.yml index e1cf0eb7f5..d7fd79258e 100644 --- a/tests/config/pytesttags.yml +++ b/tests/config/pytesttags.yml @@ -441,14 +441,6 @@ tiddit: # annotate -## cache -cache: - - conf/modules/prepare_cache.config - - modules/nf-core/ensemblvep/download/** - - modules/nf-core/snpeff/download/** - - subworkflows/local/prepare_cache/** - - tests/test_annotation_cache.yml - ## merge merge: - conf/modules/annotate.config @@ -461,15 +453,6 @@ merge: - tests/csv/3.0/vcf_single.csv - tests/test_annotation_merge.yml -## bcfann -bcfann: - - conf/modules/annotate.config - - modules/nf-core/bcftools/annotate/** - - modules/nf-core/tabix/bgziptabix/** - - subworkflows/nf-core/vcf_annotate_bcftools/** - - tests/csv/3.0/vcf_single.csv - - tests/test_annotation_bcfann.yml - # postprocessing ## concatenate germline vcfs diff --git a/tests/test_annotation_bcfann.yml b/tests/test_annotation_bcfann.yml deleted file mode 100644 index 99ac781d8e..0000000000 --- a/tests/test_annotation_bcfann.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: Run bcfann - command: nextflow run main.nf -profile test,annotation --tools bcfann --outdir results - tags: - - annotation - - bcfann - files: - - path: results/annotation/test/test_BCF.ann.vcf.gz - # binary changes md5sums on reruns - - path: results/annotation/test/test_BCF.ann.vcf.gz.tbi - # binary changes md5sums on reruns