hello! anybody knows what is the syntax for nf-tes...
# modules
s
hello! anybody knows what is the syntax for nf-test to check the name of multiple files from module output? I tried this:
Copy code
process.out.plot_png.collect{ file(it[1]).name }, //assert unstable file
but then I get this error:
Copy code
Test [154b7735] 'test' groovy.lang.MissingMethodException: No signature of method: static com.askimed.nf.test.lang.extensions.GlobalMethods.file() is applicable for argument types: (ArrayList) values: [[/workspace/modules/.nf-test/tests/154b773513d3eb67769ab6d292a5ec57/work/c9/be55426c2f234116c39bf31a29c889/Condition_genotype_WT_KO.gprofiler2.GO:BP.sub_enriched_pathways.png, ...]]
Possible solutions: file(java.lang.String), find(), find(groovy.lang.Closure), use([Ljava.lang.Object;), is(java.lang.Object), with(groovy.lang.Closure)
j
I don't think you need the collect?
Just file(process.out.plot_png[0][1]).name() should work...(or something like that) by default applying all the functions to all paths in the list
s
it would not work… somehow it cannot deal with the array of files
j
Maybe
flatten()
before the name?
@Nicolas Vannieuwkerke any ideas?
n
Seems like the output is a list of files instead of one file 😛 Adding
.collect { file(it).name() }
instead of
.name()
should fix it
j
Oooohhhh
s
It works now with collect! Thank you a lot! :)
🎉 1
n
you are welcome