stevekm / nf-niceutils

nice utility methods for Nextflow pipelines
MIT License
1 stars 0 forks source link

adding a new Groovy file does not make the class's methods available to Nextflow #1

Open stevekm opened 5 months ago

stevekm commented 5 months ago

I tried adding a new Groovy file with a new class here https://github.com/stevekm/nf-niceutils/blob/main/src/main/groovy/com/nextflow/plugin/MyExtension.groovy

However even after getting it to build, the method included reverseString is not include'able inside the actual Nextflow script. I noticed that in the $HOME/.nextflow/plugins dir, I can see the file for MyExtension.class listed under the plugin dir, however none of its methods have class files of their own. Cannot figure out why or how to get newly added Groovy class files to be available from within Nextflow

@jagedn any ideas?

jagedn commented 5 months ago

I think you can't have more than 1 ExtensionPoint in your plugin

nextflow.exception.AbortOperationException: Plugin 'nf-niceutils' implements more than one extension point: MyExtension,ExampleFunctions at app//nextflow.plugin.extension.PluginExtensionProvider.loadPluginExtensionMethods(PluginExtensionProvider.groovy:118) at app//nextflow.script.IncludeDef.loadPlugin0(IncludeDef.groovy:221)

stevekm commented 5 months ago

if I want to add a whole bunch of functions, operators, observers, etc., does this mean it all needs to be attached to a single Class?

I am not clear what the relationship is between the .groovy files, the Classes in those files, and the extension points (or where the extension points are defined...)