Skip to content

Commit 41dd263

Browse files
committed
Updated snapshots and added a test
1 parent c7d4d72 commit 41dd263

File tree

3 files changed

+153
-5
lines changed

3 files changed

+153
-5
lines changed

tests/hic/main.nf.test

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,57 @@ nextflow_pipeline {
5454

5555
}
5656

57+
test("hic - HY - test - assembly") {
58+
59+
when {
60+
params {
61+
input = "$baseDir/tests/hic/assemblysheet.csv"
62+
hic = "$baseDir/tests/hic/testdata/HYh1h2_Chr01_6000000_6015000.R{1,2}.fastq.gz"
63+
hic_assembly_mode = true
64+
hic_juicer_tools_pre_ext_args = '-n'
65+
outdir = "$outputDir"
66+
}
67+
}
68+
69+
then {
70+
def stable_path = getAllFilesFromDir(
71+
params.outdir,
72+
false,
73+
[
74+
'pipeline_info/*.{html,json,txt,yml}',
75+
'hic/fastp/*.fastq.gz',
76+
'hic/fastp/*.html',
77+
'hic/fastp/*.log',
78+
'hic/hicqc/*.pdf',
79+
'report.{html,json}'
80+
],
81+
null,
82+
['**']
83+
)
84+
85+
def stable_name = getAllFilesFromDir(
86+
params.outdir,
87+
true,
88+
[
89+
'pipeline_info/*.{html,json,txt,yml}'
90+
],
91+
null,
92+
['**']
93+
)
94+
95+
assertAll(
96+
{ assert workflow.success},
97+
{ assert snapshot(
98+
[
99+
'successful tasks': workflow.trace.succeeded().size(),
100+
'versions': removeNextflowVersion("$outputDir/pipeline_info/software_versions.yml"),
101+
'stable paths': stable_path,
102+
'stable names': getRelativePath(stable_name, outputDir),
103+
]
104+
).match() }
105+
)
106+
}
107+
108+
}
109+
57110
}

tests/hic/main.nf.test.snap

Lines changed: 97 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,99 @@
11
{
2+
"hic - HY - test - assembly": {
3+
"content": [
4+
{
5+
"successful tasks": 18,
6+
"versions": {
7+
"ASSEMBLATHON_STATS": {
8+
"assemblathon_stats": "github/PlantandFoodResearch/assemblathon2-analysis/a93cba2"
9+
},
10+
"BWA_INDEX": {
11+
"bwa": "0.7.18-r1243-dirty"
12+
},
13+
"BWA_MEM": {
14+
"bwa": "0.7.18-r1243-dirty",
15+
"samtools": 1.21
16+
},
17+
"FALINT": {
18+
"fa-lint": "1.1.0"
19+
},
20+
"FASTP": {
21+
"fastp": "0.24.0"
22+
},
23+
"GUNZIP_FASTA": {
24+
"gunzip": 1.13
25+
},
26+
"HIC2HTML": {
27+
"python": "3.11.3"
28+
},
29+
"HICQC": {
30+
"hic_qc.py": "1.3.1"
31+
},
32+
"JUICEBOXSCRIPTS_MAKEAGPFROMFASTA": {
33+
"juicebox_scripts": "0.1.0"
34+
},
35+
"JUICERTOOLS_PRE": {
36+
"juicertools": "2.20.00"
37+
},
38+
"SAMBLASTER": {
39+
"samblaster": "0.1.26",
40+
"samtools": "1.19.2"
41+
},
42+
"SAMTOOLS_FAIDX": {
43+
"samtools": 1.21
44+
},
45+
"SEQKIT_RMDUP": {
46+
"seqkit": "v2.9.0"
47+
},
48+
"SEQKIT_SORT": {
49+
"seqkit": "v2.9.0"
50+
},
51+
"TAG_ASSEMBLY": {
52+
"pigz": "2.3.4"
53+
},
54+
"Workflow": {
55+
"plant-food-research-open/assemblyqc": "v3.0.0dev"
56+
},
57+
"YAHS_JUICERPRE": {
58+
"yahs": "1.2.2"
59+
}
60+
},
61+
"stable paths": [
62+
"HY_stats.csv:md5,fc61def49f669e7b3f885bf2555bcd46",
63+
"HY.assembly:md5,2154e1e2f2c12dd43765bc35a2003826",
64+
"HY.assembly.agp:md5,1389ded06e1056dd03d44a849788c4ad",
65+
"HY.hic:md5,171b1a467890960d0e5e16ebf13f9ce9",
66+
"HY.html:md5,074daab0df3a1352a1a263395b66d6c1",
67+
"HYh1h2_Chr01_6000000_6015000.R.fastp.json:md5,0f757d8f9e7b1fcf8cee5b18127ee02d"
68+
],
69+
"stable names": [
70+
"assemblathon_stats",
71+
"assemblathon_stats/HY_stats.csv",
72+
"hic",
73+
"hic/HY.assembly",
74+
"hic/HY.assembly.agp",
75+
"hic/HY.hic",
76+
"hic/HY.html",
77+
"hic/fastp",
78+
"hic/fastp/HYh1h2_Chr01_6000000_6015000.R.fastp.html",
79+
"hic/fastp/HYh1h2_Chr01_6000000_6015000.R.fastp.json",
80+
"hic/fastp/HYh1h2_Chr01_6000000_6015000.R.fastp.log",
81+
"hic/hicqc",
82+
"hic/hicqc/HY_qc_report.pdf",
83+
"pipeline_info",
84+
"report.html",
85+
"report.json",
86+
"synteny",
87+
"synteny/plotsr"
88+
]
89+
}
90+
],
91+
"meta": {
92+
"nf-test": "0.9.2",
93+
"nextflow": "25.04.2"
94+
},
95+
"timestamp": "2025-06-18T18:58:15.972463"
96+
},
297
"hic - HY - test": {
398
"content": [
499
{
@@ -27,7 +122,7 @@
27122
"python": "3.11.3"
28123
},
29124
"HICQC": {
30-
"hic_qc.py": 1.3
125+
"hic_qc.py": "1.3.1"
31126
},
32127
"JUICEBOXSCRIPTS_MAKEAGPFROMFASTA": {
33128
"juicebox_scripts": "0.1.0"
@@ -91,6 +186,6 @@
91186
"nf-test": "0.9.2",
92187
"nextflow": "25.04.2"
93188
},
94-
"timestamp": "2025-06-11T09:52:03.812486"
189+
"timestamp": "2025-06-18T18:51:07.785869"
95190
}
96191
}

tests/stub/main.nf.test.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"python": "3.11.3"
9797
},
9898
"HICQC": {
99-
"hic_qc.py": 1.3
99+
"hic_qc.py": "1.3.1"
100100
},
101101
"JUICEBOXSCRIPTS_MAKEAGPFROMFASTA": {
102102
"juicebox_scripts": "0.1.0"
@@ -293,6 +293,6 @@
293293
"nf-test": "0.9.2",
294294
"nextflow": "25.04.2"
295295
},
296-
"timestamp": "2025-06-06T15:19:38.285789"
296+
"timestamp": "2025-06-18T18:49:43.239383"
297297
}
298-
}
298+
}

0 commit comments

Comments
 (0)