Skip to content

Commit 8d62f18

Browse files
authored
Use sanitized snapshots for gcta/makegrm tests (#11765)
1 parent 9a111d6 commit 8d62f18

2 files changed

Lines changed: 28 additions & 79 deletions

File tree

modules/nf-core/gcta/makegrm/tests/main.nf.test

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,9 @@ nextflow_process {
3535
then {
3636
assertAll(
3737
{ assert process.success },
38-
{ assert process.out.grm_files.size() == 1 },
39-
{ assert process.out.grm_files.get(0).get(0).id == 'gcta_grm' },
40-
{ assert process.out.grm_files.get(0).get(0).keySet() == ['id'] as Set },
41-
{ assert process.out.grm_files.get(0).get(1).size() == 3 },
42-
{
43-
assert process.out.grm_files.get(0).get(1).collect { file(it).name }.toSet() == [
44-
'gcta_grm.grm.id',
45-
'gcta_grm.grm.bin',
46-
'gcta_grm.grm.N.bin'
47-
] as Set
48-
},
4938
{ assert file(path(process.out.grm_files.get(0).get(1)[0]).parent.toString() + '/.command.sh').text.contains('--make-grm') },
5039
{ assert file(path(process.out.grm_files.get(0).get(1)[0]).parent.toString() + '/.command.sh').text.contains('--mpfile') },
51-
{
52-
assert snapshot(
53-
process.out.grm_files,
54-
process.out.findAll { key, val -> key.startsWith('versions') }
55-
).match()
56-
}
40+
{ assert snapshot(sanitizeOutput(process.out)).match() }
5741
)
5842
}
5943
}
@@ -84,25 +68,9 @@ nextflow_process {
8468
then {
8569
assertAll(
8670
{ assert process.success },
87-
{ assert process.out.grm_files.size() == 1 },
88-
{ assert process.out.grm_files.get(0).get(0).id == 'gcta_grm_bed' },
89-
{ assert process.out.grm_files.get(0).get(0).keySet() == ['id'] as Set },
90-
{ assert process.out.grm_files.get(0).get(1).size() == 3 },
91-
{
92-
assert process.out.grm_files.get(0).get(1).collect { file(it).name }.toSet() == [
93-
'gcta_grm_bed.grm.id',
94-
'gcta_grm_bed.grm.bin',
95-
'gcta_grm_bed.grm.N.bin'
96-
] as Set
97-
},
9871
{ assert file(path(process.out.grm_files.get(0).get(1)[0]).parent.toString() + '/.command.sh').text.contains('--make-grm') },
9972
{ assert file(path(process.out.grm_files.get(0).get(1)[0]).parent.toString() + '/.command.sh').text.contains('--mbfile') },
100-
{
101-
assert snapshot(
102-
process.out.grm_files,
103-
process.out.findAll { key, val -> key.startsWith('versions') }
104-
).match()
105-
}
73+
{ assert snapshot(sanitizeOutput(process.out)).match() }
10674
)
10775
}
10876
}
@@ -135,7 +103,7 @@ nextflow_process {
135103
then {
136104
assertAll(
137105
{ assert process.success },
138-
{ assert snapshot(process.out).match() }
106+
{ assert snapshot(sanitizeOutput(process.out)).match() }
139107
)
140108
}
141109
}
Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"homo_sapiens popgen - plink2": {
33
"content": [
4-
[
5-
[
6-
{
7-
"id": "gcta_grm"
8-
},
4+
{
5+
"grm_files": [
96
[
10-
"gcta_grm.grm.N.bin:md5,acaa43bbbf2253d392537a178ecf09a4",
11-
"gcta_grm.grm.bin:md5,45f8dff14bda17d50009a21050572228",
12-
"gcta_grm.grm.id:md5,4f9aa36c44a417ff6d7caa9841e66ad9"
7+
{
8+
"id": "gcta_grm"
9+
},
10+
[
11+
"gcta_grm.grm.N.bin:md5,acaa43bbbf2253d392537a178ecf09a4",
12+
"gcta_grm.grm.bin:md5,45f8dff14bda17d50009a21050572228",
13+
"gcta_grm.grm.id:md5,4f9aa36c44a417ff6d7caa9841e66ad9"
14+
]
1315
]
14-
]
15-
],
16-
{
16+
],
1717
"versions_gcta": [
1818
[
1919
"GCTA_MAKEGRM",
@@ -27,23 +27,23 @@
2727
"nf-test": "0.9.3",
2828
"nextflow": "25.10.4"
2929
},
30-
"timestamp": "2026-05-15T21:08:43.209734458"
30+
"timestamp": "2026-05-26T21:43:59.883031834"
3131
},
3232
"homo_sapiens popgen - plink1": {
3333
"content": [
34-
[
35-
[
36-
{
37-
"id": "gcta_grm_bed"
38-
},
34+
{
35+
"grm_files": [
3936
[
40-
"gcta_grm_bed.grm.N.bin:md5,acaa43bbbf2253d392537a178ecf09a4",
41-
"gcta_grm_bed.grm.bin:md5,45f8dff14bda17d50009a21050572228",
42-
"gcta_grm_bed.grm.id:md5,4f9aa36c44a417ff6d7caa9841e66ad9"
37+
{
38+
"id": "gcta_grm_bed"
39+
},
40+
[
41+
"gcta_grm_bed.grm.N.bin:md5,acaa43bbbf2253d392537a178ecf09a4",
42+
"gcta_grm_bed.grm.bin:md5,45f8dff14bda17d50009a21050572228",
43+
"gcta_grm_bed.grm.id:md5,4f9aa36c44a417ff6d7caa9841e66ad9"
44+
]
4345
]
44-
]
45-
],
46-
{
46+
],
4747
"versions_gcta": [
4848
[
4949
"GCTA_MAKEGRM",
@@ -57,30 +57,11 @@
5757
"nf-test": "0.9.3",
5858
"nextflow": "25.10.4"
5959
},
60-
"timestamp": "2026-05-15T21:09:34.058651287"
60+
"timestamp": "2026-05-26T21:44:08.158125889"
6161
},
6262
"homo_sapiens popgen - plink1 - stub": {
6363
"content": [
6464
{
65-
"0": [
66-
[
67-
{
68-
"id": "gcta_grm_bed"
69-
},
70-
[
71-
"gcta_grm_bed.grm.N.bin:md5,d41d8cd98f00b204e9800998ecf8427e",
72-
"gcta_grm_bed.grm.bin:md5,d41d8cd98f00b204e9800998ecf8427e",
73-
"gcta_grm_bed.grm.id:md5,d41d8cd98f00b204e9800998ecf8427e"
74-
]
75-
]
76-
],
77-
"1": [
78-
[
79-
"GCTA_MAKEGRM",
80-
"gcta",
81-
"1.94.1"
82-
]
83-
],
8465
"grm_files": [
8566
[
8667
{
@@ -106,6 +87,6 @@
10687
"nf-test": "0.9.3",
10788
"nextflow": "25.10.4"
10889
},
109-
"timestamp": "2026-05-15T21:10:21.024687128"
90+
"timestamp": "2026-05-26T21:44:19.878280249"
11091
}
11192
}

0 commit comments

Comments
 (0)