Thomas K
10/29/2026, 4:13 PMdef stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
def stable_file = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
{ assert snapshot(
removeNextflowVersion("$outputDir/pipeline_info/qcflow_software_mqc_versions.yml"),
stable_name,
stable_file
).match() }
and somehow the hashes magically appear in the snapshot behind the corresponding file, like
[
"Sample1.bam:md5,b659fef4c129faf27bb69210b6a9fcc7",
"Sample1.bam.bai:md5,da403861301abccd8f6314c6390f7989",
...
]
for the stable_file. However, if I now do this again in another test, i.e. passing a few files collected via getAllFilesFromDir() or getAllFilesFromPath() to the snapshot(), then I don't have the hashes but only the relative file paths like in stable_name. Can you remind me, what is the mechanics that adds the hashes?Maxime Garcia
10/29/2026, 4:16 PMMaxime Garcia
10/29/2026, 4:16 PMMaxime Garcia
10/29/2026, 4:17 PMMaxime Garcia
10/29/2026, 4:19 PMMaxime Garcia
10/29/2026, 4:19 PMMaxime Garcia
10/29/2026, 4:20 PMThomas K
10/29/2026, 4:21 PMThomas K
10/29/2026, 4:23 PMstable_name files are not getting the hash suffix in the snapshot, but stable_files do.Maxime Garcia
10/29/2026, 4:24 PMMaxime Garcia
10/29/2026, 4:31 PMThomas K
10/29/2026, 5:09 PMdef baiFiles = getAllFilesFromPath(params.outdir, relative: true, include: ["**/bam/*.bai"])
def baiFilesMD5 = getAllFilesFromPath(params.outdir, relative: false, include: ["**/bam/*.bai"])
but it did not just not print the hashes but also repeated the relative paths... 😞
Result:
[
"path/to/my/Sample1.bam.bai",
"path/to/my/Sample2.bam.bai",
"path/to/my/Sample3.bam.bai",
"path/to/my/Sample4.bam.bai",
],
[
"path/to/my/Sample1.bam.bai",
"path/to/my/Sample2.bam.bai",
"path/to/my/Sample3.bam.bai",
"path/to/my/Sample4.bam.bai",
],
[nft-utils-1.0.0]Maxime Garcia
10/29/2026, 5:10 PMThomas K
10/29/2026, 5:13 PMThomas K
11/03/2026, 2:07 PMgetAllFilesFromPath() function (and getAllFilesFromDir() is depreciated). TL;DR: use the old function for the time being and specify relative:true. So, @Maxime Garcia you were kind of correct on this one 🙂Maxime Garcia
11/03/2026, 2:17 PMThomas K
11/03/2026, 2:57 PM