What’s new?
Nextflow workflows definitions are picked up by Viash and assembled into a functional Nextflow workflow, reducing the amount of boilerplate code needed to be written by the user. It also adds a new runIf argument to the NextflowPlatform which allows for conditional execution of modules. We added new ‘dependencies’ functionality to allow for more advanced functionality to be offloaded and re-used in components and workflows.
Full changelog
BREAKING CHANGES
NextflowPlatform: Changed the default value ofauto.simplifyOutputfromtruetofalse(#522, PR #518). WithsimplifyOutputset totrue, the resulting Map could be simplified into aFileor aList[File]depending on the number of outputs. To replicate the previous behaviour, add the following config mod to_viash.yaml:config_mods: | .platforms[.type == 'nextflow'].auto.simplifyOutput := trueVDSL3Helper.nf: Removed from the Viash jar file (PR #518). Its functions have been moved toWorkflowHelper.nf.DataflowHelper.nf: Added deprecation warning to functions from this file (PR #518).preprocessInputs()inWorkflowHelper.nf: Added deprecation warning topreprocessInputs()because this function causes a synchronisation event (PR #518).author.props: Removed deprecatedpropsfield (PR #536). Deprecated since 0.7.4.
NEW FUNCTIONALITY
dependencies: Adddependenciesandrepositoriestofunctionality(PR #509). The new functionality allows specifying dependencies and where to retrieve (repositories) them in a component, and subsequentially allows advanced functionality to be offloaded and re-used in scripts and projects. This is alike e.g.npm,pipand many others. A big difference is that we aim to provide the needed boilerplate code to ease the usage of the dependencies in scripts, workflows and pipelines. Note that the dependency is required to be a built Viash component or project and not a random file or code project found externally. This is needed to provide the necessary background information to correctly link dependencies into a component.NextflowScript&NextflowPlatform: Merged code for merging themain.nffiles for VDSL3 components and wrapped Nextflow workflows (PR #518). By aligning the codebase for these two, wrapped Nextflow workflows are more similar to VDSL3 components. For example, you can override the behaviour of a wrapped Nextflow workflow using the.run()method. Status of a workflows.run()arguments:- Works as intended:
auto.simplifyInput,auto.simplifyOutput,fromState,toState,map,mapData,mapPassthrough,filter,auto.publish = "state" - Does not work (yet):
auto.transcript,auto.publish = true,directives,debug.
In a next PR, each of the dependencies will have their values overridden by the arguments of the
.run.- Works as intended:
NextflowPlatform: The data passed to the input of a component and produced as output by the component are now validated against the arguments defined in the Viash config (PR #518).NextflowPlatform: UsestageAsto allow duplicate filenames to be used automatigically (PR #518).NextflowPlatform: When wrapping Nextflow workflows, throw an error if the IDs of the output channel doesn’t match the IDs of the input channel (PR #518). If they don’t, the workflow should store the original ID of the input tuple in the in the_meta.join_idfield inside the state as follows: Example input event:["id", [input: file(...)]], Example output event:["newid", [output: file(...), _meta: [join_id: "id"]]]NextflowPlatform: Added new.run()argumentrunIf- a function that determines whether the module should be run or not (PR #553). If therunIfclosure evaluates totrue, then the module will be run. Otherwise it will be passed through without running.
MAJOR CHANGES
WorkflowHelper.nf: The workflow helper was split into different helper files for each of the helper functions (PR #518). For now, these helper files are pasted together to recreate theWorkflowHelper.nf. In Viash development environments, don’t forget to run./configureto start using the updated Makefile.NextflowPlatform: Set default tag to"$id"(#521, PR #518).NextflowPlatform: Refactoring of helper functions (PR #557).- Cleaned up
processConfig(): Removed support forfunctionality.inputsandfunctionality.outputs - Cleaned up
processConfig(): Removed support for.functionality.argument_groups[].argumentcontaining a list of argument ids as opposed to the arguments themselves. - Rewrote
--param_listparser. - Removed unused function
applyConfig()andapplyConfigToOneParamSet(). - Refactored
channelFromParams()to make use of new helper functions. - Removed deprecated
paramsToChannel(),paramsToList(),viashChannel(). - Deprecated
preprocessInputs()– use the wrapped Viash Nextflow functionality instead. - Refactored
preprocessInputs()to make use of new helper functions. - Deprecated run arguments
map,mapData,mapPassthrough,renameKeys.
- Cleaned up
MINOR CHANGES
NextflowPlatform: Throw error when unexpected keys are passed to the.run()method (#512, PR #518).Testbenches: Add testbenches for the newdependenciesfunctionality and other small coverage improvements (PR #524).NextflowPlatform: UsemoduleDirinstead ofprojectDirto determine the resource directory.NextflowPlatform: Rename internal VDSL3 variables to be more consistent with regular Viash component variables and avoid naming clashes (PR #553).
DOCUMENTATION
- Minor fixes to VDSL3 reference documentation (PR #508).
BUG FIXES
WorkflowHelper.nf: Only set default values of output files which are not already set, and if the output file argument is not required (PR #514).NextflowPlatform: When usingfromStateandtoState, do not throw an error when the state or output is missing an optional argument (PR #515).export cli_autocomplete: Fix output script format and hide--logleveland--colorize(PR #544). Masked arguments are usable but might not be very useful to always display in help messages.