I’m trying to create a groovy class that manipulates channels.
I can do this if I define the class within the .nf file that uses it. But if I try to move the class to a separate .nf file, or put it in a .groovy file which I then compile and include with a regular groovy include statement, I get errors. Trying to use include {MyClass} from classes.nf
results in an error ERROR ~ MyClass.<init>()
, while trying to use include MyClass
where MyClass is compiled in a .jar file results in an error that the channel
object is unknown.
Either a way of including classes defined in other .nf files, or a way of including the Nextflow dependencies like the channel object that would make it possible to include .jar classes that act on channel objects would solve my problem.
Thank you!