Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

- [#905](https://github.com/nf-core/mag/pull/905) - Add nf-test snapshot for `test_assembly_input` profile (by @dialvarezs)

### `Changed`

### `Fixed`
Expand Down
2 changes: 2 additions & 0 deletions conf/test_assembly_input.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ process {

process {
withName: METAEUK_EASYPREDICT {
cpus = 1 // to keep output order consistent
ext.args = '-s 1 --max-seqs 10 --max-accept 1'
}
}
Expand All @@ -36,6 +37,7 @@ params {

busco_db = params.pipelines_testdata_base_path + 'mag/databases/busco/bacteria_odb10.2024-01-08.tar.gz'
busco_db_lineage = 'bacteria_odb10'
busco_clean = true

skip_quast = true
skip_prodigal = true
Expand Down
1 change: 1 addition & 0 deletions modules/local/tiara_classify/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ process TIARA_CLASSIFY {
done < bin2classification.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-base: \$(R --version | head -n 1 | grep -Eo '[0-9.]+ ')
r-tidyverse: \$(cat tidyverse_version.txt)
END_VERSIONS
Expand Down
3 changes: 2 additions & 1 deletion nf-test.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ config {

// load the necessary plugins
plugins {
load "nft-utils@0.0.3"
load "nft-csv@0.1.0"
load "[email protected]"
load "[email protected]"
}
}
37 changes: 22 additions & 15 deletions tests/.nftignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
.DS_Store
multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt
multiqc/multiqc_data/multiqc.parquet
multiqc/multiqc_data/multiqc.log
multiqc/multiqc_data/multiqc_data.json
multiqc/multiqc_data/multiqc_sources.txt
multiqc/multiqc_data/multiqc_sources.yaml
multiqc/multiqc_data/multiqc_software_versions.txt
multiqc/multiqc_data/multiqc_software_versions.yaml
multiqc/multiqc_data/llms-full.txt
multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png}
multiqc/multiqc_report.html
pipeline_info/*.{html,json,txt,yml}
Assembly/MEGAHIT/*.log
Assembly/MEGAHIT/QC/*/*.bowtie2.log
GenomeBinning/CONCOCT/stats/*_{original,PCA_components,PCA_transformed}_data_gt1000.csv
GenomeBinning/CONCOCT/stats/*_log.txt
GenomeBinning/CONCOCT/stats/*.tsv
GenomeBinning/DASTool/*.log
GenomeBinning/depths/**/*-depth.txt.gz
GenomeBinning/depths/bins/*.png
GenomeBinning/MetaBAT2/unbinned/discarded/*.unbinned.pooled.fa.gz
GenomeBinning/QC/CheckM2/**/DIAMOND_RESULTS.tsv
GenomeBinning/QC/CheckM2/*/checkm2.log
GenomeBinning/QC/busco_summary.tsv
GenomeBinning/QC/BUSCO/**/*.log
GenomeBinning/QC/BUSCO/**/.checkpoint
GenomeBinning/QC/BUSCO/**/{logs,prodigal_output,busco_sequences}/**
GenomeBinning/QC/BUSCO/**/*.json
GenomeBinning/QC/BUSCO/**/*.log
GenomeBinning/QC/BUSCO/**/*.txt
GenomeBinning/QC/BUSCO/**/short_summary*.{txt,json}
GenomeBinning/QC/BUSCO/*/*{-busco.log,-busco.batch_summary.txt}
GenomeBinning/QC/CheckM2/**/DIAMOND_RESULTS.tsv
GenomeBinning/QC/CheckM2/*/checkm2.log
multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt
multiqc/multiqc_data/llms-full.txt
multiqc/multiqc_data/multiqc_data.json
multiqc/multiqc_data/multiqc_software_versions.txt
multiqc/multiqc_data/multiqc_software_versions.yaml
multiqc/multiqc_data/multiqc_sources.txt
multiqc/multiqc_data/multiqc_sources.yaml
multiqc/multiqc_data/multiqc.log
multiqc/multiqc_data/multiqc.parquet
multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png}
multiqc/multiqc_report.html
pipeline_info/*.{html,json,txt,yml}
QC_shortreads/fastqc/*_fastqc.{html,zip}
QC_shortreads/remove_phix/*.log
44 changes: 22 additions & 22 deletions tests/default.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"coreutils": 9.5
},
"BIN_SUMMARY": {
"python": "3.10.6",
"pandas": "1.4.3"
"pandas": "1.4.3",
"python": "3.10.6"
},
"BOWTIE2_ASSEMBLY_ALIGN": {
"bowtie2": "2.4.2",
"samtools": 1.11,
"pigz": "2.3.4"
"pigz": "2.3.4",
"samtools": 1.11
},
"BOWTIE2_ASSEMBLY_BUILD": {
"bowtie2": "2.4.2"
Expand Down Expand Up @@ -60,15 +60,15 @@
"fastqc": "0.12.1"
},
"GTDBTK_CLASSIFYWF": {
"gtdbtk": "2.5.2",
"gtdb_db": "r226"
"gtdb_db": "r226",
"gtdbtk": "2.5.2"
},
"GTDBTK_DB_PREPARATION": {
"tar": 1.34
},
"GTDBTK_SUMMARY": {
"python": "3.10.6",
"pandas": "1.4.3"
"pandas": "1.4.3",
"python": "3.10.6"
},
"GUNZIP_BINS": {
"gunzip": 1.13
Expand All @@ -80,17 +80,17 @@
"gunzip": 1.13
},
"MAG_DEPTHS": {
"python": "3.6.7",
"pandas": "1.1.5"
"pandas": "1.1.5",
"python": "3.6.7"
},
"MAG_DEPTHS_PLOT": {
"python": "3.9.6",
"pandas": "1.3.0",
"python": "3.9.6",
"seaborn": "0.11.0"
},
"MAG_DEPTHS_SUMMARY": {
"python": "3.10.6",
"pandas": "1.4.3"
"pandas": "1.4.3",
"python": "3.10.6"
},
"MAXBIN2": {
"maxbin2": "2.2.7"
Expand All @@ -108,19 +108,19 @@
"spades": "4.1.0"
},
"PRODIGAL": {
"prodigal": "2.6.3",
"pigz": 2.6
"pigz": 2.6,
"prodigal": "2.6.3"
},
"PROKKA": {
"prokka": "1.14.6"
},
"QUAST": {
"python": "3.7.6",
"metaquast": "5.0.2"
"metaquast": "5.0.2",
"python": "3.7.6"
},
"QUAST_BINS": {
"python": "3.7.6",
"metaquast": "5.0.2"
"metaquast": "5.0.2",
"python": "3.7.6"
},
"QUAST_BINS_SUMMARY": {
"cp": 9.5
Expand All @@ -129,9 +129,9 @@
"seqkit": "2.9.0"
},
"SPLIT_FASTA": {
"python": "3.6.7",
"biopython": "1.7.4",
"pandas": "1.1.5"
"pandas": "1.1.5",
"python": "3.6.7"
},
"Workflow": {
"nf-core/mag": "v5.3.0dev"
Expand All @@ -142,7 +142,7 @@
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-11-07T11:47:54.060594176"
"timestamp": "2025-11-11T08:17:18.125734263"
},
"multiqc": {
"content": [
Expand Down
15 changes: 8 additions & 7 deletions tests/test_alternatives.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nextflow_pipeline {

when {
params {
outdir = "$outputDir"
outdir = "${outputDir}"
}
}

Expand Down Expand Up @@ -61,7 +61,7 @@ nextflow_pipeline {
params.outdir, include: ['GenomeBinning/MetaBAT2/bins/*.fa.gz']
)
def metabat2_unbins = getAllFilesFromDir(
params.outdir, include: ['GenomeBinning/MetaBAT2/{discarded,unbinned}/*.fa.gz']
params.outdir, include: ['GenomeBinning/MetaBAT2/{discarded,unbinned/*}/*.fa.gz']
)

// Output dir: multiqc
Expand All @@ -72,13 +72,12 @@ nextflow_pipeline {
params.outdir, include: ['multiqc/**'], ignoreFile: 'tests/.nftignore'
)

assert workflow.success
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.trace.succeeded().size(),
removeNextflowVersion("${outputDir}/pipeline_info/nf_core_mag_software_mqc_versions.yml"),
).match()
},
workflow.trace.succeeded().size(),
removeNextflowVersion("${outputDir}/pipeline_info/nf_core_mag_software_mqc_versions.yml"),
).match() },
{ assert snapshot(stable_name_qc, stable_path_qc ).match('qc') },
{ assert snapshot(stable_name_assembly, stable_path_assembly).match('assembly') },
{ assert snapshot(stable_name_binning, stable_path_binning ).match('binning') },
Expand All @@ -87,10 +86,12 @@ nextflow_pipeline {
checkm2_diamond_results.collect { results -> results.text.readLines().size() },
).match('checkm2_diamond_results')
},

// FASTA checks
{ assert megahit_contigs.collect { contigs -> path("${contigs}").fasta.size() > 0 }.every() },
{ assert metabat2_bins.collect { contigs -> path("${contigs}").fasta.size() > 0 }.every() },
{ assert metabat2_unbins.collect { contigs -> path("${contigs}").fasta.size() >= 0 }.every() },

// Log checks
{ assert remove_phix_logs.collect {
log -> log.readLines().last() ==~ /[0-9.]+% overall alignment rate/
Expand Down
36 changes: 17 additions & 19 deletions tests/test_alternatives.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
43,
{
"BIN_SUMMARY": {
"python": "3.10.6",
"pandas": "1.4.3"
"pandas": "1.4.3",
"python": "3.10.6"
},
"BOWTIE2_ASSEMBLY_ALIGN": {
"bowtie2": "2.4.2",
"samtools": 1.11,
"pigz": "2.3.4"
"pigz": "2.3.4",
"samtools": 1.11
},
"BOWTIE2_ASSEMBLY_BUILD": {
"bowtie2": "2.4.2"
Expand Down Expand Up @@ -64,17 +64,17 @@
"gunzip": 1.13
},
"MAG_DEPTHS": {
"python": "3.6.7",
"pandas": "1.1.5"
"pandas": "1.1.5",
"python": "3.6.7"
},
"MAG_DEPTHS_PLOT": {
"python": "3.9.6",
"pandas": "1.3.0",
"python": "3.9.6",
"seaborn": "0.11.0"
},
"MAG_DEPTHS_SUMMARY": {
"python": "3.10.6",
"pandas": "1.4.3"
"pandas": "1.4.3",
"python": "3.10.6"
},
"MEGAHIT": {
"megahit": "1.2.9"
Expand All @@ -89,9 +89,13 @@
"seqkit": "2.9.0"
},
"SPLIT_FASTA": {
"python": "3.6.7",
"biopython": "1.7.4",
"pandas": "1.1.5"
"pandas": "1.1.5",
"python": "3.6.7"
},
"TIARA_CLASSIFY": {
"r-base": "4.1.3",
"r-tidyverse": "1.3.1"
},
"TIARA_SUMMARY": {
"csvtk": "0.31.0"
Expand All @@ -104,16 +108,14 @@
},
"Workflow": {
"nf-core/mag": "v5.3.0dev"
},
"r-base": "4.1.3",
"r-tidyverse": "1.3.1"
}
}
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-11-07T11:50:38.41461775"
"timestamp": "2025-11-12T08:15:35.162392538"
},
"qc": {
"content": [
Expand Down Expand Up @@ -240,11 +242,7 @@
"MEGAHIT-MetaBAT2-test_minigut_sample2.tooShort.fa.gz:md5,f9479e7fb34586a2892cd7bc323d414a",
"MEGAHIT-MetaBAT2-test_minigut.unbinned.remaining.fa.gz:md5,7ac001a38113812061f8ef5c94e3f579",
"MEGAHIT-MetaBAT2-test_minigut_sample2.unbinned.remaining.fa.gz:md5,e1a969d6e292e10a81ef4236907984a9",
"predicted.faa:md5,8e0d0014fb0a1e56fa8b8f47e20f2bcf",
"predicted.fna:md5,e4dc769d029b05cfe724cfa5ef214f10",
"refseq_db.faa:md5,0d53f0a1964cc202e99f4851839273a3",
"predicted.faa:md5,5e5160a0e0af28ccccd6459e887269ee",
"predicted.fna:md5,df236064ad2e0c699c029a89a6267bcf",
"refseq_db.faa:md5,0d53f0a1964cc202e99f4851839273a3",
"MEGAHIT-MetaBAT2-test_minigut.1.faa:md5,ba436cbba64ce111f228da1e2daac642",
"MEGAHIT-MetaBAT2-test_minigut.2.faa:md5,577adc1aa1ebd51fed46f726ad90d9b3",
Expand Down
Loading