diff --git a/CHANGELOG.md b/CHANGELOG.md index 38b5a04a0f..45337c089f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [1692](https://github.com/nf-core/sarek/pull/1692) - Update ensemblvep - [1695](https://github.com/nf-core/sarek/pull/1695) - Update all modules - [1707](https://github.com/nf-core/sarek/pull/1707) - Un-hide parameters and clean up Json schema +- [1708](https://github.com/nf-core/sarek/pull/1708) - Migrate pipeline pytest alignment and annotation tests to nf-test ### Fixed diff --git a/conf/test.config b/conf/test.config index b934f7749d..5f38bfd90d 100644 --- a/conf/test.config +++ b/conf/test.config @@ -22,13 +22,13 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Base directory for nf-core/modules test data - modules_testdata_base_path = 's3://ngi-igenomes/testdata/nf-core/modules/' + modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' // Input data input = "${projectDir}/tests/csv/3.0/fastq_single.csv" // small genome on igenomes - igenomes_base = 's3://ngi-igenomes/testdata/nf-core/modules' + igenomes_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' genome = 'testdata.nf-core.sarek' // Small reference genome diff --git a/subworkflows/local/samplesheet_to_channel/tests/main.nf.test.snap b/subworkflows/local/samplesheet_to_channel/tests/main.nf.test.snap index 758041c999..19fcc95d66 100644 --- a/subworkflows/local/samplesheet_to_channel/tests/main.nf.test.snap +++ b/subworkflows/local/samplesheet_to_channel/tests/main.nf.test.snap @@ -16,8 +16,8 @@ "size": 1 }, [ - "/ngi-igenomes/testdata/nf-core/modules/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz", - "/ngi-igenomes/testdata/nf-core/modules/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz" + "/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz", + "/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz" ] ] ], @@ -35,8 +35,8 @@ "size": 1 }, [ - "/ngi-igenomes/testdata/nf-core/modules/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz", - "/ngi-igenomes/testdata/nf-core/modules/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz" + "/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz", + "/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz" ] ] ] @@ -48,4 +48,4 @@ }, "timestamp": "2024-10-04T10:25:14.620549" } -} \ No newline at end of file +} diff --git a/tests/.nftignore b/tests/.nftignore index b051a8987f..6996d5ea9c 100644 --- a/tests/.nftignore +++ b/tests/.nftignore @@ -18,4 +18,6 @@ reference/dragmap/hash_table_stats.txt reports/EnsemblVEP/*/*.ann.summary.html reports/fastqc/**/*_fastqc.{html,zip} reports/markduplicates/**/*.md.cram.metrics +reports/snpeff/*/*_snpEff.csv +reports/snpeff/*/snpEff_summary.html variant_calling/**/*.vcf.{gz,gz.tbi} diff --git a/tests/alignment_from_everything.nf.test b/tests/alignment_from_everything.nf.test new file mode 100644 index 0000000000..92f9ef56c8 --- /dev/null +++ b/tests/alignment_from_everything.nf.test @@ -0,0 +1,46 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + tag "pipeline_sarek" + profile "alignment_from_everything" + + test("Run with profile test,alignment_from_everything | --save_mapped --save_output_as_bam") { + + when { + params { + modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' + igenomes_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data' + outdir = "$outputDir" + save_mapped = true + save_output_as_bam = true + } + } + + 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') + // cram_files: All cram files + def cram_files = getAllFilesFromDir(params.outdir, include: ['**/*.cram']) + def fasta = params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta' + 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, + // All cram files + cram_files.collect{ file -> [ file.getName(), cram(file.toString(), fasta).getReadsMD5() ] } + ).match() } + ) + } + } +} diff --git a/tests/alignment_from_everything.nf.test.snap b/tests/alignment_from_everything.nf.test.snap new file mode 100644 index 0000000000..4143f16eaf --- /dev/null +++ b/tests/alignment_from_everything.nf.test.snap @@ -0,0 +1,337 @@ +{ + "Run with profile test,alignment_from_everything | --save_mapped --save_output_as_bam": { + "content": [ + 27, + { + "BCFTOOLS_STATS": { + "bcftools": 1.2 + }, + "BWAMEM1_MEM": { + "bwa": "0.7.18-r1243-dirty", + "samtools": 1.2 + }, + "CRAM_TO_BAM": { + "samtools": 1.21 + }, + "CRAM_TO_BAM_RECAL": { + "samtools": 1.21 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_MARKDUPLICATES": { + "gatk4": "4.5.0.0", + "samtools": "1.19.2" + }, + "INDEX_CRAM": { + "samtools": 1.21 + }, + "INDEX_MERGE_BAM": { + "samtools": 1.21 + }, + "MERGE_BAM": { + "samtools": 1.21 + }, + "MOSDEPTH": { + "mosdepth": "0.3.8" + }, + "SAMTOOLS_STATS": { + "samtools": 1.21 + }, + "STRELKA_SINGLE": { + "strelka": "2.9.10" + }, + "VCFTOOLS_TSTV_COUNT": { + "vcftools": "0.1.16" + }, + "Workflow": { + "nf-core/sarek": "v3.5.0dev" + } + }, + [ + "csv", + "csv/mapped.csv", + "csv/markduplicates.csv", + "csv/markduplicates_no_table.csv", + "csv/recalibrated.csv", + "csv/variantcalled.csv", + "multiqc", + "multiqc/multiqc_data", + "multiqc/multiqc_data/bcftools_stats_indel-lengths.txt", + "multiqc/multiqc_data/bcftools_stats_vqc_Count_Indels.txt", + "multiqc/multiqc_data/bcftools_stats_vqc_Count_SNP.txt", + "multiqc/multiqc_data/bcftools_stats_vqc_Count_Transitions.txt", + "multiqc/multiqc_data/bcftools_stats_vqc_Count_Transversions.txt", + "multiqc/multiqc_data/fastqc-status-check-heatmap.txt", + "multiqc/multiqc_data/fastqc_adapter_content_plot.txt", + "multiqc/multiqc_data/fastqc_per_base_n_content_plot.txt", + "multiqc/multiqc_data/fastqc_per_base_sequence_quality_plot.txt", + "multiqc/multiqc_data/fastqc_per_sequence_gc_content_plot_Counts.txt", + "multiqc/multiqc_data/fastqc_per_sequence_gc_content_plot_Percentages.txt", + "multiqc/multiqc_data/fastqc_per_sequence_quality_scores_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_counts_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_duplication_levels_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_length_distribution_plot.txt", + "multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt", + "multiqc/multiqc_data/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.txt", + "multiqc/multiqc_data/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.txt", + "multiqc/multiqc_data/gatk-base-recalibrator-reported-empirical-plot.txt", + "multiqc/multiqc_data/gatk_base_recalibrator.txt", + "multiqc/multiqc_data/mosdepth-coverage-per-contig-single.txt", + "multiqc/multiqc_data/mosdepth-cumcoverage-dist-id.txt", + "multiqc/multiqc_data/mosdepth_cov_dist.txt", + "multiqc/multiqc_data/mosdepth_cumcov_dist.txt", + "multiqc/multiqc_data/mosdepth_perchrom.txt", + "multiqc/multiqc_data/multiqc.log", + "multiqc/multiqc_data/multiqc_bcftools_stats.txt", + "multiqc/multiqc_data/multiqc_citations.txt", + "multiqc/multiqc_data/multiqc_data.json", + "multiqc/multiqc_data/multiqc_fastqc.txt", + "multiqc/multiqc_data/multiqc_general_stats.txt", + "multiqc/multiqc_data/multiqc_picard_dups.txt", + "multiqc/multiqc_data/multiqc_samtools_stats.txt", + "multiqc/multiqc_data/multiqc_software_versions.txt", + "multiqc/multiqc_data/multiqc_sources.txt", + "multiqc/multiqc_data/picard_deduplication.txt", + "multiqc/multiqc_data/picard_histogram.txt", + "multiqc/multiqc_data/picard_histogram_1.txt", + "multiqc/multiqc_data/picard_histogram_2.txt", + "multiqc/multiqc_data/samtools-stats-dp.txt", + "multiqc/multiqc_data/samtools_alignment_plot.txt", + "multiqc/multiqc_data/vcftools_tstv_by_count.txt", + "multiqc/multiqc_data/vcftools_tstv_by_qual.txt", + "multiqc/multiqc_plots", + "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_indel-lengths.pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_vqc_Count_Indels.pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_vqc_Count_SNP.pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_vqc_Count_Transitions.pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_vqc_Count_Transversions.pdf", + "multiqc/multiqc_plots/pdf/fastqc-status-check-heatmap.pdf", + "multiqc/multiqc_plots/pdf/fastqc_adapter_content_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_base_n_content_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_base_sequence_quality_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_gc_content_plot_Counts.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_gc_content_plot_Percentages.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_quality_scores_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_counts_plot-cnt.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_counts_plot-pct.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_duplication_levels_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_length_distribution_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_top_overrepresented_sequences_table.pdf", + "multiqc/multiqc_plots/pdf/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.pdf", + "multiqc/multiqc_plots/pdf/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.pdf", + "multiqc/multiqc_plots/pdf/gatk-base-recalibrator-reported-empirical-plot.pdf", + "multiqc/multiqc_plots/pdf/general_stats_table.pdf", + "multiqc/multiqc_plots/pdf/mosdepth-coverage-per-contig-single-cnt.pdf", + "multiqc/multiqc_plots/pdf/mosdepth-coverage-per-contig-single-pct.pdf", + "multiqc/multiqc_plots/pdf/mosdepth-cumcoverage-dist-id.pdf", + "multiqc/multiqc_plots/pdf/picard_deduplication-cnt.pdf", + "multiqc/multiqc_plots/pdf/picard_deduplication-pct.pdf", + "multiqc/multiqc_plots/pdf/samtools-stats-dp.pdf", + "multiqc/multiqc_plots/pdf/samtools_alignment_plot-cnt.pdf", + "multiqc/multiqc_plots/pdf/samtools_alignment_plot-pct.pdf", + "multiqc/multiqc_plots/pdf/vcftools_tstv_by_count.pdf", + "multiqc/multiqc_plots/pdf/vcftools_tstv_by_qual.pdf", + "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/bcftools_stats_indel-lengths.png", + "multiqc/multiqc_plots/png/bcftools_stats_vqc_Count_Indels.png", + "multiqc/multiqc_plots/png/bcftools_stats_vqc_Count_SNP.png", + "multiqc/multiqc_plots/png/bcftools_stats_vqc_Count_Transitions.png", + "multiqc/multiqc_plots/png/bcftools_stats_vqc_Count_Transversions.png", + "multiqc/multiqc_plots/png/fastqc-status-check-heatmap.png", + "multiqc/multiqc_plots/png/fastqc_adapter_content_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_base_n_content_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_base_sequence_quality_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_gc_content_plot_Counts.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_gc_content_plot_Percentages.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_quality_scores_plot.png", + "multiqc/multiqc_plots/png/fastqc_sequence_counts_plot-cnt.png", + "multiqc/multiqc_plots/png/fastqc_sequence_counts_plot-pct.png", + "multiqc/multiqc_plots/png/fastqc_sequence_duplication_levels_plot.png", + "multiqc/multiqc_plots/png/fastqc_sequence_length_distribution_plot.png", + "multiqc/multiqc_plots/png/fastqc_top_overrepresented_sequences_table.png", + "multiqc/multiqc_plots/png/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.png", + "multiqc/multiqc_plots/png/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.png", + "multiqc/multiqc_plots/png/gatk-base-recalibrator-reported-empirical-plot.png", + "multiqc/multiqc_plots/png/general_stats_table.png", + "multiqc/multiqc_plots/png/mosdepth-coverage-per-contig-single-cnt.png", + "multiqc/multiqc_plots/png/mosdepth-coverage-per-contig-single-pct.png", + "multiqc/multiqc_plots/png/mosdepth-cumcoverage-dist-id.png", + "multiqc/multiqc_plots/png/picard_deduplication-cnt.png", + "multiqc/multiqc_plots/png/picard_deduplication-pct.png", + "multiqc/multiqc_plots/png/samtools-stats-dp.png", + "multiqc/multiqc_plots/png/samtools_alignment_plot-cnt.png", + "multiqc/multiqc_plots/png/samtools_alignment_plot-pct.png", + "multiqc/multiqc_plots/png/vcftools_tstv_by_count.png", + "multiqc/multiqc_plots/png/vcftools_tstv_by_qual.png", + "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/bcftools_stats_indel-lengths.svg", + "multiqc/multiqc_plots/svg/bcftools_stats_vqc_Count_Indels.svg", + "multiqc/multiqc_plots/svg/bcftools_stats_vqc_Count_SNP.svg", + "multiqc/multiqc_plots/svg/bcftools_stats_vqc_Count_Transitions.svg", + "multiqc/multiqc_plots/svg/bcftools_stats_vqc_Count_Transversions.svg", + "multiqc/multiqc_plots/svg/fastqc-status-check-heatmap.svg", + "multiqc/multiqc_plots/svg/fastqc_adapter_content_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_base_n_content_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_base_sequence_quality_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_gc_content_plot_Counts.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_gc_content_plot_Percentages.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_quality_scores_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_counts_plot-cnt.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_counts_plot-pct.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_duplication_levels_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_length_distribution_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_top_overrepresented_sequences_table.svg", + "multiqc/multiqc_plots/svg/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.svg", + "multiqc/multiqc_plots/svg/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.svg", + "multiqc/multiqc_plots/svg/gatk-base-recalibrator-reported-empirical-plot.svg", + "multiqc/multiqc_plots/svg/general_stats_table.svg", + "multiqc/multiqc_plots/svg/mosdepth-coverage-per-contig-single-cnt.svg", + "multiqc/multiqc_plots/svg/mosdepth-coverage-per-contig-single-pct.svg", + "multiqc/multiqc_plots/svg/mosdepth-cumcoverage-dist-id.svg", + "multiqc/multiqc_plots/svg/picard_deduplication-cnt.svg", + "multiqc/multiqc_plots/svg/picard_deduplication-pct.svg", + "multiqc/multiqc_plots/svg/samtools-stats-dp.svg", + "multiqc/multiqc_plots/svg/samtools_alignment_plot-cnt.svg", + "multiqc/multiqc_plots/svg/samtools_alignment_plot-pct.svg", + "multiqc/multiqc_plots/svg/vcftools_tstv_by_count.svg", + "multiqc/multiqc_plots/svg/vcftools_tstv_by_qual.svg", + "multiqc/multiqc_report.html", + "pipeline_info", + "pipeline_info/nf_core_sarek_software_mqc_versions.yml", + "preprocessing", + "preprocessing/mapped", + "preprocessing/mapped/test", + "preprocessing/mapped/test/test.sorted.bam", + "preprocessing/mapped/test/test.sorted.bam.bai", + "preprocessing/markduplicates", + "preprocessing/markduplicates/test", + "preprocessing/markduplicates/test/test.md.bam", + "preprocessing/markduplicates/test/test.md.bam.bai", + "preprocessing/recal_table", + "preprocessing/recal_table/test", + "preprocessing/recal_table/test/test.recal.table", + "preprocessing/recalibrated", + "preprocessing/recalibrated/test", + "preprocessing/recalibrated/test/test.recal.bam", + "preprocessing/recalibrated/test/test.recal.bam.bai", + "reference", + "reports", + "reports/bcftools", + "reports/bcftools/strelka", + "reports/bcftools/strelka/test", + "reports/bcftools/strelka/test/test.strelka.variants.bcftools_stats.txt", + "reports/fastqc", + "reports/fastqc/test-test_L1", + "reports/fastqc/test-test_L1/test-test_L1_1_fastqc.html", + "reports/fastqc/test-test_L1/test-test_L1_1_fastqc.zip", + "reports/fastqc/test-test_L1/test-test_L1_2_fastqc.html", + "reports/fastqc/test-test_L1/test-test_L1_2_fastqc.zip", + "reports/fastqc/test-test_L2", + "reports/fastqc/test-test_L2/test-test_L2_1_fastqc.html", + "reports/fastqc/test-test_L2/test-test_L2_1_fastqc.zip", + "reports/fastqc/test-test_L2/test-test_L2_2_fastqc.html", + "reports/fastqc/test-test_L2/test-test_L2_2_fastqc.zip", + "reports/markduplicates", + "reports/markduplicates/test", + "reports/markduplicates/test/test.md.cram.metrics", + "reports/mosdepth", + "reports/mosdepth/test", + "reports/mosdepth/test/test.md.mosdepth.global.dist.txt", + "reports/mosdepth/test/test.md.mosdepth.region.dist.txt", + "reports/mosdepth/test/test.md.mosdepth.summary.txt", + "reports/mosdepth/test/test.md.regions.bed.gz", + "reports/mosdepth/test/test.md.regions.bed.gz.csi", + "reports/mosdepth/test/test.recal.mosdepth.global.dist.txt", + "reports/mosdepth/test/test.recal.mosdepth.region.dist.txt", + "reports/mosdepth/test/test.recal.mosdepth.summary.txt", + "reports/mosdepth/test/test.recal.regions.bed.gz", + "reports/mosdepth/test/test.recal.regions.bed.gz.csi", + "reports/samtools", + "reports/samtools/test", + "reports/samtools/test/test.md.cram.stats", + "reports/samtools/test/test.recal.cram.stats", + "reports/vcftools", + "reports/vcftools/strelka", + "reports/vcftools/strelka/test", + "reports/vcftools/strelka/test/test.strelka.variants.FILTER.summary", + "reports/vcftools/strelka/test/test.strelka.variants.TsTv.count", + "reports/vcftools/strelka/test/test.strelka.variants.TsTv.qual", + "variant_calling", + "variant_calling/strelka", + "variant_calling/strelka/test", + "variant_calling/strelka/test/test.strelka.genome.vcf.gz", + "variant_calling/strelka/test/test.strelka.genome.vcf.gz.tbi", + "variant_calling/strelka/test/test.strelka.variants.vcf.gz", + "variant_calling/strelka/test/test.strelka.variants.vcf.gz.tbi" + ], + [ + "bcftools_stats_indel-lengths.txt:md5,deccb75341ca46a6f09658f7fd9e348b", + "bcftools_stats_vqc_Count_Indels.txt:md5,7b2a64880b653ccf0400ed9073e290dd", + "bcftools_stats_vqc_Count_SNP.txt:md5,72e934e0e8ed9b9712105bbd66dd9ffd", + "bcftools_stats_vqc_Count_Transitions.txt:md5,72e934e0e8ed9b9712105bbd66dd9ffd", + "bcftools_stats_vqc_Count_Transversions.txt:md5,72e934e0e8ed9b9712105bbd66dd9ffd", + "fastqc-status-check-heatmap.txt:md5,a020b9689ddeb4abec16b4854fe452f1", + "fastqc_adapter_content_plot.txt:md5,2e1b72be741319e7fadbbb39d7e5b37d", + "fastqc_per_base_n_content_plot.txt:md5,ad3b971a6bb4e8ba6c844c8a03584eb8", + "fastqc_per_base_sequence_quality_plot.txt:md5,1bc03889d243a944253ac637d81ae10c", + "fastqc_per_sequence_gc_content_plot_Counts.txt:md5,2c42d140ce06c08dad2b58f397c23239", + "fastqc_per_sequence_gc_content_plot_Percentages.txt:md5,59e22821d350bfb97c37ffd9088f5ad9", + "fastqc_per_sequence_quality_scores_plot.txt:md5,f33615cc98bb6225f39545a415fa7c0f", + "fastqc_sequence_counts_plot.txt:md5,7f0f19a58e8e54e792a751fd04a9ae13", + "fastqc_sequence_duplication_levels_plot.txt:md5,92b02e250ff78725deb9a10d510fcecc", + "fastqc_sequence_length_distribution_plot.txt:md5,fb04dce68ec566314125bc9438211b28", + "fastqc_top_overrepresented_sequences_table.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.txt:md5,20b2630a7400c9c279bf8c0c66341f7d", + "gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.txt:md5,b9b943621e50c7f3e75a37871667d5ed", + "mosdepth-coverage-per-contig-single.txt:md5,264db67a99d2c90ea7b075e33c201b77", + "mosdepth-cumcoverage-dist-id.txt:md5,5235e965da7ebe3bfebb24ffa88defff", + "mosdepth_cov_dist.txt:md5,8d0d7cb485a7bffb07da17b28f827120", + "mosdepth_cumcov_dist.txt:md5,8d0d7cb485a7bffb07da17b28f827120", + "mosdepth_perchrom.txt:md5,264db67a99d2c90ea7b075e33c201b77", + "multiqc_bcftools_stats.txt:md5,103ba59d44fc60e9308e64bbd0d0e504", + "multiqc_citations.txt:md5,ace4ca89138a5f1e2be289c157c00bd9", + "multiqc_fastqc.txt:md5,bde0d0bffa62228b33fb68b7e25b6ff8", + "multiqc_samtools_stats.txt:md5,0f1e4c6c497d9a952765f9f3068ea4b9", + "picard_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "picard_histogram_1.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "picard_histogram_2.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "samtools-stats-dp.txt:md5,c94f4d3ffa3f510552f90e173fdd9f9d", + "samtools_alignment_plot.txt:md5,717f499a3543e7ee4c7a8454bf80aeca", + "vcftools_tstv_by_count.txt:md5,50efc5214fe2c39f21efb66a710d2ed6", + "vcftools_tstv_by_qual.txt:md5,911bc05c5169149dbb0b068f65b4274a", + "test.strelka.variants.bcftools_stats.txt:md5,86bd4938eed920d36f3f5937102a2967", + "test.md.mosdepth.global.dist.txt:md5,b61e1acee11a6ddf7ce3232a5948a6a0", + "test.md.mosdepth.region.dist.txt:md5,1a382f98d488d2ae3df83a0d87caafc1", + "test.md.mosdepth.summary.txt:md5,839108358878ada89e1eaddf6e0541ba", + "test.md.regions.bed.gz:md5,6fdaec99e739dc0f47fe55dd64dfe93e", + "test.md.regions.bed.gz.csi:md5,5f9c60279af78e3aeafc96a8c11fb35f", + "test.recal.mosdepth.global.dist.txt:md5,b61e1acee11a6ddf7ce3232a5948a6a0", + "test.recal.mosdepth.region.dist.txt:md5,1a382f98d488d2ae3df83a0d87caafc1", + "test.recal.mosdepth.summary.txt:md5,839108358878ada89e1eaddf6e0541ba", + "test.recal.regions.bed.gz:md5,6fdaec99e739dc0f47fe55dd64dfe93e", + "test.recal.regions.bed.gz.csi:md5,5f9c60279af78e3aeafc96a8c11fb35f", + "test.md.cram.stats:md5,7d19da3fc342afe0884c944f97a578b1", + "test.recal.cram.stats:md5,820d123e746d1abdc90fd8710828082e", + "test.strelka.variants.FILTER.summary:md5,ad417bc96d31223f61170987975d8128", + "test.strelka.variants.TsTv.count:md5,fa27f678965b7cba6a92efcd039f802a", + "test.strelka.variants.TsTv.qual:md5,bc68ae4e688e9fb772b457069e604883" + ], + [ + + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-29T08:21:45.439696" + } +} diff --git a/tests/alignment_to_fastq.nf.test b/tests/alignment_to_fastq.nf.test new file mode 100644 index 0000000000..a7288ef998 --- /dev/null +++ b/tests/alignment_to_fastq.nf.test @@ -0,0 +1,46 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + tag "pipeline_sarek" + profile "alignment_to_fastq" + + test("Run with profile test,alignment_to_fastq") { + + when { + params { + modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' + igenomes_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data' + outdir = "$outputDir" + save_mapped = true + save_output_as_bam = true + } + } + + 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') + // cram_files: All cram files + def cram_files = getAllFilesFromDir(params.outdir, include: ['**/*.cram']) + def fasta = params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta' + 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, + // All cram files + cram_files.collect{ file -> [ file.getName(), cram(file.toString(), fasta).getReadsMD5() ] } + ).match() } + ) + } + } +} diff --git a/tests/alignment_to_fastq.nf.test.snap b/tests/alignment_to_fastq.nf.test.snap new file mode 100644 index 0000000000..1c0051bd95 --- /dev/null +++ b/tests/alignment_to_fastq.nf.test.snap @@ -0,0 +1,337 @@ +{ + "Run with profile test,alignment_to_fastq": { + "content": [ + 27, + { + "BCFTOOLS_STATS": { + "bcftools": 1.2 + }, + "BWAMEM1_MEM": { + "bwa": "0.7.18-r1243-dirty", + "samtools": 1.2 + }, + "CRAM_TO_BAM": { + "samtools": 1.21 + }, + "CRAM_TO_BAM_RECAL": { + "samtools": 1.21 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_MARKDUPLICATES": { + "gatk4": "4.5.0.0", + "samtools": "1.19.2" + }, + "INDEX_CRAM": { + "samtools": 1.21 + }, + "INDEX_MERGE_BAM": { + "samtools": 1.21 + }, + "MERGE_BAM": { + "samtools": 1.21 + }, + "MOSDEPTH": { + "mosdepth": "0.3.8" + }, + "SAMTOOLS_STATS": { + "samtools": 1.21 + }, + "STRELKA_SINGLE": { + "strelka": "2.9.10" + }, + "VCFTOOLS_TSTV_COUNT": { + "vcftools": "0.1.16" + }, + "Workflow": { + "nf-core/sarek": "v3.5.0dev" + } + }, + [ + "csv", + "csv/mapped.csv", + "csv/markduplicates.csv", + "csv/markduplicates_no_table.csv", + "csv/recalibrated.csv", + "csv/variantcalled.csv", + "multiqc", + "multiqc/multiqc_data", + "multiqc/multiqc_data/bcftools_stats_indel-lengths.txt", + "multiqc/multiqc_data/bcftools_stats_vqc_Count_Indels.txt", + "multiqc/multiqc_data/bcftools_stats_vqc_Count_SNP.txt", + "multiqc/multiqc_data/bcftools_stats_vqc_Count_Transitions.txt", + "multiqc/multiqc_data/bcftools_stats_vqc_Count_Transversions.txt", + "multiqc/multiqc_data/fastqc-status-check-heatmap.txt", + "multiqc/multiqc_data/fastqc_adapter_content_plot.txt", + "multiqc/multiqc_data/fastqc_per_base_n_content_plot.txt", + "multiqc/multiqc_data/fastqc_per_base_sequence_quality_plot.txt", + "multiqc/multiqc_data/fastqc_per_sequence_gc_content_plot_Counts.txt", + "multiqc/multiqc_data/fastqc_per_sequence_gc_content_plot_Percentages.txt", + "multiqc/multiqc_data/fastqc_per_sequence_quality_scores_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_counts_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_duplication_levels_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_length_distribution_plot.txt", + "multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt", + "multiqc/multiqc_data/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.txt", + "multiqc/multiqc_data/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.txt", + "multiqc/multiqc_data/gatk-base-recalibrator-reported-empirical-plot.txt", + "multiqc/multiqc_data/gatk_base_recalibrator.txt", + "multiqc/multiqc_data/mosdepth-coverage-per-contig-single.txt", + "multiqc/multiqc_data/mosdepth-cumcoverage-dist-id.txt", + "multiqc/multiqc_data/mosdepth_cov_dist.txt", + "multiqc/multiqc_data/mosdepth_cumcov_dist.txt", + "multiqc/multiqc_data/mosdepth_perchrom.txt", + "multiqc/multiqc_data/multiqc.log", + "multiqc/multiqc_data/multiqc_bcftools_stats.txt", + "multiqc/multiqc_data/multiqc_citations.txt", + "multiqc/multiqc_data/multiqc_data.json", + "multiqc/multiqc_data/multiqc_fastqc.txt", + "multiqc/multiqc_data/multiqc_general_stats.txt", + "multiqc/multiqc_data/multiqc_picard_dups.txt", + "multiqc/multiqc_data/multiqc_samtools_stats.txt", + "multiqc/multiqc_data/multiqc_software_versions.txt", + "multiqc/multiqc_data/multiqc_sources.txt", + "multiqc/multiqc_data/picard_deduplication.txt", + "multiqc/multiqc_data/picard_histogram.txt", + "multiqc/multiqc_data/picard_histogram_1.txt", + "multiqc/multiqc_data/picard_histogram_2.txt", + "multiqc/multiqc_data/samtools-stats-dp.txt", + "multiqc/multiqc_data/samtools_alignment_plot.txt", + "multiqc/multiqc_data/vcftools_tstv_by_count.txt", + "multiqc/multiqc_data/vcftools_tstv_by_qual.txt", + "multiqc/multiqc_plots", + "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_indel-lengths.pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_vqc_Count_Indels.pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_vqc_Count_SNP.pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_vqc_Count_Transitions.pdf", + "multiqc/multiqc_plots/pdf/bcftools_stats_vqc_Count_Transversions.pdf", + "multiqc/multiqc_plots/pdf/fastqc-status-check-heatmap.pdf", + "multiqc/multiqc_plots/pdf/fastqc_adapter_content_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_base_n_content_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_base_sequence_quality_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_gc_content_plot_Counts.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_gc_content_plot_Percentages.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_quality_scores_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_counts_plot-cnt.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_counts_plot-pct.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_duplication_levels_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_length_distribution_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_top_overrepresented_sequences_table.pdf", + "multiqc/multiqc_plots/pdf/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.pdf", + "multiqc/multiqc_plots/pdf/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.pdf", + "multiqc/multiqc_plots/pdf/gatk-base-recalibrator-reported-empirical-plot.pdf", + "multiqc/multiqc_plots/pdf/general_stats_table.pdf", + "multiqc/multiqc_plots/pdf/mosdepth-coverage-per-contig-single-cnt.pdf", + "multiqc/multiqc_plots/pdf/mosdepth-coverage-per-contig-single-pct.pdf", + "multiqc/multiqc_plots/pdf/mosdepth-cumcoverage-dist-id.pdf", + "multiqc/multiqc_plots/pdf/picard_deduplication-cnt.pdf", + "multiqc/multiqc_plots/pdf/picard_deduplication-pct.pdf", + "multiqc/multiqc_plots/pdf/samtools-stats-dp.pdf", + "multiqc/multiqc_plots/pdf/samtools_alignment_plot-cnt.pdf", + "multiqc/multiqc_plots/pdf/samtools_alignment_plot-pct.pdf", + "multiqc/multiqc_plots/pdf/vcftools_tstv_by_count.pdf", + "multiqc/multiqc_plots/pdf/vcftools_tstv_by_qual.pdf", + "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/bcftools_stats_indel-lengths.png", + "multiqc/multiqc_plots/png/bcftools_stats_vqc_Count_Indels.png", + "multiqc/multiqc_plots/png/bcftools_stats_vqc_Count_SNP.png", + "multiqc/multiqc_plots/png/bcftools_stats_vqc_Count_Transitions.png", + "multiqc/multiqc_plots/png/bcftools_stats_vqc_Count_Transversions.png", + "multiqc/multiqc_plots/png/fastqc-status-check-heatmap.png", + "multiqc/multiqc_plots/png/fastqc_adapter_content_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_base_n_content_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_base_sequence_quality_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_gc_content_plot_Counts.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_gc_content_plot_Percentages.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_quality_scores_plot.png", + "multiqc/multiqc_plots/png/fastqc_sequence_counts_plot-cnt.png", + "multiqc/multiqc_plots/png/fastqc_sequence_counts_plot-pct.png", + "multiqc/multiqc_plots/png/fastqc_sequence_duplication_levels_plot.png", + "multiqc/multiqc_plots/png/fastqc_sequence_length_distribution_plot.png", + "multiqc/multiqc_plots/png/fastqc_top_overrepresented_sequences_table.png", + "multiqc/multiqc_plots/png/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.png", + "multiqc/multiqc_plots/png/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.png", + "multiqc/multiqc_plots/png/gatk-base-recalibrator-reported-empirical-plot.png", + "multiqc/multiqc_plots/png/general_stats_table.png", + "multiqc/multiqc_plots/png/mosdepth-coverage-per-contig-single-cnt.png", + "multiqc/multiqc_plots/png/mosdepth-coverage-per-contig-single-pct.png", + "multiqc/multiqc_plots/png/mosdepth-cumcoverage-dist-id.png", + "multiqc/multiqc_plots/png/picard_deduplication-cnt.png", + "multiqc/multiqc_plots/png/picard_deduplication-pct.png", + "multiqc/multiqc_plots/png/samtools-stats-dp.png", + "multiqc/multiqc_plots/png/samtools_alignment_plot-cnt.png", + "multiqc/multiqc_plots/png/samtools_alignment_plot-pct.png", + "multiqc/multiqc_plots/png/vcftools_tstv_by_count.png", + "multiqc/multiqc_plots/png/vcftools_tstv_by_qual.png", + "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/bcftools_stats_indel-lengths.svg", + "multiqc/multiqc_plots/svg/bcftools_stats_vqc_Count_Indels.svg", + "multiqc/multiqc_plots/svg/bcftools_stats_vqc_Count_SNP.svg", + "multiqc/multiqc_plots/svg/bcftools_stats_vqc_Count_Transitions.svg", + "multiqc/multiqc_plots/svg/bcftools_stats_vqc_Count_Transversions.svg", + "multiqc/multiqc_plots/svg/fastqc-status-check-heatmap.svg", + "multiqc/multiqc_plots/svg/fastqc_adapter_content_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_base_n_content_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_base_sequence_quality_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_gc_content_plot_Counts.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_gc_content_plot_Percentages.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_quality_scores_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_counts_plot-cnt.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_counts_plot-pct.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_duplication_levels_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_length_distribution_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_top_overrepresented_sequences_table.svg", + "multiqc/multiqc_plots/svg/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.svg", + "multiqc/multiqc_plots/svg/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.svg", + "multiqc/multiqc_plots/svg/gatk-base-recalibrator-reported-empirical-plot.svg", + "multiqc/multiqc_plots/svg/general_stats_table.svg", + "multiqc/multiqc_plots/svg/mosdepth-coverage-per-contig-single-cnt.svg", + "multiqc/multiqc_plots/svg/mosdepth-coverage-per-contig-single-pct.svg", + "multiqc/multiqc_plots/svg/mosdepth-cumcoverage-dist-id.svg", + "multiqc/multiqc_plots/svg/picard_deduplication-cnt.svg", + "multiqc/multiqc_plots/svg/picard_deduplication-pct.svg", + "multiqc/multiqc_plots/svg/samtools-stats-dp.svg", + "multiqc/multiqc_plots/svg/samtools_alignment_plot-cnt.svg", + "multiqc/multiqc_plots/svg/samtools_alignment_plot-pct.svg", + "multiqc/multiqc_plots/svg/vcftools_tstv_by_count.svg", + "multiqc/multiqc_plots/svg/vcftools_tstv_by_qual.svg", + "multiqc/multiqc_report.html", + "pipeline_info", + "pipeline_info/nf_core_sarek_software_mqc_versions.yml", + "preprocessing", + "preprocessing/mapped", + "preprocessing/mapped/test", + "preprocessing/mapped/test/test.sorted.bam", + "preprocessing/mapped/test/test.sorted.bam.bai", + "preprocessing/markduplicates", + "preprocessing/markduplicates/test", + "preprocessing/markduplicates/test/test.md.bam", + "preprocessing/markduplicates/test/test.md.bam.bai", + "preprocessing/recal_table", + "preprocessing/recal_table/test", + "preprocessing/recal_table/test/test.recal.table", + "preprocessing/recalibrated", + "preprocessing/recalibrated/test", + "preprocessing/recalibrated/test/test.recal.bam", + "preprocessing/recalibrated/test/test.recal.bam.bai", + "reference", + "reports", + "reports/bcftools", + "reports/bcftools/strelka", + "reports/bcftools/strelka/test", + "reports/bcftools/strelka/test/test.strelka.variants.bcftools_stats.txt", + "reports/fastqc", + "reports/fastqc/test-test_L1", + "reports/fastqc/test-test_L1/test-test_L1_1_fastqc.html", + "reports/fastqc/test-test_L1/test-test_L1_1_fastqc.zip", + "reports/fastqc/test-test_L1/test-test_L1_2_fastqc.html", + "reports/fastqc/test-test_L1/test-test_L1_2_fastqc.zip", + "reports/fastqc/test-test_L2", + "reports/fastqc/test-test_L2/test-test_L2_1_fastqc.html", + "reports/fastqc/test-test_L2/test-test_L2_1_fastqc.zip", + "reports/fastqc/test-test_L2/test-test_L2_2_fastqc.html", + "reports/fastqc/test-test_L2/test-test_L2_2_fastqc.zip", + "reports/markduplicates", + "reports/markduplicates/test", + "reports/markduplicates/test/test.md.cram.metrics", + "reports/mosdepth", + "reports/mosdepth/test", + "reports/mosdepth/test/test.md.mosdepth.global.dist.txt", + "reports/mosdepth/test/test.md.mosdepth.region.dist.txt", + "reports/mosdepth/test/test.md.mosdepth.summary.txt", + "reports/mosdepth/test/test.md.regions.bed.gz", + "reports/mosdepth/test/test.md.regions.bed.gz.csi", + "reports/mosdepth/test/test.recal.mosdepth.global.dist.txt", + "reports/mosdepth/test/test.recal.mosdepth.region.dist.txt", + "reports/mosdepth/test/test.recal.mosdepth.summary.txt", + "reports/mosdepth/test/test.recal.regions.bed.gz", + "reports/mosdepth/test/test.recal.regions.bed.gz.csi", + "reports/samtools", + "reports/samtools/test", + "reports/samtools/test/test.md.cram.stats", + "reports/samtools/test/test.recal.cram.stats", + "reports/vcftools", + "reports/vcftools/strelka", + "reports/vcftools/strelka/test", + "reports/vcftools/strelka/test/test.strelka.variants.FILTER.summary", + "reports/vcftools/strelka/test/test.strelka.variants.TsTv.count", + "reports/vcftools/strelka/test/test.strelka.variants.TsTv.qual", + "variant_calling", + "variant_calling/strelka", + "variant_calling/strelka/test", + "variant_calling/strelka/test/test.strelka.genome.vcf.gz", + "variant_calling/strelka/test/test.strelka.genome.vcf.gz.tbi", + "variant_calling/strelka/test/test.strelka.variants.vcf.gz", + "variant_calling/strelka/test/test.strelka.variants.vcf.gz.tbi" + ], + [ + "bcftools_stats_indel-lengths.txt:md5,deccb75341ca46a6f09658f7fd9e348b", + "bcftools_stats_vqc_Count_Indels.txt:md5,7b2a64880b653ccf0400ed9073e290dd", + "bcftools_stats_vqc_Count_SNP.txt:md5,72e934e0e8ed9b9712105bbd66dd9ffd", + "bcftools_stats_vqc_Count_Transitions.txt:md5,72e934e0e8ed9b9712105bbd66dd9ffd", + "bcftools_stats_vqc_Count_Transversions.txt:md5,72e934e0e8ed9b9712105bbd66dd9ffd", + "fastqc-status-check-heatmap.txt:md5,a020b9689ddeb4abec16b4854fe452f1", + "fastqc_adapter_content_plot.txt:md5,2e1b72be741319e7fadbbb39d7e5b37d", + "fastqc_per_base_n_content_plot.txt:md5,ad3b971a6bb4e8ba6c844c8a03584eb8", + "fastqc_per_base_sequence_quality_plot.txt:md5,1bc03889d243a944253ac637d81ae10c", + "fastqc_per_sequence_gc_content_plot_Counts.txt:md5,2c42d140ce06c08dad2b58f397c23239", + "fastqc_per_sequence_gc_content_plot_Percentages.txt:md5,59e22821d350bfb97c37ffd9088f5ad9", + "fastqc_per_sequence_quality_scores_plot.txt:md5,f33615cc98bb6225f39545a415fa7c0f", + "fastqc_sequence_counts_plot.txt:md5,7f0f19a58e8e54e792a751fd04a9ae13", + "fastqc_sequence_duplication_levels_plot.txt:md5,92b02e250ff78725deb9a10d510fcecc", + "fastqc_sequence_length_distribution_plot.txt:md5,fb04dce68ec566314125bc9438211b28", + "fastqc_top_overrepresented_sequences_table.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.txt:md5,20b2630a7400c9c279bf8c0c66341f7d", + "gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Percent.txt:md5,b9b943621e50c7f3e75a37871667d5ed", + "mosdepth-coverage-per-contig-single.txt:md5,264db67a99d2c90ea7b075e33c201b77", + "mosdepth-cumcoverage-dist-id.txt:md5,5235e965da7ebe3bfebb24ffa88defff", + "mosdepth_cov_dist.txt:md5,8d0d7cb485a7bffb07da17b28f827120", + "mosdepth_cumcov_dist.txt:md5,8d0d7cb485a7bffb07da17b28f827120", + "mosdepth_perchrom.txt:md5,264db67a99d2c90ea7b075e33c201b77", + "multiqc_bcftools_stats.txt:md5,103ba59d44fc60e9308e64bbd0d0e504", + "multiqc_citations.txt:md5,ace4ca89138a5f1e2be289c157c00bd9", + "multiqc_fastqc.txt:md5,bde0d0bffa62228b33fb68b7e25b6ff8", + "multiqc_samtools_stats.txt:md5,0f1e4c6c497d9a952765f9f3068ea4b9", + "picard_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "picard_histogram_1.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "picard_histogram_2.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "samtools-stats-dp.txt:md5,c94f4d3ffa3f510552f90e173fdd9f9d", + "samtools_alignment_plot.txt:md5,717f499a3543e7ee4c7a8454bf80aeca", + "vcftools_tstv_by_count.txt:md5,50efc5214fe2c39f21efb66a710d2ed6", + "vcftools_tstv_by_qual.txt:md5,911bc05c5169149dbb0b068f65b4274a", + "test.strelka.variants.bcftools_stats.txt:md5,86bd4938eed920d36f3f5937102a2967", + "test.md.mosdepth.global.dist.txt:md5,b61e1acee11a6ddf7ce3232a5948a6a0", + "test.md.mosdepth.region.dist.txt:md5,1a382f98d488d2ae3df83a0d87caafc1", + "test.md.mosdepth.summary.txt:md5,839108358878ada89e1eaddf6e0541ba", + "test.md.regions.bed.gz:md5,6fdaec99e739dc0f47fe55dd64dfe93e", + "test.md.regions.bed.gz.csi:md5,5f9c60279af78e3aeafc96a8c11fb35f", + "test.recal.mosdepth.global.dist.txt:md5,b61e1acee11a6ddf7ce3232a5948a6a0", + "test.recal.mosdepth.region.dist.txt:md5,1a382f98d488d2ae3df83a0d87caafc1", + "test.recal.mosdepth.summary.txt:md5,839108358878ada89e1eaddf6e0541ba", + "test.recal.regions.bed.gz:md5,6fdaec99e739dc0f47fe55dd64dfe93e", + "test.recal.regions.bed.gz.csi:md5,5f9c60279af78e3aeafc96a8c11fb35f", + "test.md.cram.stats:md5,7d19da3fc342afe0884c944f97a578b1", + "test.recal.cram.stats:md5,820d123e746d1abdc90fd8710828082e", + "test.strelka.variants.FILTER.summary:md5,ad417bc96d31223f61170987975d8128", + "test.strelka.variants.TsTv.count:md5,fa27f678965b7cba6a92efcd039f802a", + "test.strelka.variants.TsTv.qual:md5,bc68ae4e688e9fb772b457069e604883" + ], + [ + + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-29T08:27:17.515894" + } +} \ No newline at end of file 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-vep.nf.test b/tests/annotation_merge.nf.test similarity index 88% rename from tests/annotation-vep.nf.test rename to tests/annotation_merge.nf.test index d308368fbf..323b29eb3a 100644 --- a/tests/annotation-vep.nf.test +++ b/tests/annotation_merge.nf.test @@ -5,7 +5,7 @@ nextflow_pipeline { tag "pipeline" tag "pipeline_sarek" - test("Run with profile test | --tools vep --download_cache") { + test("Run with profile test | --tools merge") { when { params { @@ -13,8 +13,9 @@ nextflow_pipeline { outdir = "$outputDir" input = "${projectDir}/tests/csv/3.0/vcf_single.csv" step = 'annotate' - download_cache = true - tools = 'vep' + snpeff_cache = 's3://annotation-cache/snpeff_cache/' + vep_cache = 's3://annotation-cache/vep_cache/' + tools = 'merge' } } @@ -39,7 +40,7 @@ nextflow_pipeline { } } - test("Run with profile test | --tools vep --vep_include_fasta") { + test("Run with profile test | --tools merge,snpeff,vep") { when { params { @@ -47,8 +48,9 @@ nextflow_pipeline { outdir = "$outputDir" input = "${projectDir}/tests/csv/3.0/vcf_single.csv" step = 'annotate' + snpeff_cache = 's3://annotation-cache/snpeff_cache/' vep_cache = 's3://annotation-cache/vep_cache/' - tools = 'vep' + tools = 'merge,snpeff,vep' } } diff --git a/tests/annotation_merge.nf.test.snap b/tests/annotation_merge.nf.test.snap new file mode 100644 index 0000000000..4856da93f6 --- /dev/null +++ b/tests/annotation_merge.nf.test.snap @@ -0,0 +1,205 @@ +{ + "Run with profile test | --tools merge,snpeff,vep": { + "content": [ + 7, + { + "ENSEMBLVEP_VEP": { + "ensemblvep": 113.0 + }, + "SNPEFF_SNPEFF": { + "snpeff": "5.1d" + }, + "TABIX_BGZIPTABIX": { + "tabix": 1.2 + }, + "TABIX_TABIX": { + "tabix": 1.2 + }, + "Workflow": { + "nf-core/sarek": "v3.5.0dev" + } + }, + [ + "annotation", + "annotation/test", + "annotation/test/test_VEP.ann.vcf.gz", + "annotation/test/test_VEP.ann.vcf.gz.tbi", + "annotation/test/test_snpEff.ann.vcf.gz", + "annotation/test/test_snpEff.ann.vcf.gz.tbi", + "annotation/test/test_snpEff_VEP.ann.vcf.gz", + "annotation/test/test_snpEff_VEP.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_general_stats.txt", + "multiqc/multiqc_data/multiqc_snpeff.txt", + "multiqc/multiqc_data/multiqc_software_versions.txt", + "multiqc/multiqc_data/multiqc_sources.txt", + "multiqc/multiqc_data/snpeff_effects.txt", + "multiqc/multiqc_data/snpeff_qualities.txt", + "multiqc/multiqc_data/snpeff_variant_effects_region.txt", + "multiqc/multiqc_data/vep-general-stats.txt", + "multiqc/multiqc_data/vep.txt", + "multiqc/multiqc_plots", + "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/general_stats_table.pdf", + "multiqc/multiqc_plots/pdf/snpeff_effects-cnt.pdf", + "multiqc/multiqc_plots/pdf/snpeff_effects-pct.pdf", + "multiqc/multiqc_plots/pdf/snpeff_qualities.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-cnt.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-log.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-pct-log.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-pct.pdf", + "multiqc/multiqc_plots/pdf/vep-general-stats.pdf", + "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/general_stats_table.png", + "multiqc/multiqc_plots/png/snpeff_effects-cnt.png", + "multiqc/multiqc_plots/png/snpeff_effects-pct.png", + "multiqc/multiqc_plots/png/snpeff_qualities.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-cnt.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-log.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-pct-log.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-pct.png", + "multiqc/multiqc_plots/png/vep-general-stats.png", + "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/general_stats_table.svg", + "multiqc/multiqc_plots/svg/snpeff_effects-cnt.svg", + "multiqc/multiqc_plots/svg/snpeff_effects-pct.svg", + "multiqc/multiqc_plots/svg/snpeff_qualities.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-cnt.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-log.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-pct-log.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-pct.svg", + "multiqc/multiqc_plots/svg/vep-general-stats.svg", + "multiqc/multiqc_report.html", + "pipeline_info", + "pipeline_info/nf_core_sarek_software_mqc_versions.yml", + "reports", + "reports/EnsemblVEP", + "reports/EnsemblVEP/test", + "reports/EnsemblVEP/test/test_VEP.ann.summary.html", + "reports/EnsemblVEP/test/test_snpEff_VEP.ann.summary.html", + "reports/snpeff", + "reports/snpeff/test", + "reports/snpeff/test/snpEff_summary.html", + "reports/snpeff/test/test_snpEff.csv", + "reports/snpeff/test/test_snpEff.genes.txt" + ], + [ + "multiqc_citations.txt:md5,ebf9f49bc020eeb38546ddab3a98171e", + "multiqc_snpeff.txt:md5,03a2b1c461cb6e5cccac64033a2f6526", + "snpeff_effects.txt:md5,3c5e9a1c191b77c781dc4d033b1dd1f7", + "snpeff_qualities.txt:md5,4c059b4e8bf0a64940ad1d6e30efd3a6", + "snpeff_variant_effects_region.txt:md5,05efd324edadced17ba3cd2b7714af57", + "vep-general-stats.txt:md5,71c994ae4221384f4e22459723d29cd0", + "vep.txt:md5,20570f3e4e51407b860a31d7e1d59de0", + "test_snpEff.genes.txt:md5,130536bf0237d7f3f746d32aaa32840a" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-29T10:03:16.229715" + }, + "Run with profile test | --tools merge": { + "content": [ + 5, + { + "ENSEMBLVEP_VEP": { + "ensemblvep": 113.0 + }, + "SNPEFF_SNPEFF": { + "snpeff": "5.1d" + }, + "TABIX_BGZIPTABIX": { + "tabix": 1.2 + }, + "TABIX_TABIX": { + "tabix": 1.2 + }, + "Workflow": { + "nf-core/sarek": "v3.5.0dev" + } + }, + [ + "annotation", + "annotation/test", + "annotation/test/test_snpEff_VEP.ann.vcf.gz", + "annotation/test/test_snpEff_VEP.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_general_stats.txt", + "multiqc/multiqc_data/multiqc_snpeff.txt", + "multiqc/multiqc_data/multiqc_software_versions.txt", + "multiqc/multiqc_data/multiqc_sources.txt", + "multiqc/multiqc_data/snpeff_effects.txt", + "multiqc/multiqc_data/snpeff_qualities.txt", + "multiqc/multiqc_data/snpeff_variant_effects_region.txt", + "multiqc/multiqc_data/vep-general-stats.txt", + "multiqc/multiqc_data/vep.txt", + "multiqc/multiqc_plots", + "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/general_stats_table.pdf", + "multiqc/multiqc_plots/pdf/snpeff_effects-cnt.pdf", + "multiqc/multiqc_plots/pdf/snpeff_effects-pct.pdf", + "multiqc/multiqc_plots/pdf/snpeff_qualities.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-cnt.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-log.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-pct-log.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-pct.pdf", + "multiqc/multiqc_plots/pdf/vep-general-stats.pdf", + "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/general_stats_table.png", + "multiqc/multiqc_plots/png/snpeff_effects-cnt.png", + "multiqc/multiqc_plots/png/snpeff_effects-pct.png", + "multiqc/multiqc_plots/png/snpeff_qualities.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-cnt.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-log.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-pct-log.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-pct.png", + "multiqc/multiqc_plots/png/vep-general-stats.png", + "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/general_stats_table.svg", + "multiqc/multiqc_plots/svg/snpeff_effects-cnt.svg", + "multiqc/multiqc_plots/svg/snpeff_effects-pct.svg", + "multiqc/multiqc_plots/svg/snpeff_qualities.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-cnt.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-log.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-pct-log.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-pct.svg", + "multiqc/multiqc_plots/svg/vep-general-stats.svg", + "multiqc/multiqc_report.html", + "pipeline_info", + "pipeline_info/nf_core_sarek_software_mqc_versions.yml", + "reports", + "reports/EnsemblVEP", + "reports/EnsemblVEP/test", + "reports/EnsemblVEP/test/test_snpEff_VEP.ann.summary.html", + "reports/snpeff", + "reports/snpeff/test" + ], + [ + "multiqc_citations.txt:md5,ebf9f49bc020eeb38546ddab3a98171e", + "multiqc_snpeff.txt:md5,03a2b1c461cb6e5cccac64033a2f6526", + "snpeff_effects.txt:md5,3c5e9a1c191b77c781dc4d033b1dd1f7", + "snpeff_qualities.txt:md5,4c059b4e8bf0a64940ad1d6e30efd3a6", + "snpeff_variant_effects_region.txt:md5,05efd324edadced17ba3cd2b7714af57", + "vep-general-stats.txt:md5,57563be109a57f6edfa427b2b2c310ba", + "vep.txt:md5,bf54f689bb0ccab5e1566e48373f768c" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-29T09:56:59.385257" + } +} diff --git a/tests/annotation_snpeff.nf.test b/tests/annotation_snpeff.nf.test new file mode 100644 index 0000000000..9addb8f1d7 --- /dev/null +++ b/tests/annotation_snpeff.nf.test @@ -0,0 +1,68 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + tag "pipeline_sarek" + + test("Run with profile test | --tools snpeff --download_cache") { + + 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' + download_cache = true + tools = 'snpeff' + } + } + + 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() } + ) + } + } + + test("Fails with profile test | --tools snpeff --snpeff_db na --build_only_index") { + 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' + snpeff_cache = 's3://annotation-cache/snpeff_cache/' + snpeff_db = "na" + input = false + build_only_index = true + tools = 'snpeff' + } + } + + 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.failed}, + { assert workflow.stdout.toString().contains("This path is not available within annotation-cache") } + ) + } + } +} diff --git a/tests/annotation_snpeff.nf.test.snap b/tests/annotation_snpeff.nf.test.snap new file mode 100644 index 0000000000..012faa171c --- /dev/null +++ b/tests/annotation_snpeff.nf.test.snap @@ -0,0 +1,108 @@ +{ + "Run with profile test | --tools snpeff --download_cache": { + "content": [ + 4, + { + "SNPEFF_SNPEFF": { + "snpeff": "5.1d" + }, + "TABIX_BGZIPTABIX": { + "tabix": 1.2 + }, + "Workflow": { + "nf-core/sarek": "v3.5.0dev" + } + }, + [ + "annotation", + "annotation/test", + "annotation/test/test_snpEff.ann.vcf.gz", + "annotation/test/test_snpEff.ann.vcf.gz.tbi", + "cache", + "cache/snpeff_cache", + "cache/snpeff_cache/WBcel235.105", + "cache/snpeff_cache/WBcel235.105/sequence.I.bin", + "cache/snpeff_cache/WBcel235.105/sequence.II.bin", + "cache/snpeff_cache/WBcel235.105/sequence.III.bin", + "cache/snpeff_cache/WBcel235.105/sequence.IV.bin", + "cache/snpeff_cache/WBcel235.105/sequence.V.bin", + "cache/snpeff_cache/WBcel235.105/sequence.X.bin", + "cache/snpeff_cache/WBcel235.105/sequence.bin", + "cache/snpeff_cache/WBcel235.105/snpEffectPredictor.bin", + "cache/versions.yml", + "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_general_stats.txt", + "multiqc/multiqc_data/multiqc_snpeff.txt", + "multiqc/multiqc_data/multiqc_software_versions.txt", + "multiqc/multiqc_data/multiqc_sources.txt", + "multiqc/multiqc_data/snpeff_effects.txt", + "multiqc/multiqc_data/snpeff_qualities.txt", + "multiqc/multiqc_data/snpeff_variant_effects_region.txt", + "multiqc/multiqc_plots", + "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/general_stats_table.pdf", + "multiqc/multiqc_plots/pdf/snpeff_effects-cnt.pdf", + "multiqc/multiqc_plots/pdf/snpeff_effects-pct.pdf", + "multiqc/multiqc_plots/pdf/snpeff_qualities.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-cnt.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-log.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-pct-log.pdf", + "multiqc/multiqc_plots/pdf/snpeff_variant_effects_region-pct.pdf", + "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/general_stats_table.png", + "multiqc/multiqc_plots/png/snpeff_effects-cnt.png", + "multiqc/multiqc_plots/png/snpeff_effects-pct.png", + "multiqc/multiqc_plots/png/snpeff_qualities.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-cnt.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-log.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-pct-log.png", + "multiqc/multiqc_plots/png/snpeff_variant_effects_region-pct.png", + "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/general_stats_table.svg", + "multiqc/multiqc_plots/svg/snpeff_effects-cnt.svg", + "multiqc/multiqc_plots/svg/snpeff_effects-pct.svg", + "multiqc/multiqc_plots/svg/snpeff_qualities.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-cnt.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-log.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-pct-log.svg", + "multiqc/multiqc_plots/svg/snpeff_variant_effects_region-pct.svg", + "multiqc/multiqc_report.html", + "pipeline_info", + "pipeline_info/nf_core_sarek_software_mqc_versions.yml", + "reports", + "reports/snpeff", + "reports/snpeff/test", + "reports/snpeff/test/snpEff_summary.html", + "reports/snpeff/test/test_snpEff.csv", + "reports/snpeff/test/test_snpEff.genes.txt" + ], + [ + "sequence.I.bin:md5,2fd1694bd91cf7952cbad8cfed161e53", + "sequence.II.bin:md5,bacedbdea89508e108223767fa260a4c", + "sequence.III.bin:md5,444118a9fb9d0a03c37e86094d8e52a9", + "sequence.IV.bin:md5,ff756628faa0b71cd65495668c3d82b5", + "sequence.V.bin:md5,d6ad5476162ac45829f719dd4ee3f4e7", + "sequence.X.bin:md5,b79bec6cc8f96b8373dac56bab5d0a6c", + "sequence.bin:md5,ec2bc2ae81755ab90fcf1848bc7ce41f", + "snpEffectPredictor.bin:md5,1d99251d0405f0a42913ed8b5b2c2fa7", + "versions.yml:md5,e9698b9ccf3bb151631d1e07fbae8397", + "multiqc_citations.txt:md5,47e39f5f5f05da6bc38d13aa81fe8b6e", + "multiqc_snpeff.txt:md5,03a2b1c461cb6e5cccac64033a2f6526", + "snpeff_effects.txt:md5,3c5e9a1c191b77c781dc4d033b1dd1f7", + "snpeff_qualities.txt:md5,4c059b4e8bf0a64940ad1d6e30efd3a6", + "snpeff_variant_effects_region.txt:md5,05efd324edadced17ba3cd2b7714af57", + "test_snpEff.genes.txt:md5,130536bf0237d7f3f746d32aaa32840a" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-29T10:16:00.665699" + } +} \ No newline at end of file diff --git a/tests/annotation_vep.nf.test b/tests/annotation_vep.nf.test new file mode 100644 index 0000000000..80659a41b7 --- /dev/null +++ b/tests/annotation_vep.nf.test @@ -0,0 +1,68 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + tag "pipeline_sarek" + + test("Run with profile test | --tools vep --download_cache --vep_include_fasta") { + + 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' + download_cache = true + tools = 'vep' + } + } + + 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() } + ) + } + } + + test("Fails with profile test | --tools vep --vep_cache_version 1 --build_only_index") { + 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' + vep_cache = 's3://annotation-cache/vep_cache/' + vep_cache_version = 1 + input = false + build_only_index = true + tools = 'vep' + } + } + + 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.failed}, + { assert workflow.stdout.toString().contains("This path is not available within annotation-cache") } + ) + } + } +} diff --git a/tests/annotation-vep.nf.test.snap b/tests/annotation_vep.nf.test.snap similarity index 89% rename from tests/annotation-vep.nf.test.snap rename to tests/annotation_vep.nf.test.snap index 300780733f..dd13a715dc 100644 --- a/tests/annotation-vep.nf.test.snap +++ b/tests/annotation_vep.nf.test.snap @@ -1,61 +1,5 @@ { - "Run with profile test | --tools vep --vep_include_fasta": { - "content": [ - 3, - { - "ENSEMBLVEP_VEP": { - "ensemblvep": 113.0 - }, - "TABIX_TABIX": { - "tabix": 1.2 - }, - "Workflow": { - "nf-core/sarek": "v3.5.0dev" - } - }, - [ - "annotation", - "annotation/test", - "annotation/test/test_VEP.ann.vcf.gz", - "annotation/test/test_VEP.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_data/vep-general-stats.txt", - "multiqc/multiqc_data/vep.txt", - "multiqc/multiqc_plots", - "multiqc/multiqc_plots/pdf", - "multiqc/multiqc_plots/pdf/vep-general-stats.pdf", - "multiqc/multiqc_plots/png", - "multiqc/multiqc_plots/png/vep-general-stats.png", - "multiqc/multiqc_plots/svg", - "multiqc/multiqc_plots/svg/vep-general-stats.svg", - "multiqc/multiqc_report.html", - "pipeline_info", - "pipeline_info/nf_core_sarek_software_mqc_versions.yml", - "reports", - "reports/EnsemblVEP", - "reports/EnsemblVEP/test", - "reports/EnsemblVEP/test/test_VEP.ann.summary.html" - ], - [ - "multiqc_citations.txt:md5,afe6b13a9c0770828d9bc9515d6db802", - "vep-general-stats.txt:md5,2fca07ac5623e758cac3ce49d9f6e3b0", - "vep.txt:md5,60a5d57c60308aba2aa6206f903d27e9" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-24T11:49:16.737881" - }, - "Run with profile test | --tools vep --download_cache": { + "Run with profile test | --tools vep --download_cache --vep_include_fasta": { "content": [ 4, { @@ -331,9 +275,9 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-23T15:00:39.082074" + "timestamp": "2024-10-29T10:19:17.846465" } } \ No newline at end of file diff --git a/tests/config/pytesttags.yml b/tests/config/pytesttags.yml index d856905805..a691b4019b 100644 --- a/tests/config/pytesttags.yml +++ b/tests/config/pytesttags.yml @@ -1,30 +1,5 @@ # preprocessing -## alignment_from_everything -alignment_from_everything: - - conf/modules/** - - conf/test/alignment_from_everything.config - - main.nf - - modules/** - - nextflow.config - - nextflow_schema.json - - subworkflows/** - - tests/csv/3.0/bam_and_fastq_and_spring.csv - - tests/test_alignment_from_everything.yml - - workflows/** - -## alignment_to_fastq -alignment_to_fastq: - - conf/modules/alignment_to_fastq.config - - modules/nf-core/cat/fastq/** - - modules/nf-core/mosdepth/** - - modules/nf-core/samtools/collatefastq/** - - modules/nf-core/samtools/merge/** - - modules/nf-core/samtools/view/** - - subworkflows/local/bam_convert_samtools/** - - tests/csv/3.0/bam_for_remapping.csv - - tests/test_alignment_to_fastq.yml - ## umi umi: - conf/modules/umi.config @@ -464,46 +439,6 @@ tiddit: - tests/csv/3.0/recalibrated_tumoronly.csv - tests/test_tiddit.yml -# 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 - - modules/nf-core/ensemblvep/vep/** - - modules/nf-core/snpeff/snpeff/** - - modules/nf-core/tabix/bgziptabix/** - - subworkflows/local/vcf_annotate_all/** - - subworkflows/nf-core/vcf_annotate_ensemblvep/** - - subworkflows/nf-core/vcf_annotate_snpeff/** - - tests/csv/3.0/vcf_single.csv - - tests/test_annotation_merge.yml - -## snpeff -snpeff: - - conf/modules/annotate.config - - modules/nf-core/snpeff/snpeff/** - - modules/nf-core/tabix/bgziptabix/** - - subworkflows/nf-core/vcf_annotate_snpeff/** - - tests/csv/3.0/vcf_single.csv - - tests/test_annotation_snpeff.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_alignment_from_everything.yml b/tests/test_alignment_from_everything.yml deleted file mode 100644 index cdbbb15b36..0000000000 --- a/tests/test_alignment_from_everything.yml +++ /dev/null @@ -1,42 +0,0 @@ -- name: Run alignment to bam fastq and spring files to bam files - command: nextflow run main.nf -profile test,alignment_from_everything --outdir results --save_mapped --save_output_as_bam - tags: - - alignment_from_everything - files: - - path: results/csv/mapped.csv - md5sum: 5a10f49a6a691c84e31e7dd8e91c8201 - - path: results/csv/markduplicates.csv - md5sum: 293ae6ec0286272470dd8d6edf4b4fc9 - - path: results/csv/markduplicates_no_table.csv - md5sum: e379af37e14b94c17465654f971bd23f - - path: results/csv/recalibrated.csv - md5sum: 976529de568cdf201e6b9dfb2da3f62f - - path: results/multiqc - - path: results/preprocessing/mapped/test/test.sorted.bam - - path: results/preprocessing/mapped/test/test.sorted.bam.bai - - path: results/preprocessing/mapped/test2/test2.sorted.bam - - path: results/preprocessing/mapped/test2/test2.sorted.bam.bai - - path: results/preprocessing/mapped/test3/test3.sorted.bam - - path: results/preprocessing/mapped/test3/test3.sorted.bam.bai - - path: results/preprocessing/mapped/test_bam/test_bam.sorted.bam - - path: results/preprocessing/mapped/test_bam/test_bam.sorted.bam.bai - - path: results/preprocessing/markduplicates/test/test.md.bam - - path: results/preprocessing/markduplicates/test/test.md.bam.bai - - path: results/preprocessing/markduplicates/test2/test2.md.bam - - path: results/preprocessing/markduplicates/test2/test2.md.bam.bai - - path: results/preprocessing/markduplicates/test3/test3.md.bam - - path: results/preprocessing/markduplicates/test3/test3.md.bam.bai - - path: results/preprocessing/markduplicates/test_bam/test_bam.md.bam - - path: results/preprocessing/markduplicates/test_bam/test_bam.md.bam.bai - - path: results/preprocessing/recal_table/test/test.recal.table - - path: results/preprocessing/recal_table/test2/test2.recal.table - - path: results/preprocessing/recal_table/test3/test3.recal.table - - path: results/preprocessing/recal_table/test_bam/test_bam.recal.table - - path: results/preprocessing/recalibrated/test/test.recal.bam - - path: results/preprocessing/recalibrated/test/test.recal.bam.bai - - path: results/preprocessing/recalibrated/test2/test2.recal.bam - - path: results/preprocessing/recalibrated/test2/test2.recal.bam.bai - - path: results/preprocessing/recalibrated/test3/test3.recal.bam - - path: results/preprocessing/recalibrated/test3/test3.recal.bam.bai - - path: results/preprocessing/recalibrated/test_bam/test_bam.recal.bam - - path: results/preprocessing/recalibrated/test_bam/test_bam.recal.bam.bai diff --git a/tests/test_alignment_to_fastq.yml b/tests/test_alignment_to_fastq.yml deleted file mode 100644 index bc7a3e5057..0000000000 --- a/tests/test_alignment_to_fastq.yml +++ /dev/null @@ -1,42 +0,0 @@ -- name: Run alignment to fastq and then remap on bam files - command: nextflow run main.nf -profile test,alignment_to_fastq --outdir results - tags: - - alignment_to_fastq - - input_bam - files: - - path: results/csv/markduplicates.csv - md5sum: 0d6120bb99e92f6810343270711ca53e - - path: results/csv/markduplicates_no_table.csv - md5sum: 2a2d3d4842befd4def39156463859ee3 - - path: results/csv/recalibrated.csv - md5sum: 2d29d9e53894dcce96a1b5beb6ef3312 - - path: results/multiqc - - path: results/preprocessing/markduplicates/test/test.md.cram - # binary changes md5sums on reruns - - path: results/preprocessing/markduplicates/test/test.md.cram.crai - # binary changes md5sums on reruns - - path: results/preprocessing/recal_table/test/test.recal.table - md5sum: 9c0517ffdc5d30a5c73b9f7df1ff3060 - - path: results/preprocessing/recalibrated/test/test.recal.cram - # binary changes md5sums on reruns - - path: results/preprocessing/recalibrated/test/test.recal.cram.crai - # binary changes md5sums on reruns - - path: results/reports/fastqc/test-1 - - path: results/reports/markduplicates/test/test.md.cram.metrics - contains: ["test 0 2820 2 2 0 828 0 0.293617 3807", "1.0 0.999986 1178 1178", "2.0 1.47674 800 800", "100.0 1.911145 0 0"] - - path: results/reports/mosdepth/test/test.md.mosdepth.global.dist.txt - - path: results/reports/mosdepth/test/test.md.mosdepth.region.dist.txt - - path: results/reports/mosdepth/test/test.md.mosdepth.summary.txt - - path: results/reports/mosdepth/test/test.md.regions.bed.gz - - path: results/reports/mosdepth/test/test.md.regions.bed.gz.csi - - path: results/reports/mosdepth/test/test.recal.mosdepth.global.dist.txt - - path: results/reports/mosdepth/test/test.recal.mosdepth.region.dist.txt - - path: results/reports/mosdepth/test/test.recal.mosdepth.summary.txt - - path: results/reports/mosdepth/test/test.recal.regions.bed.gz - - path: results/reports/mosdepth/test/test.recal.regions.bed.gz.csi - - path: results/reports/samtools/test/test.md.cram.stats - # conda changes md5sums for test - - path: results/reports/samtools/test/test.recal.cram.stats - # conda changes md5sums for test - - path: results/preprocessing/mapped/ - should_exist: false 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 diff --git a/tests/test_annotation_cache.yml b/tests/test_annotation_cache.yml deleted file mode 100644 index ce0c3c2026..0000000000 --- a/tests/test_annotation_cache.yml +++ /dev/null @@ -1,29 +0,0 @@ -- name: Only download annotation cache - command: nextflow run main.nf -profile test,annotation --tools merge --download_cache --input false --build_only_index --outdir results - tags: - - annotation - - cache - - vep - - snpeff - files: - - path: results/multiqc - - path: results/cache/snpeff_cache - - path: results/cache/vep_cache - - path: results/annotation - should_exist: false - -- name: Fail to locate VEP cache - command: nextflow run main.nf -profile test,annotation --vep_cache s3://annotation-cache/vep_cache/ --vep_cache_version 1 --tools vep --input false --build_only_index --outdir results - tags: - - annotation - - cache - - vep - exit_code: 1 - -- name: Fail to locate snpEff cache - command: nextflow run main.nf -profile test,annotation --snpeff_cache s3://annotation-cache/snpeff_cache/ --snpeff_db na --tools snpeff --input false --build_only_index --outdir results - tags: - - annotation - - cache - - snpeff - exit_code: 1 diff --git a/tests/test_annotation_merge.yml b/tests/test_annotation_merge.yml deleted file mode 100644 index 03b163a1af..0000000000 --- a/tests/test_annotation_merge.yml +++ /dev/null @@ -1,58 +0,0 @@ -- name: Run snpEff followed by VEP - command: nextflow run main.nf -profile test,annotation --tools merge --outdir results --download_cache - tags: - - annotation - - merge - files: - - path: results/annotation/test/test_snpEff_VEP.ann.vcf.gz - # binary changes md5sums on reruns - - path: results/annotation/test/test_snpEff_VEP.ann.vcf.gz.tbi - # binary changes md5sums on reruns - - path: results/reports/EnsemblVEP/test/test_snpEff_VEP.ann.summary.html - contains: ["test_snpEff.ann.vcf.gz
test_snpEff_VEP.ann.vcf.gz"] - - path: results/multiqc - - path: results/annotation/test/test_snpEff.ann.vcf.gz - should_exist: false - - path: results/annotation/test/test_snpEff.ann.vcf.gz.tbi - should_exist: false - - path: results/annotation/test/test_VEP.ann.vcf.gz - should_exist: false - - path: results/annotation/test/test_VEP.ann.vcf.gz.tbi - should_exist: false - - path: results/reports/snpeff/test/snpEff_summary.html - should_exist: false - - path: results/reports/snpeff/test/test_snpEff.csv - should_exist: false - - path: results/reports/snpeff/test/test_snpEff.genes.txt - should_exist: false - - path: results/reports/EnsemblVEP/test/test_VEP.ann.summary.html - should_exist: false -- name: Run VEP and snpEff followed by VEP - command: nextflow run main.nf -profile test,annotation --tools merge,snpeff,vep --outdir results --download_cache - tags: - - annotation - - merge - files: - - path: results/annotation/test/test_VEP.ann.vcf.gz - # binary changes md5sums on reruns - - path: results/annotation/test/test_VEP.ann.vcf.gz.tbi - # binary changes md5sums on reruns - - path: results/annotation/test/test_snpEff.ann.vcf.gz - # binary changes md5sums on reruns - - path: results/annotation/test/test_snpEff.ann.vcf.gz.tbi - # binary changes md5sums on reruns - - path: results/annotation/test/test_snpEff_VEP.ann.vcf.gz - # binary changes md5sums on reruns - - path: results/annotation/test/test_snpEff_VEP.ann.vcf.gz.tbi - # binary changes md5sums on reruns - - path: results/multiqc - - path: results/reports/EnsemblVEP/test/test_VEP.ann.summary.html - # text-based file changes md5sums on reruns - - path: results/reports/EnsemblVEP/test/test_snpEff_VEP.ann.summary.html - # text-based file changes md5sums on reruns - - path: results/reports/snpeff/test/snpEff_summary.html - # text-based file changes md5sums on reruns - - path: results/reports/snpeff/test/test_snpEff.csv - # text-based file changes md5sums on reruns - - path: results/reports/snpeff/test/test_snpEff.genes.txt - md5sum: 130536bf0237d7f3f746d32aaa32840a diff --git a/tests/test_annotation_snpeff.yml b/tests/test_annotation_snpeff.yml deleted file mode 100644 index 5ad71d0664..0000000000 --- a/tests/test_annotation_snpeff.yml +++ /dev/null @@ -1,27 +0,0 @@ -- name: Run snpEff - command: nextflow run main.nf -profile test,annotation --tools snpeff --outdir results --download_cache - tags: - - annotation - - snpeff - files: - - path: results/annotation/test/test_snpEff.ann.vcf.gz - # binary changes md5sums on reruns - - path: results/annotation/test/test_snpEff.ann.vcf.gz.tbi - # binary changes md5sums on reruns - - path: results/multiqc - - path: results/reports/snpeff/test/snpEff_summary.html - contains: [" Genome total length ", "100,286,402 ", "MT192765.1 "] - - path: results/reports/snpeff/test/test_snpEff.csv - contains: - [ - "Values , 50,100", - "Count , 1,8", - "Reference , 0", - "Het , 1", - "Hom , 8", - "Missing , 0", - "MT192765.1, Position,0,1", - "MT192765.1,Count,0,0", - ] - - path: results/reports/snpeff/test/test_snpEff.genes.txt - md5sum: 130536bf0237d7f3f746d32aaa32840a