Skip to content

Commit 5868522

Browse files
authored
Merge pull request #905 from dialvarezs/snapshot_assembly_input
Snapshot for `-profile test_assembly_input`
2 parents a9f0087 + c8f62e6 commit 5868522

14 files changed

+703
-144
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
### `Added`
99

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

1214
### `Fixed`

conf/test_assembly_input.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ process {
2222

2323
process {
2424
withName: METAEUK_EASYPREDICT {
25+
cpus = 1 // to keep output order consistent
2526
ext.args = '-s 1 --max-seqs 10 --max-accept 1'
2627
}
2728
}
@@ -36,6 +37,7 @@ params {
3637

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

4042
skip_quast = true
4143
skip_prodigal = true

modules/local/tiara_classify/main.nf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ process TIARA_CLASSIFY {
4242
done < bin2classification.tsv
4343
4444
cat <<-END_VERSIONS > versions.yml
45+
"${task.process}":
4546
r-base: \$(R --version | head -n 1 | grep -Eo '[0-9.]+ ')
4647
r-tidyverse: \$(cat tidyverse_version.txt)
4748
END_VERSIONS

nf-test.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ config {
1919

2020
// load the necessary plugins
2121
plugins {
22-
load "nft-utils@0.0.3"
22+
load "nft-csv@0.1.0"
2323
24+
2425
}
2526
}

tests/.nftignore

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
11
.DS_Store
2-
multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt
3-
multiqc/multiqc_data/multiqc.parquet
4-
multiqc/multiqc_data/multiqc.log
5-
multiqc/multiqc_data/multiqc_data.json
6-
multiqc/multiqc_data/multiqc_sources.txt
7-
multiqc/multiqc_data/multiqc_sources.yaml
8-
multiqc/multiqc_data/multiqc_software_versions.txt
9-
multiqc/multiqc_data/multiqc_software_versions.yaml
10-
multiqc/multiqc_data/llms-full.txt
11-
multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png}
12-
multiqc/multiqc_report.html
13-
pipeline_info/*.{html,json,txt,yml}
142
Assembly/MEGAHIT/*.log
153
Assembly/MEGAHIT/QC/*/*.bowtie2.log
4+
GenomeBinning/CONCOCT/stats/*_{original,PCA_components,PCA_transformed}_data_gt1000.csv
5+
GenomeBinning/CONCOCT/stats/*_log.txt
6+
GenomeBinning/CONCOCT/stats/*.tsv
7+
GenomeBinning/DASTool/*.log
168
GenomeBinning/depths/**/*-depth.txt.gz
179
GenomeBinning/depths/bins/*.png
1810
GenomeBinning/MetaBAT2/unbinned/discarded/*.unbinned.pooled.fa.gz
19-
GenomeBinning/QC/CheckM2/**/DIAMOND_RESULTS.tsv
20-
GenomeBinning/QC/CheckM2/*/checkm2.log
2111
GenomeBinning/QC/busco_summary.tsv
22-
GenomeBinning/QC/BUSCO/**/*.log
2312
GenomeBinning/QC/BUSCO/**/.checkpoint
13+
GenomeBinning/QC/BUSCO/**/{logs,prodigal_output,busco_sequences}/**
2414
GenomeBinning/QC/BUSCO/**/*.json
15+
GenomeBinning/QC/BUSCO/**/*.log
2516
GenomeBinning/QC/BUSCO/**/*.txt
17+
GenomeBinning/QC/BUSCO/**/short_summary*.{txt,json}
18+
GenomeBinning/QC/BUSCO/*/*{-busco.log,-busco.batch_summary.txt}
19+
GenomeBinning/QC/CheckM2/**/DIAMOND_RESULTS.tsv
20+
GenomeBinning/QC/CheckM2/*/checkm2.log
21+
multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt
22+
multiqc/multiqc_data/llms-full.txt
23+
multiqc/multiqc_data/multiqc_data.json
24+
multiqc/multiqc_data/multiqc_software_versions.txt
25+
multiqc/multiqc_data/multiqc_software_versions.yaml
26+
multiqc/multiqc_data/multiqc_sources.txt
27+
multiqc/multiqc_data/multiqc_sources.yaml
28+
multiqc/multiqc_data/multiqc.log
29+
multiqc/multiqc_data/multiqc.parquet
30+
multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png}
31+
multiqc/multiqc_report.html
32+
pipeline_info/*.{html,json,txt,yml}
2633
QC_shortreads/fastqc/*_fastqc.{html,zip}
2734
QC_shortreads/remove_phix/*.log

tests/default.nf.test.snap

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"coreutils": 9.5
77
},
88
"BIN_SUMMARY": {
9-
"python": "3.10.6",
10-
"pandas": "1.4.3"
9+
"pandas": "1.4.3",
10+
"python": "3.10.6"
1111
},
1212
"BOWTIE2_ASSEMBLY_ALIGN": {
1313
"bowtie2": "2.4.2",
14-
"samtools": 1.11,
15-
"pigz": "2.3.4"
14+
"pigz": "2.3.4",
15+
"samtools": 1.11
1616
},
1717
"BOWTIE2_ASSEMBLY_BUILD": {
1818
"bowtie2": "2.4.2"
@@ -60,15 +60,15 @@
6060
"fastqc": "0.12.1"
6161
},
6262
"GTDBTK_CLASSIFYWF": {
63-
"gtdbtk": "2.5.2",
64-
"gtdb_db": "r226"
63+
"gtdb_db": "r226",
64+
"gtdbtk": "2.5.2"
6565
},
6666
"GTDBTK_DB_PREPARATION": {
6767
"tar": 1.34
6868
},
6969
"GTDBTK_SUMMARY": {
70-
"python": "3.10.6",
71-
"pandas": "1.4.3"
70+
"pandas": "1.4.3",
71+
"python": "3.10.6"
7272
},
7373
"GUNZIP_BINS": {
7474
"gunzip": 1.13
@@ -80,17 +80,17 @@
8080
"gunzip": 1.13
8181
},
8282
"MAG_DEPTHS": {
83-
"python": "3.6.7",
84-
"pandas": "1.1.5"
83+
"pandas": "1.1.5",
84+
"python": "3.6.7"
8585
},
8686
"MAG_DEPTHS_PLOT": {
87-
"python": "3.9.6",
8887
"pandas": "1.3.0",
88+
"python": "3.9.6",
8989
"seaborn": "0.11.0"
9090
},
9191
"MAG_DEPTHS_SUMMARY": {
92-
"python": "3.10.6",
93-
"pandas": "1.4.3"
92+
"pandas": "1.4.3",
93+
"python": "3.10.6"
9494
},
9595
"MAXBIN2": {
9696
"maxbin2": "2.2.7"
@@ -108,19 +108,19 @@
108108
"spades": "4.1.0"
109109
},
110110
"PRODIGAL": {
111-
"prodigal": "2.6.3",
112-
"pigz": 2.6
111+
"pigz": 2.6,
112+
"prodigal": "2.6.3"
113113
},
114114
"PROKKA": {
115115
"prokka": "1.14.6"
116116
},
117117
"QUAST": {
118-
"python": "3.7.6",
119-
"metaquast": "5.0.2"
118+
"metaquast": "5.0.2",
119+
"python": "3.7.6"
120120
},
121121
"QUAST_BINS": {
122-
"python": "3.7.6",
123-
"metaquast": "5.0.2"
122+
"metaquast": "5.0.2",
123+
"python": "3.7.6"
124124
},
125125
"QUAST_BINS_SUMMARY": {
126126
"cp": 9.5
@@ -129,9 +129,9 @@
129129
"seqkit": "2.9.0"
130130
},
131131
"SPLIT_FASTA": {
132-
"python": "3.6.7",
133132
"biopython": "1.7.4",
134-
"pandas": "1.1.5"
133+
"pandas": "1.1.5",
134+
"python": "3.6.7"
135135
},
136136
"Workflow": {
137137
"nf-core/mag": "v5.3.0dev"
@@ -142,7 +142,7 @@
142142
"nf-test": "0.9.3",
143143
"nextflow": "25.10.0"
144144
},
145-
"timestamp": "2025-11-07T11:47:54.060594176"
145+
"timestamp": "2025-11-11T08:17:18.125734263"
146146
},
147147
"multiqc": {
148148
"content": [

tests/test_alternatives.nf.test

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ nextflow_pipeline {
1010

1111
when {
1212
params {
13-
outdir = "$outputDir"
13+
outdir = "${outputDir}"
1414
}
1515
}
1616

@@ -61,7 +61,7 @@ nextflow_pipeline {
6161
params.outdir, include: ['GenomeBinning/MetaBAT2/bins/*.fa.gz']
6262
)
6363
def metabat2_unbins = getAllFilesFromDir(
64-
params.outdir, include: ['GenomeBinning/MetaBAT2/{discarded,unbinned}/*.fa.gz']
64+
params.outdir, include: ['GenomeBinning/MetaBAT2/{discarded,unbinned/*}/*.fa.gz']
6565
)
6666

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

75+
assert workflow.success
7576
assertAll(
76-
{ assert workflow.success },
7777
{ assert snapshot(
78-
workflow.trace.succeeded().size(),
79-
removeNextflowVersion("${outputDir}/pipeline_info/nf_core_mag_software_mqc_versions.yml"),
80-
).match()
81-
},
78+
workflow.trace.succeeded().size(),
79+
removeNextflowVersion("${outputDir}/pipeline_info/nf_core_mag_software_mqc_versions.yml"),
80+
).match() },
8281
{ assert snapshot(stable_name_qc, stable_path_qc ).match('qc') },
8382
{ assert snapshot(stable_name_assembly, stable_path_assembly).match('assembly') },
8483
{ assert snapshot(stable_name_binning, stable_path_binning ).match('binning') },
@@ -87,10 +86,12 @@ nextflow_pipeline {
8786
checkm2_diamond_results.collect { results -> results.text.readLines().size() },
8887
).match('checkm2_diamond_results')
8988
},
89+
9090
// FASTA checks
9191
{ assert megahit_contigs.collect { contigs -> path("${contigs}").fasta.size() > 0 }.every() },
9292
{ assert metabat2_bins.collect { contigs -> path("${contigs}").fasta.size() > 0 }.every() },
9393
{ assert metabat2_unbins.collect { contigs -> path("${contigs}").fasta.size() >= 0 }.every() },
94+
9495
// Log checks
9596
{ assert remove_phix_logs.collect {
9697
log -> log.readLines().last() ==~ /[0-9.]+% overall alignment rate/

tests/test_alternatives.nf.test.snap

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
43,
1717
{
1818
"BIN_SUMMARY": {
19-
"python": "3.10.6",
20-
"pandas": "1.4.3"
19+
"pandas": "1.4.3",
20+
"python": "3.10.6"
2121
},
2222
"BOWTIE2_ASSEMBLY_ALIGN": {
2323
"bowtie2": "2.4.2",
24-
"samtools": 1.11,
25-
"pigz": "2.3.4"
24+
"pigz": "2.3.4",
25+
"samtools": 1.11
2626
},
2727
"BOWTIE2_ASSEMBLY_BUILD": {
2828
"bowtie2": "2.4.2"
@@ -64,17 +64,17 @@
6464
"gunzip": 1.13
6565
},
6666
"MAG_DEPTHS": {
67-
"python": "3.6.7",
68-
"pandas": "1.1.5"
67+
"pandas": "1.1.5",
68+
"python": "3.6.7"
6969
},
7070
"MAG_DEPTHS_PLOT": {
71-
"python": "3.9.6",
7271
"pandas": "1.3.0",
72+
"python": "3.9.6",
7373
"seaborn": "0.11.0"
7474
},
7575
"MAG_DEPTHS_SUMMARY": {
76-
"python": "3.10.6",
77-
"pandas": "1.4.3"
76+
"pandas": "1.4.3",
77+
"python": "3.10.6"
7878
},
7979
"MEGAHIT": {
8080
"megahit": "1.2.9"
@@ -89,9 +89,13 @@
8989
"seqkit": "2.9.0"
9090
},
9191
"SPLIT_FASTA": {
92-
"python": "3.6.7",
9392
"biopython": "1.7.4",
94-
"pandas": "1.1.5"
93+
"pandas": "1.1.5",
94+
"python": "3.6.7"
95+
},
96+
"TIARA_CLASSIFY": {
97+
"r-base": "4.1.3",
98+
"r-tidyverse": "1.3.1"
9599
},
96100
"TIARA_SUMMARY": {
97101
"csvtk": "0.31.0"
@@ -104,16 +108,14 @@
104108
},
105109
"Workflow": {
106110
"nf-core/mag": "v5.3.0dev"
107-
},
108-
"r-base": "4.1.3",
109-
"r-tidyverse": "1.3.1"
111+
}
110112
}
111113
],
112114
"meta": {
113115
"nf-test": "0.9.3",
114116
"nextflow": "25.10.0"
115117
},
116-
"timestamp": "2025-11-07T11:50:38.41461775"
118+
"timestamp": "2025-11-12T08:15:35.162392538"
117119
},
118120
"qc": {
119121
"content": [
@@ -240,11 +242,7 @@
240242
"MEGAHIT-MetaBAT2-test_minigut_sample2.tooShort.fa.gz:md5,f9479e7fb34586a2892cd7bc323d414a",
241243
"MEGAHIT-MetaBAT2-test_minigut.unbinned.remaining.fa.gz:md5,7ac001a38113812061f8ef5c94e3f579",
242244
"MEGAHIT-MetaBAT2-test_minigut_sample2.unbinned.remaining.fa.gz:md5,e1a969d6e292e10a81ef4236907984a9",
243-
"predicted.faa:md5,8e0d0014fb0a1e56fa8b8f47e20f2bcf",
244-
"predicted.fna:md5,e4dc769d029b05cfe724cfa5ef214f10",
245245
"refseq_db.faa:md5,0d53f0a1964cc202e99f4851839273a3",
246-
"predicted.faa:md5,5e5160a0e0af28ccccd6459e887269ee",
247-
"predicted.fna:md5,df236064ad2e0c699c029a89a6267bcf",
248246
"refseq_db.faa:md5,0d53f0a1964cc202e99f4851839273a3",
249247
"MEGAHIT-MetaBAT2-test_minigut.1.faa:md5,ba436cbba64ce111f228da1e2daac642",
250248
"MEGAHIT-MetaBAT2-test_minigut.2.faa:md5,577adc1aa1ebd51fed46f726ad90d9b3",

0 commit comments

Comments
 (0)