kraemer-lab / GRAPEVNE

Graphical Analytical Pipeline Development Evironment
MIT License
6 stars 3 forks source link

Input namespaces can be left dangling when unconnected #308

Open jsbrittain opened 1 month ago

jsbrittain commented 1 month ago

For example, a module can have two input ports:

input_namespace:
    data: data
    config: config

When connecting a module to the 'data' input, the 'data' namespace is remapped; however, if the 'config' port is not connected then it can be left dangling pointing at 'config'. It should probably be nullified (set to ""). This would allow port connections to be tested in the module's Snakefile, and prevent inadvertent linkages.

The Anderson Brito Subsampler is a good use-case to test this with: https://github.com/kraemer-lab/vneyard/pull/35, where the config port should act as an override rather than a requirement. edit: This may not be the best example as the 'keep' config file is a required input.

jsbrittain commented 3 weeks ago

By default, GRAPEVNE will turn any workflow into a single module and attempt to launch it. This means that, in the above example, the dangling 'config' namespace will be remapped as an input to the wider 'parent' module. This could either be stopped (by removing the module construction prior to launch), or the parent input could default to the empty string (this cannot be null as this has special significance as a 'source' module; although since the inputs are named this could be overcome).