Schema URL

Type: Config

One of

1. Config object

Definitions

Config object

A Viash configuration is a YAML file which contains metadata to describe the behaviour and build target(s) of a component.
We commonly name this file config.vsh.yaml in our examples, but you can name it however you choose.

name string required

Name of the component and the filename of the executable when built with viash build.

label string

A clean version of the component's name. This is only used for documentation.

license string

The license of the package.

authors Author[]

A list of authors. An author must at least have a name, but can also have a list of roles, an e-mail address, and a map of custom properties.

Suggested values for roles are:

RoleAbbrev.Description
maintainermntfor the maintainer of the code. Ideally, exactly one maintainer is specified.
authorautfor persons who have made substantial contributions to the software.
contributorctbfor persons who have made smaller contributions (such as code patches).
datacontributordtcfor persons or organisations that contributed data sets for the software
copyrightholdercphfor all copyright holders. This is a legal concept so should use the legal name of an institution or corporate body.
funderfndfor persons or organizations that furnished financial support for the development of the software

The full list of roles is extremely comprehensive.

status enum

Allows setting a component to active, deprecated or disabled.

Values: "enabled" "disabled" "deprecated"
requirements object

Computational requirements related to running the component.

3 nested properties
cpus integer

The maximum number of (logical) cpus a component is allowed to use.

commands string[]

A list of commands which should be present on the system for the script to function.

memory string

The maximum amount of memory a component is allowed to allocate. Unit must be one of B, KB, MB, GB, TB or PB for SI units (1000-base), or KiB, MiB, GiB, TiB or PiB for binary IEC units (1024-base).

repositories RepositoryWithName[]

(Pre-)defines repositories that can be used as repository in dependencies. Allows reusing repository definitions in case it is used in multiple dependencies.

dependencies Dependency[]

Allows listing Viash components required by this Viash component

summary string

A one-sentence summary of the component. This is only used for documentation.

functionality object

The functionality-part of the config file describes the behaviour of the script in terms of arguments and resources. By specifying a few restrictions (e.g. mandatory arguments) and adding some descriptions, Viash will automatically generate a stylish command-line interface for you.

20 nested properties
name string required

Name of the component and the filename of the executable when built with viash build.

organization string

The organization of the package.

argument_groups ArgumentGroup[]

A grouping of the arguments, used to display the help message.

  • name: foo, the name of the argument group.
  • description: Description of foo, a description of the argument group. Multiline descriptions are supported.
  • arguments: [arg1, arg2, ...], list of the arguments.
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

license string

The license of the package.

references object

A list of scholarly sources or publications relevant to the tools or analysis defined in the component. This is important for attribution, scientific reproducibility and transparency.

2 nested properties
bibtex string | string[]
doi string | string[]
authors Author[]

A list of authors. An author must at least have a name, but can also have a list of roles, an e-mail address, and a map of custom properties.

Suggested values for roles are:

RoleAbbrev.Description
maintainermntfor the maintainer of the code. Ideally, exactly one maintainer is specified.
authorautfor persons who have made substantial contributions to the software.
contributorctbfor persons who have made smaller contributions (such as code patches).
datacontributordtcfor persons or organisations that contributed data sets for the software
copyrightholdercphfor all copyright holders. This is a legal concept so should use the legal name of an institution or corporate body.
funderfndfor persons or organizations that furnished financial support for the development of the software

The full list of roles is extremely comprehensive.

status enum

Allows setting a component to active, deprecated or disabled.

Values: "enabled" "disabled" "deprecated"
requirements object

Computational requirements related to running the component.

3 nested properties
cpus integer

The maximum number of (logical) cpus a component is allowed to use.

commands string[]

A list of commands which should be present on the system for the script to function.

memory string

The maximum amount of memory a component is allowed to allocate. Unit must be one of B, KB, MB, GB, TB or PB for SI units (1000-base), or KiB, MiB, GiB, TiB or PiB for binary IEC units (1024-base).

repositories RepositoryWithName[]

(Pre-)defines repositories that can be used as repository in dependencies. Allows reusing repository definitions in case it is used in multiple dependencies.

test_resources Resource[]

One or more scripts to be used to test the component behaviour when viash test is invoked. Additional files of type file will be made available only during testing. Each test script should expect no command-line inputs, be platform-independent, and return an exit code >0 when unexpected behaviour occurs during testing. See Unit Testing for more info.

dependencies Dependency[]

Allows listing Viash components required by this Viash component

description string

A description of the component. This will be displayed with --help.

usage string

A description on how to use the component. This will be displayed with --help under the 'Usage:' section.

version string

Version of the component. This field will be used to version the executable and the Docker container.

links object

Links to external resources related to the component.

5 nested properties
repository string

Source repository url.

documentation string

Documentation website url.

docker_registry string

Docker registry url.

homepage string

Homepage website url.

issue_tracker string

Issue tracker url.

resources Resource[]

Resources are files that support the component. The first resource should be a script that will be executed when the functionality is run. Additional resources will be copied to the same directory.

Common properties:

  • type: file / r_script / python_script / bash_script / javascript_script / scala_script / csharp_script, specifies the type of the resource. The first resource cannot be of type file. When the type is not specified, the default type is simply file.
  • dest: filename, the resulting name of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.
  • path: path/to/file, the path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.
  • text: ...multiline text..., the content of the resulting file specified as a string. Mutually exclusive with path.
  • is_executable: true / false, whether the resulting resource file should be made executable.
keywords string[]

The keywords of the components.

namespace string

Namespace this component is a part of. See the Namespaces guide for more information on namespaces.

arguments Argument[]

A list of arguments for this component. For each argument, a type and a name must be specified. Depending on the type of argument, different properties can be set. See these reference pages per type for more information:

  • string
  • file
  • integer
  • double
  • boolean
  • boolean_true
  • boolean_false
runners Runner[]

A list of runners to execute target artifacts.

  • ExecutableRunner
  • NextflowRunner
build_info object

Meta information fields filled in by Viash during build.

10 nested properties
config string required

Path to the config used during build.

git_tag string

Git tag.

git_remote string

Git remote name.

viash_version string

The Viash version that was used to build the component.

output string

Folder path to the build artifacts.

git_commit string

Git commit hash.

engine string

The engine id used during build.

runner string

The runner id used during build.

dependencies string[]

List of dependencies used during build.

executable string

Output folder with main executable path.

argument_groups ArgumentGroup[]

A grouping of the arguments, used to display the help message.

  • name: foo, the name of the argument group.
  • description: Description of foo, a description of the argument group. Multiline descriptions are supported.
  • arguments: [arg1, arg2, ...], list of the arguments.
description string

A description of the component. This is only used for documentation. Multiline descriptions are supported.

usage string

A description on how to use the component. This will be displayed with --help under the 'Usage:' section.

info object

Structured information. Can be any shape: a string, vector, map or even nested map.

package_config object

A Viash package configuration file. It's name should be _viash.yaml.

17 nested properties
organization string

The organization of the package.

name string

The name of the package.

source string

Which source directory to use for the viash ns commands.

description string

A description of the package. This is only used for documentation. Multiline descriptions are supported.

config_mods string | string[]
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

license string

The license of the package.

references object

A list of scholarly sources or publications relevant to the tools or analysis defined in the component. This is important for attribution, scientific reproducibility and transparency.

2 nested properties
bibtex string | string[]
doi string | string[]
authors Author[]

The authors of the package.

repositories RepositoryWithName[]

Common repository definitions for component dependencies.

keywords string[]

The keywords of the package.

target string

Which target directory to use for viash ns build.

summary string

A one-sentence summary of the package. This is only used for documentation.

viash_version string

Which version of Viash to use.

label string

A clean version of the package name. This is only used for documentation.

version string

The version of the package.

links object

Links to external resources related to the component.

5 nested properties
repository string

Source repository url.

documentation string

Documentation website url.

docker_registry string

Docker registry url.

homepage string

Homepage website url.

issue_tracker string

Issue tracker url.

platforms Platform[]

A list of platforms to generate target artifacts for.

  • Native
  • Docker
  • Nextflow
version string

Version of the component. This field will be used to version the executable and the Docker container.

links object

Links to external resources related to the component.

5 nested properties
repository string

Source repository url.

documentation string

Documentation website url.

docker_registry string

Docker registry url.

homepage string

Homepage website url.

issue_tracker string

Issue tracker url.

references object

A list of scholarly sources or publications relevant to the tools or analysis defined in the component. This is important for attribution, scientific reproducibility and transparency.

2 nested properties
bibtex string | string[]
doi string | string[]
engines Engine[]

A list of engine environments to execute target artifacts in.

  • NativeEngine
  • DockerEngine
resources Resource[]

Resources are files that support the component. The first resource should be a script that will be executed when the component is run. Additional resources will be copied to the same directory.

Common properties:

  • type: file / r_script / python_script / bash_script / javascript_script / scala_script / csharp_script, specifies the type of the resource. The first resource cannot be of type file. When the type is not specified, the default type is simply file.
  • dest: filename, the resulting name of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.
  • path: path/to/file, the path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.
  • text: ...multiline text..., the content of the resulting file specified as a string. Mutually exclusive with path.
  • is_executable: true / false, whether the resulting resource file should be made executable.
keywords string[]

The keywords of the components.

test_resources Resource[]

One or more scripts to be used to test the component behaviour when viash test is invoked. Additional files of type file will be made available only during testing. Each test script should expect no command-line inputs, be platform-independent, and return an exit code >0 when unexpected behaviour occurs during testing. See Unit Testing for more info.

namespace string

Namespace this component is a part of. See the Namespaces guide for more information on namespaces.

arguments Argument[]

A list of arguments for this component. For each argument, a type and a name must be specified. Depending on the type of argument, different properties can be set. See these reference pages per type for more information:

  • string
  • file
  • integer
  • double
  • boolean
  • boolean_true
  • boolean_false
PackageConfig object

A Viash package configuration file. It's name should be _viash.yaml.

organization string

The organization of the package.

name string

The name of the package.

source string

Which source directory to use for the viash ns commands.

description string

A description of the package. This is only used for documentation. Multiline descriptions are supported.

config_mods string | string[]
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

license string

The license of the package.

references object

A list of scholarly sources or publications relevant to the tools or analysis defined in the component. This is important for attribution, scientific reproducibility and transparency.

2 nested properties
bibtex string | string[]
doi string | string[]
authors Author[]

The authors of the package.

repositories RepositoryWithName[]

Common repository definitions for component dependencies.

keywords string[]

The keywords of the package.

target string

Which target directory to use for viash ns build.

summary string

A one-sentence summary of the package. This is only used for documentation.

viash_version string

Which version of Viash to use.

label string

A clean version of the package name. This is only used for documentation.

version string

The version of the package.

links object

Links to external resources related to the component.

5 nested properties
repository string

Source repository url.

documentation string

Documentation website url.

docker_registry string

Docker registry url.

homepage string

Homepage website url.

issue_tracker string

Issue tracker url.

BuildInfo object

Meta information fields filled in by Viash during build.

config string required

Path to the config used during build.

git_tag string

Git tag.

git_remote string

Git remote name.

viash_version string

The Viash version that was used to build the component.

output string

Folder path to the build artifacts.

git_commit string

Git commit hash.

engine string

The engine id used during build.

runner string

The runner id used during build.

dependencies string[]

List of dependencies used during build.

executable string

Output folder with main executable path.

Functionality object

The functionality-part of the config file describes the behaviour of the script in terms of arguments and resources. By specifying a few restrictions (e.g. mandatory arguments) and adding some descriptions, Viash will automatically generate a stylish command-line interface for you.

name string required

Name of the component and the filename of the executable when built with viash build.

organization string

The organization of the package.

argument_groups ArgumentGroup[]

A grouping of the arguments, used to display the help message.

  • name: foo, the name of the argument group.
  • description: Description of foo, a description of the argument group. Multiline descriptions are supported.
  • arguments: [arg1, arg2, ...], list of the arguments.
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

license string

The license of the package.

references object

A list of scholarly sources or publications relevant to the tools or analysis defined in the component. This is important for attribution, scientific reproducibility and transparency.

2 nested properties
bibtex string | string[]
doi string | string[]
authors Author[]

A list of authors. An author must at least have a name, but can also have a list of roles, an e-mail address, and a map of custom properties.

Suggested values for roles are:

RoleAbbrev.Description
maintainermntfor the maintainer of the code. Ideally, exactly one maintainer is specified.
authorautfor persons who have made substantial contributions to the software.
contributorctbfor persons who have made smaller contributions (such as code patches).
datacontributordtcfor persons or organisations that contributed data sets for the software
copyrightholdercphfor all copyright holders. This is a legal concept so should use the legal name of an institution or corporate body.
funderfndfor persons or organizations that furnished financial support for the development of the software

The full list of roles is extremely comprehensive.

status enum

Allows setting a component to active, deprecated or disabled.

Values: "enabled" "disabled" "deprecated"
requirements object

Computational requirements related to running the component.

3 nested properties
cpus integer

The maximum number of (logical) cpus a component is allowed to use.

commands string[]

A list of commands which should be present on the system for the script to function.

memory string

The maximum amount of memory a component is allowed to allocate. Unit must be one of B, KB, MB, GB, TB or PB for SI units (1000-base), or KiB, MiB, GiB, TiB or PiB for binary IEC units (1024-base).

repositories RepositoryWithName[]

(Pre-)defines repositories that can be used as repository in dependencies. Allows reusing repository definitions in case it is used in multiple dependencies.

test_resources Resource[]

One or more scripts to be used to test the component behaviour when viash test is invoked. Additional files of type file will be made available only during testing. Each test script should expect no command-line inputs, be platform-independent, and return an exit code >0 when unexpected behaviour occurs during testing. See Unit Testing for more info.

dependencies Dependency[]

Allows listing Viash components required by this Viash component

description string

A description of the component. This will be displayed with --help.

usage string

A description on how to use the component. This will be displayed with --help under the 'Usage:' section.

version string

Version of the component. This field will be used to version the executable and the Docker container.

links object

Links to external resources related to the component.

5 nested properties
repository string

Source repository url.

documentation string

Documentation website url.

docker_registry string

Docker registry url.

homepage string

Homepage website url.

issue_tracker string

Issue tracker url.

resources Resource[]

Resources are files that support the component. The first resource should be a script that will be executed when the functionality is run. Additional resources will be copied to the same directory.

Common properties:

  • type: file / r_script / python_script / bash_script / javascript_script / scala_script / csharp_script, specifies the type of the resource. The first resource cannot be of type file. When the type is not specified, the default type is simply file.
  • dest: filename, the resulting name of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.
  • path: path/to/file, the path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.
  • text: ...multiline text..., the content of the resulting file specified as a string. Mutually exclusive with path.
  • is_executable: true / false, whether the resulting resource file should be made executable.
keywords string[]

The keywords of the components.

namespace string

Namespace this component is a part of. See the Namespaces guide for more information on namespaces.

arguments Argument[]

A list of arguments for this component. For each argument, a type and a name must be specified. Depending on the type of argument, different properties can be set. See these reference pages per type for more information:

  • string
  • file
  • integer
  • double
  • boolean
  • boolean_true
  • boolean_false
Author object

Author metadata.

name string required

Full name of the author, usually in the name of FirstName MiddleName LastName.

email string

E-mail of the author.

info object

Structured information. Can be any shape: a string, vector, map or even nested map.

roles string | string[]
ComputationalRequirements object

Computational requirements related to running the component.

cpus integer

The maximum number of (logical) cpus a component is allowed to use.

commands string[]

A list of commands which should be present on the system for the script to function.

memory string

The maximum amount of memory a component is allowed to allocate. Unit must be one of B, KB, MB, GB, TB or PB for SI units (1000-base), or KiB, MiB, GiB, TiB or PiB for binary IEC units (1024-base).

ArgumentGroup object

A grouping of the arguments, used to display the help message.

name string required

The name of the argument group.

description string

A description of the argument group. This is only used for documentation. Multiline descriptions are supported.

label string

A clean version of the argument group's name. This is only used for documentation.

summary string

A one-sentence summary of the argument group. This is only used for documentation.

arguments Argument[]

A list of arguments for this component. For each argument, a type and a name must be specified. Depending on the type of argument, different properties can be set. See these reference pages per type for more information:

  • string
  • file
  • integer
  • double
  • boolean
  • boolean_true
  • boolean_false
References object

A list of scholarly sources or publications relevant to the tools or analysis defined in the component. This is important for attribution, scientific reproducibility and transparency.

bibtex string | string[]
doi string | string[]
Runner ExecutableRunner | NextflowRunner
ExecutableRunner object

Run code as an executable.

This runner is the default runner. It will generate a bash script that can be run directly.

This runner is also used for the native engine.

This runner is also used for the docker engine.

type const: "executable" required

Run code as an executable.

This runner is the default runner. It will generate a bash script that can be run directly.

This runner is also used for the native engine.

This runner is also used for the docker engine.

Constant: "executable"
docker_setup_strategy enum

The Docker setup strategy to use when building a container.

Values: "cb" "ifneedbepullelsecachedbuild" "donothing" "gentlepush" "alwayspullelsebuild" "build" "alwayspull" "alwaysbuild" "ifneedbebuild" "pullelsebuild" "p" "alwayspullelsecachedbuild" "pull" "maybepush" "ifneedbepullelsebuild" "cachedbuild" "pullelsecachedbuild" "push" "forcepush" "alwayspush" "b" "pushifnotpresent" "alwayscachedbuild" "meh" "ifneedbepull" "ifneedbecachedbuild"
workdir string

The working directory when starting the engine. This doesn't change the Dockerfile but gets added as a command-line argument at runtime.

docker_run_args string | string[]
id string

Name of the runner. As with all runners, you can give an runner a different name. By specifying id: foo, you can target this executor (only) by specifying ... in any of the Viash commands.

port integer | string | integer[] | string[]
NextflowRunner object

Run a Viash component on a Nextflow backend engine.

type const: "nextflow" required

Run a Viash component on a Nextflow backend engine.

Constant: "nextflow"
auto object

Automated processing flags which can be toggled on or off.

4 nested properties
simplifyInput boolean

If true, an input tuple only containing only a single File (e.g. ["foo", file("in.h5ad")]) is automatically transformed to a map (i.e. ["foo", [ input: file("in.h5ad") ] ]).

Default: true.

simplifyOutput boolean

If true, an output tuple containing a map with a File (e.g. ["foo", [ output: file("out.h5ad") ] ]) is automatically transformed to a map (i.e. ["foo", file("out.h5ad")]).

Default: false.

publish boolean | string
transcript boolean

If true, the module's transcripts from work/ are automatically published to params.transcriptDir. If not defined, params.publishDir + "/_transcripts" will be used. Will throw an error if neither are defined.

Default: false.

directives object

Directives are optional settings that affect the execution of the process.

29 nested properties
beforeScript string

The beforeScript directive allows you to execute a custom (Bash) snippet before the main process script is run. This may be useful to initialise the underlying cluster environment or for other custom initialisation.

See beforeScript.

module string | string[]
queue string | string[]
label string | string[]
container object | string
publishDir string | object | string | object[]
maxForks string | integer
maxErrors string | integer
cpus integer | string
accelerator Record<string, string>

The accelerator directive allows you to specify the hardware accelerator requirement for the task execution e.g. GPU processor.

Viash implements this directive as a map with accepted keywords: type, limit, request, and runtime.

See accelerator.

time string

The time directive allows you to define how long a process is allowed to run.

See time.

afterScript string

The afterScript directive allows you to execute a custom (Bash) snippet immediately after the main process has run. This may be useful to clean up your staging area.

See afterScript.

executor string

The executor defines the underlying system where processes are executed. By default a process uses the executor defined globally in the nextflow.config file.

The executor directive allows you to configure what executor has to be used by the process, overriding the default configuration. The following values can be used:

NameExecutor
awsbatchThe process is executed using the AWS Batch service.
azurebatchThe process is executed using the Azure Batch service.
condorThe process is executed using the HTCondor job scheduler.
google-lifesciencesThe process is executed using the Google Genomics Pipelines service.
igniteThe process is executed using the Apache Ignite cluster.
k8sThe process is executed using the Kubernetes cluster.
localThe process is executed in the computer where Nextflow is launched.
lsfThe process is executed using the Platform LSF job scheduler.
moabThe process is executed using the Moab job scheduler.
nqsiiThe process is executed using the NQSII job scheduler.
ogeAlias for the sge executor.
pbsThe process is executed using the PBS/Torque job scheduler.
pbsproThe process is executed using the PBS Pro job scheduler.
sgeThe process is executed using the Sun Grid Engine / Open Grid Engine.
slurmThe process is executed using the SLURM job scheduler.
tesThe process is executed using the GA4GH TES service.
ugeAlias for the sge executor.

See executor.

containerOptions string | string[]
disk string

The disk directive allows you to define how much local disk storage the process is allowed to use.

See disk.

tag string

The tag directive allows you to associate each process execution with a custom label, so that it will be easier to identify them in the log file or in the trace execution report.

For ease of use, the default tag is set to "$id", which allows tracking the progression of the channel events through the workflow more easily.

See tag.

conda string | string[]
machineType string

The machineType can be used to specify a predefined Google Compute Platform machine type when running using the Google Life Sciences executor.

See machineType.

stageInMode string

The stageInMode directive defines how input files are staged-in to the process work directory. The following values are allowed:

ValueDescription
copyInput files are staged in the process work directory by creating a copy.
linkInput files are staged in the process work directory by creating an (hard) link for each of them.
symlinkInput files are staged in the process work directory by creating a symbolic link with an absolute path for each of them (default).
rellinkInput files are staged in the process work directory by creating a symbolic link with a relative path for each of them.

See stageInMode.

cache boolean | string
pod object | object[]
penv string

The penv directive allows you to define the parallel environment to be used when submitting a parallel task to the SGE resource manager.

See penv.

scratch boolean | string
storeDir string

The storeDir directive allows you to define a directory that is used as a permanent cache for your process results.

See storeDir.

maxRetries string | integer
echo boolean | string
errorStrategy string

The errorStrategy directive allows you to define how an error condition is managed by the process. By default when an error status is returned by the executed script, the process stops immediately. This in turn forces the entire pipeline to terminate.

Table of available error strategies:

NameExecutor
terminateTerminates the execution as soon as an error condition is reported. Pending jobs are killed (default)
finishInitiates an orderly pipeline shutdown when an error condition is raised, waiting the completion of any submitted job.
ignoreIgnores processes execution errors.
retryRe-submit for execution a process returning an error condition.

See errorStrategy.

memory string

The memory directive allows you to define how much memory the process is allowed to use.

See memory.

stageOutMode string

The stageOutMode directive defines how output files are staged-out from the scratch directory to the process work directory. The following values are allowed:

ValueDescription
copyOutput files are copied from the scratch directory to the work directory.
moveOutput files are moved from the scratch directory to the work directory.
rsyncOutput files are copied from the scratch directory to the work directory by using the rsync utility.

See stageOutMode.

container string

Specifies the Docker engine id to be used to run Nextflow.

config object

Allows tweaking how the Nextflow Config file is generated.

2 nested properties
labels Record<string, string>

A series of default labels to specify memory and cpu constraints.

The default memory labels are defined as "mem1gb", "mem2gb", "mem4gb", ... upto "mem512tb" and follows powers of 2. The default cpu labels are defined as "cpu1", "cpu2", "cpu5", "cpu10", ... upto "cpu1000" and follows a semi logarithmic scale (1, 2, 5 per decade).

Conceptually it is possible for a Viash Config to overwrite the full labels parameter, however likely it is more efficient to add additional labels in the Viash Package with a config mod.

script string | string[]
debug boolean

Whether or not to print debug messages.

id string

Name of the runner. As with all runners, you can give an runner a different name. By specifying id: foo, you can target this runner (only) by specifying ... in any of the Viash commands.

Engine DockerEngine | NativeEngine
NativeEngine object

Running a Viash component on a native engine means that the script will be executed in your current environment. Any dependencies are assumed to have been installed by the user, so the native engine is meant for developers (who know what they're doing) or for simple bash scripts (which have no extra dependencies).

type const: "native" required

Running a Viash component on a native engine means that the script will be executed in your current environment. Any dependencies are assumed to have been installed by the user, so the native engine is meant for developers (who know what they're doing) or for simple bash scripts (which have no extra dependencies).

Constant: "native"
id string

Name of the engine. As with all engines, you can give an engine a different name. By specifying id: foo, you can target this engine (only) by specifying ... in any of the Viash commands.

DockerEngine object

Run a Viash component on a Docker backend engine. By specifying which dependencies your component needs, users will be able to build a docker container from scratch using the setup flag, or pull it from a docker repository.

image string required

The base container to start from. You can also add the tag here if you wish.

type const: "docker" required

Run a Viash component on a Docker backend engine. By specifying which dependencies your component needs, users will be able to build a docker container from scratch using the setup flag, or pull it from a docker repository.

Constant: "docker"
organization string

Name of a start container's organization.

registry string

The URL to the a custom Docker registry where the start container is located.

tag string

Specify a Docker image based on its tag.

target_image string

If anything is specified in the setup section, running the ---setup will result in an image with the name of <target_image>:<version>. If nothing is specified in the setup section, simply image will be used. Advanced usage only.

target_tag string

The tag the resulting image gets. Advanced usage only.

namespace_separator string

The separator between the namespace and the name of the component, used for determining the image name. Default: "/".

target_package string

The package name set in the resulting image. Advanced usage only.

id string

Name of the engine. As with all engines, you can give a engine a different name. By specifying id: foo, you can target this engine (only) by specifying ... in any of the Viash commands.

target_registry string

The URL where the resulting image will be pushed to. Advanced usage only.

target_organization string

The organization set in the resulting image. Advanced usage only.

A list of requirements for installing the following types of packages:

  • apt
  • apk
  • Docker setup instructions
  • JavaScript
  • Python
  • R
  • Ruby
  • yum

The order in which these dependencies are specified determines the order in which they will be installed.

cmd string | string[]
target_image_source string

The source of the target image. This is used for defining labels in the dockerfile.

test_setup Requirements[]

Additional requirements specific for running unit tests.

entrypoint string | string[]
Platform NativePlatform | DockerPlatform | NextflowPlatform
NativePlatform object

Running a Viash component on a native platform means that the script will be executed in your current environment. Any dependencies are assumed to have been installed by the user, so the native platform is meant for developers (who know what they're doing) or for simple bash scripts (which have no extra dependencies).

type const: "native" required

Running a Viash component on a native platform means that the script will be executed in your current environment. Any dependencies are assumed to have been installed by the user, so the native platform is meant for developers (who know what they're doing) or for simple bash scripts (which have no extra dependencies).

Constant: "native"
id string

As with all platforms, you can give a platform a different name. By specifying id: foo, you can target this platform (only) by specifying -p foo in any of the Viash commands.

DockerPlatform object

Run a Viash component on a Docker backend platform. By specifying which dependencies your component needs, users will be able to build a docker container from scratch using the setup flag, or pull it from a docker repository.

image string required

The base container to start from. You can also add the tag here if you wish.

type const: "docker" required

Run a Viash component on a Docker backend platform. By specifying which dependencies your component needs, users will be able to build a docker container from scratch using the setup flag, or pull it from a docker repository.

Constant: "docker"
organization string

Name of a container's organization.

registry string

The URL to the a custom Docker registry

tag string

Specify a Docker image based on its tag.

target_tag string

The tag the resulting image gets. Advanced usage only.

run_args string | string[]
namespace_separator string

The separator between the namespace and the name of the component, used for determining the image name. Default: "/".

resolve_volume enum

Enables or disables automatic volume mapping. Enabled when set to Automatic or disabled when set to Manual. Default: Automatic

Values: "manual" "automatic" "auto" "Manual" "Automatic" "Auto"
cmd string | string[]
id string

As with all platforms, you can give a platform a different name. By specifying id: foo, you can target this platform (only) by specifying -p foo in any of the Viash commands.

port string | string[]
target_registry string

The URL where the resulting image will be pushed to. Advanced usage only.

A list of requirements for installing the following types of packages:

  • apt
  • apk
  • Docker setup instructions
  • JavaScript
  • Python
  • R
  • Ruby
  • yum

The order in which these dependencies are specified determines the order in which they will be installed.

workdir string

The working directory when starting the container. This doesn't change the Dockerfile but gets added as a command-line argument at runtime.

target_image string

If anything is specified in the setup section, running the ---setup will result in an image with the name of <target_image>:<version>. If nothing is specified in the setup section, simply image will be used. Advanced usage only.

target_image_source string

The source of the target image. This is used for defining labels in the dockerfile.

test_setup Requirements[]

Additional requirements specific for running unit tests.

entrypoint string | string[]
setup_strategy enum

The Docker setup strategy to use when building a container.

Values: "cb" "ifneedbepullelsecachedbuild" "donothing" "gentlepush" "alwayspullelsebuild" "build" "alwayspull" "alwaysbuild" "ifneedbebuild" "pullelsebuild" "p" "alwayspullelsecachedbuild" "pull" "maybepush" "ifneedbepullelsebuild" "cachedbuild" "pullelsecachedbuild" "push" "forcepush" "alwayspush" "b" "pushifnotpresent" "alwayscachedbuild" "meh" "ifneedbepull" "ifneedbecachedbuild"
target_organization string

The organization set in the resulting image. Advanced usage only.

NextflowPlatform object

Platform for generating Nextflow VDSL3 modules.

type const: "nextflow" required

Platform for generating Nextflow VDSL3 modules.

Constant: "nextflow"
auto object

Automated processing flags which can be toggled on or off.

4 nested properties
simplifyInput boolean

If true, an input tuple only containing only a single File (e.g. ["foo", file("in.h5ad")]) is automatically transformed to a map (i.e. ["foo", [ input: file("in.h5ad") ] ]).

Default: true.

simplifyOutput boolean

If true, an output tuple containing a map with a File (e.g. ["foo", [ output: file("out.h5ad") ] ]) is automatically transformed to a map (i.e. ["foo", file("out.h5ad")]).

Default: false.

publish boolean | string
transcript boolean

If true, the module's transcripts from work/ are automatically published to params.transcriptDir. If not defined, params.publishDir + "/_transcripts" will be used. Will throw an error if neither are defined.

Default: false.

directives object

Directives are optional settings that affect the execution of the process.

29 nested properties
beforeScript string

The beforeScript directive allows you to execute a custom (Bash) snippet before the main process script is run. This may be useful to initialise the underlying cluster environment or for other custom initialisation.

See beforeScript.

module string | string[]
queue string | string[]
label string | string[]
container object | string
publishDir string | object | string | object[]
maxForks string | integer
maxErrors string | integer
cpus integer | string
accelerator Record<string, string>

The accelerator directive allows you to specify the hardware accelerator requirement for the task execution e.g. GPU processor.

Viash implements this directive as a map with accepted keywords: type, limit, request, and runtime.

See accelerator.

time string

The time directive allows you to define how long a process is allowed to run.

See time.

afterScript string

The afterScript directive allows you to execute a custom (Bash) snippet immediately after the main process has run. This may be useful to clean up your staging area.

See afterScript.

executor string

The executor defines the underlying system where processes are executed. By default a process uses the executor defined globally in the nextflow.config file.

The executor directive allows you to configure what executor has to be used by the process, overriding the default configuration. The following values can be used:

NameExecutor
awsbatchThe process is executed using the AWS Batch service.
azurebatchThe process is executed using the Azure Batch service.
condorThe process is executed using the HTCondor job scheduler.
google-lifesciencesThe process is executed using the Google Genomics Pipelines service.
igniteThe process is executed using the Apache Ignite cluster.
k8sThe process is executed using the Kubernetes cluster.
localThe process is executed in the computer where Nextflow is launched.
lsfThe process is executed using the Platform LSF job scheduler.
moabThe process is executed using the Moab job scheduler.
nqsiiThe process is executed using the NQSII job scheduler.
ogeAlias for the sge executor.
pbsThe process is executed using the PBS/Torque job scheduler.
pbsproThe process is executed using the PBS Pro job scheduler.
sgeThe process is executed using the Sun Grid Engine / Open Grid Engine.
slurmThe process is executed using the SLURM job scheduler.
tesThe process is executed using the GA4GH TES service.
ugeAlias for the sge executor.

See executor.

containerOptions string | string[]
disk string

The disk directive allows you to define how much local disk storage the process is allowed to use.

See disk.

tag string

The tag directive allows you to associate each process execution with a custom label, so that it will be easier to identify them in the log file or in the trace execution report.

For ease of use, the default tag is set to "$id", which allows tracking the progression of the channel events through the workflow more easily.

See tag.

conda string | string[]
machineType string

The machineType can be used to specify a predefined Google Compute Platform machine type when running using the Google Life Sciences executor.

See machineType.

stageInMode string

The stageInMode directive defines how input files are staged-in to the process work directory. The following values are allowed:

ValueDescription
copyInput files are staged in the process work directory by creating a copy.
linkInput files are staged in the process work directory by creating an (hard) link for each of them.
symlinkInput files are staged in the process work directory by creating a symbolic link with an absolute path for each of them (default).
rellinkInput files are staged in the process work directory by creating a symbolic link with a relative path for each of them.

See stageInMode.

cache boolean | string
pod object | object[]
penv string

The penv directive allows you to define the parallel environment to be used when submitting a parallel task to the SGE resource manager.

See penv.

scratch boolean | string
storeDir string

The storeDir directive allows you to define a directory that is used as a permanent cache for your process results.

See storeDir.

maxRetries string | integer
echo boolean | string
errorStrategy string

The errorStrategy directive allows you to define how an error condition is managed by the process. By default when an error status is returned by the executed script, the process stops immediately. This in turn forces the entire pipeline to terminate.

Table of available error strategies:

NameExecutor
terminateTerminates the execution as soon as an error condition is reported. Pending jobs are killed (default)
finishInitiates an orderly pipeline shutdown when an error condition is raised, waiting the completion of any submitted job.
ignoreIgnores processes execution errors.
retryRe-submit for execution a process returning an error condition.

See errorStrategy.

memory string

The memory directive allows you to define how much memory the process is allowed to use.

See memory.

stageOutMode string

The stageOutMode directive defines how output files are staged-out from the scratch directory to the process work directory. The following values are allowed:

ValueDescription
copyOutput files are copied from the scratch directory to the work directory.
moveOutput files are moved from the scratch directory to the work directory.
rsyncOutput files are copied from the scratch directory to the work directory by using the rsync utility.

See stageOutMode.

container string

Specifies the Docker platform id to be used to run Nextflow.

config object

Allows tweaking how the Nextflow Config file is generated.

2 nested properties
labels Record<string, string>

A series of default labels to specify memory and cpu constraints.

The default memory labels are defined as "mem1gb", "mem2gb", "mem4gb", ... upto "mem512tb" and follows powers of 2. The default cpu labels are defined as "cpu1", "cpu2", "cpu5", "cpu10", ... upto "cpu1000" and follows a semi logarithmic scale (1, 2, 5 per decade).

Conceptually it is possible for a Viash Config to overwrite the full labels parameter, however likely it is more efficient to add additional labels in the Viash Package with a config mod.

script string | string[]
debug boolean

Whether or not to print debug messages.

id string

Every platform can be given a specific id that can later be referred to explicitly when running or building the Viash component.

Requirements ApkRequirements | AptRequirements | DockerRequirements | JavaScriptRequirements | PythonRequirements | RRequirements | RubyRequirements | YumRequirements
ApkRequirements object

Specify which apk packages should be available in order to run the component.

type const: "apk" required

Specify which apk packages should be available in order to run the component.

Constant: "apk"
packages string | string[]
AptRequirements object

Specify which apt packages should be available in order to run the component.

type const: "apt" required

Specify which apt packages should be available in order to run the component.

Constant: "apt"
interactive boolean

If false, the Debian frontend is set to non-interactive (recommended). Default: false.

packages string | string[]
DockerRequirements object

Specify which Docker commands should be run during setup.

type const: "docker" required

Specify which Docker commands should be run during setup.

Constant: "docker"
run string | string[]
label string | string[]
build_args string | string[]
copy string | string[]
add string | string[]
env string | string[]
JavaScriptRequirements object

Specify which JavaScript packages should be available in order to run the component.

type const: "javascript" required

Specify which JavaScript packages should be available in order to run the component.

Constant: "javascript"
github string | string[]
url string | string[]
git string | string[]
npm string | string[]
packages string | string[]
PythonRequirements object

Specify which Python packages should be available in order to run the component.

type const: "python" required

Specify which Python packages should be available in order to run the component.

Constant: "python"
github string | string[]
gitlab string | string[]
pip string | string[]
pypi string | string[]
git string | string[]
upgrade boolean

Sets the --upgrade flag when set to true. Default: true.

packages string | string[]
url string | string[]
svn string | string[]
bazaar string | string[]
script string | string[]
mercurial string | string[]
user boolean

Sets the --user flag when set to true. Default: false.

RRequirements object

Specify which R packages should be available in order to run the component.

type const: "r" required

Specify which R packages should be available in order to run the component.

Constant: "r"
bioc string | string[]
github string | string[]
gitlab string | string[]
url string | string[]
bioc_force_install boolean

Forces packages specified in bioc to be reinstalled, even if they are already present in the container. Default: false.

git string | string[]
cran string | string[]
bitbucket string | string[]
svn string | string[]
packages string | string[]
script string | string[]
RubyRequirements object

Specify which Ruby packages should be available in order to run the component.

type const: "ruby" required

Specify which Ruby packages should be available in order to run the component.

Constant: "ruby"
packages string | string[]
YumRequirements object

Specify which yum packages should be available in order to run the component.

type const: "yum" required

Specify which yum packages should be available in order to run the component.

Constant: "yum"
packages string | string[]
Argument BooleanArgument | BooleanTrueArgument | BooleanFalseArgument | DoubleArgument | FileArgument | IntegerArgument | LongArgument | StringArgument
BooleanArgument object

A boolean type argument has two possible values: true or false.

name string required

The name of the argument. Can be in the formats --trim, -t or trim. The number of dashes determines how values can be passed:

  • --trim is a long option, which can be passed with executable_name --trim
  • -t is a short option, which can be passed with executable_name -t
  • trim is an argument, which can be passed with executable_name trim
type const: "boolean" required

A boolean type argument has two possible values: true or false.

Constant: "boolean"
alternatives string | string[]
label string

A clean version of the argument's name. This is only used for documentation.

direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Values: "input" "output"
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

default boolean | boolean[]
example boolean | boolean[]
summary string

A one-sentence summary of the argument. This is only used for documentation.

description string

A description of the argument. This is only used for documentation. Multiline descriptions are supported.

multiple_sep string

The delimiter character for providing multiple values. : by default.

multiple boolean

Treat the argument value as an array. Arrays can be passed using the delimiter --foo=1:2:3 or by providing the same argument multiple times --foo 1 --foo 2. You can use a custom delimiter by using the multiple_sep property. false by default.

required boolean

Make the value for this argument required. If set to true, an error will be produced if no value was provided. false by default.

BooleanTrueArgument object

An argument of the boolean_true type acts like a boolean flag with a default value of false. When called as an argument it sets the boolean to true.

name string required

The name of the argument. Can be in the formats --silent, -s or silent. The number of dashes determines how values can be passed:

  • --silent is a long option, which can be passed with executable_name --silent
  • -s is a short option, which can be passed with executable_name -s
  • silent is an argument, which can be passed with executable_name silent
type const: "boolean_true" required

An argument of the boolean_true type acts like a boolean flag with a default value of false. When called as an argument it sets the boolean to true.

Constant: "boolean_true"
alternatives string | string[]
label string

A clean version of the argument's name. This is only used for documentation.

direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Values: "input" "output"
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

summary string

A one-sentence summary of the argument. This is only used for documentation.

description string

A description of the argument. This is only used for documentation. Multiline descriptions are supported.

BooleanFalseArgument object

An argument of the boolean_false type acts like an inverted boolean flag with a default value of true. When called as an argument it sets the boolean to false.

name string required

The name of the argument. Can be in the formats --no-log, -n or no-log. The number of dashes determines how values can be passed:

  • --no-log is a long option, which can be passed with executable_name --no-log
  • -n is a short option, which can be passed with executable_name -n
  • no-log is an argument, which can be passed with executable_name no-log
type const: "boolean_false" required

An argument of the boolean_false type acts like an inverted boolean flag with a default value of true. When called as an argument it sets the boolean to false.

Constant: "boolean_false"
alternatives string | string[]
label string

A clean version of the argument's name. This is only used for documentation.

direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Values: "input" "output"
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

summary string

A one-sentence summary of the argument. This is only used for documentation.

description string

A description of the argument. This is only used for documentation. Multiline descriptions are supported.

DoubleArgument object

A double type argument has a numeric value with decimal points

name string required

The name of the argument. Can be in the formats --foo, -f or foo. The number of dashes determines how values can be passed:

  • --foo is a long option, which can be passed with executable_name --foo=value or executable_name --foo value
  • -f is a short option, which can be passed with executable_name -f value
  • foo is an argument, which can be passed with executable_name value
type const: "double" required

A double type argument has a numeric value with decimal points

Constant: "double"
alternatives string | string[]
label string

A clean version of the argument's name. This is only used for documentation.

info object

Structured information. Can be any shape: a string, vector, map or even nested map.

max number | DoubleStrings
summary string

A one-sentence summary of the argument. This is only used for documentation.

description string

A description of the argument. This is only used for documentation. Multiline descriptions are supported.

multiple_sep string

The delimiter character for providing multiple values. : by default.

min number | DoubleStrings
direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Values: "input" "output"
multiple boolean

Treat the argument value as an array. Arrays can be passed using the delimiter --foo=1:2:3 or by providing the same argument multiple times --foo 1 --foo 2. You can use a custom delimiter by using the multiple_sep property. false by default.

required boolean

Make the value for this argument required. If set to true, an error will be produced if no value was provided. false by default.

FileArgument object

A file type argument has a string value that points to a file or folder path.

name string required

The name of the argument. Can be in the formats --foo, -f or foo. The number of dashes determines how values can be passed:

  • --foo is a long option, which can be passed with executable_name --foo=value or executable_name --foo value
  • -f is a short option, which can be passed with executable_name -f value
  • foo is an argument, which can be passed with executable_name value
type const: "file" required

A file type argument has a string value that points to a file or folder path.

Constant: "file"
alternatives string | string[]
create_parent boolean

If the output filename is a path and it does not exist, create it before executing the script (only for direction: output).

label string

A clean version of the argument's name. This is only used for documentation.

direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Values: "input" "output"
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

must_exist boolean

Checks whether the file or folder exists. For input files, this check will happen before the execution of the script, while for output files the check will happen afterwards.

default string | string[]
example string | string[]
summary string

A one-sentence summary of the argument. This is only used for documentation.

description string

A description of the argument. This is only used for documentation. Multiline descriptions are supported.

multiple_sep string

The delimiter character for providing multiple values. : by default.

multiple boolean

Allow for multiple values (false by default).

For input arguments, this will be treated as a list of values. For example, values can be passed using the delimiter --foo=1:2:3 or by providing the same argument multiple times --foo 1 --foo 2. You can use a custom delimiter by using the multiple_sep property.

For output file arguments, the passed value needs to contain a wildcard. For example, --foo 'foo_*.txt' will be treated as a list of files that match the pattern. Note that in Bash, the wildcard will need to be in quotes ("foo_*.txt" or 'foo_*.txt') or else Bash will automatically attempt to expand the expression.

Other output arguments (e.g. integer, double, ...) are not supported yet.

required boolean

Make the value for this argument required. If set to true, an error will be produced if no value was provided. false by default.

IntegerArgument object

An integer type argument has a numeric value without decimal points.

name string required

The name of the argument. Can be in the formats --foo, -f or foo. The number of dashes determines how values can be passed:

  • --foo is a long option, which can be passed with executable_name --foo=value or executable_name --foo value
  • -f is a short option, which can be passed with executable_name -f value
  • foo is an argument, which can be passed with executable_name value
type const: "integer" required

An integer type argument has a numeric value without decimal points.

Constant: "integer"
alternatives string | string[]
choices integer[]

Limit the amount of valid values for this argument to those set in this list. When set and a value not present in the list is provided, an error will be produced.

label string

A clean version of the argument's name. This is only used for documentation.

info object

Structured information. Can be any shape: a string, vector, map or even nested map.

max integer

Maximum allowed value for this argument. If set and the provided value is higher than the maximum, an error will be produced. Can be combined with min to clamp values.

default integer | integer[]
example integer | integer[]
summary string

A one-sentence summary of the argument. This is only used for documentation.

description string

A description of the argument. This is only used for documentation. Multiline descriptions are supported.

multiple_sep string

The delimiter character for providing multiple values. : by default.

min integer

Minimum allowed value for this argument. If set and the provided value is lower than the minimum, an error will be produced. Can be combined with max to clamp values.

direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Values: "input" "output"
multiple boolean

Treat the argument value as an array. Arrays can be passed using the delimiter --foo=1:2:3 or by providing the same argument multiple times --foo 1 --foo 2. You can use a custom delimiter by using the multiple_sep property. false by default.

required boolean

Make the value for this argument required. If set to true, an error will be produced if no value was provided. false by default.

LongArgument object

An long type argument has a numeric value without decimal points.

name string required

The name of the argument. Can be in the formats --foo, -f or foo. The number of dashes determines how values can be passed:

  • --foo is a long option, which can be passed with executable_name --foo=value or executable_name --foo value
  • -f is a short option, which can be passed with executable_name -f value
  • foo is an argument, which can be passed with executable_name value
type const: "long" required

An long type argument has a numeric value without decimal points.

Constant: "long"
alternatives string | string[]
choices integer[]

Limit the amount of valid values for this argument to those set in this list. When set and a value not present in the list is provided, an error will be produced.

label string

A clean version of the argument's name. This is only used for documentation.

info object

Structured information. Can be any shape: a string, vector, map or even nested map.

max integer

Maximum allowed value for this argument. If set and the provided value is higher than the maximum, an error will be produced. Can be combined with min to clamp values.

default integer | integer[]
example integer | integer[]
summary string

A one-sentence summary of the argument. This is only used for documentation.

description string

A description of the argument. This is only used for documentation. Multiline descriptions are supported.

multiple_sep string

The delimiter character for providing multiple values. : by default.

min integer

Minimum allowed value for this argument. If set and the provided value is lower than the minimum, an error will be produced. Can be combined with max to clamp values.

direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Values: "input" "output"
multiple boolean

Treat the argument value as an array. Arrays can be passed using the delimiter --foo=1:2:3 or by providing the same argument multiple times --foo 1 --foo 2. You can use a custom delimiter by using the multiple_sep property. false by default.

required boolean

Make the value for this argument required. If set to true, an error will be produced if no value was provided. false by default.

StringArgument object

A string type argument has a value made up of an ordered sequences of characters, like "Hello" or "I'm a string".

name string required

The name of the argument. Can be in the formats --foo, -f or foo. The number of dashes determines how values can be passed:

  • --foo is a long option, which can be passed with executable_name --foo=value or executable_name --foo value
  • -f is a short option, which can be passed with executable_name -f value
  • foo is an argument, which can be passed with executable_name value
type const: "string" required

A string type argument has a value made up of an ordered sequences of characters, like "Hello" or "I'm a string".

Constant: "string"
alternatives string | string[]
choices string[]

Limit the amount of valid values for this argument to those set in this list. When set and a value not present in the list is provided, an error will be produced.

label string

A clean version of the argument's name. This is only used for documentation.

direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Values: "input" "output"
info object

Structured information. Can be any shape: a string, vector, map or even nested map.

default string | string[]
example string | string[]
summary string

A one-sentence summary of the argument. This is only used for documentation.

description string

A description of the argument. This is only used for documentation. Multiline descriptions are supported.

multiple_sep string

The delimiter character for providing multiple values. : by default.

multiple boolean

Treat the argument value as an array. Arrays can be passed using the delimiter --foo=1:2:3 or by providing the same argument multiple times --foo 1 --foo 2. You can use a custom delimiter by using the multiple_sep property. false by default.

required boolean

Make the value for this argument required. If set to true, an error will be produced if no value was provided. false by default.

Resource BashScript | CSharpScript | Executable | JavaScriptScript | NextflowScript | PlainFile | PythonScript | RScript | ScalaScript
BashScript object

An executable Bash script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

type const: "bash_script" required

An executable Bash script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

Constant: "bash_script"
path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

CSharpScript object

An executable C# script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

type const: "csharp_script" required

An executable C# script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

Constant: "csharp_script"
path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

Executable object

An executable file.

type const: "executable" required

An executable file.

Constant: "executable"
path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

JavaScriptScript object

An executable JavaScript script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

type const: "javascript_script" required

An executable JavaScript script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

Constant: "javascript_script"
path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

NextflowScript object

A Nextflow script. Work in progress; added mainly for annotation at the moment.

entrypoint string required

The name of the workflow to be wrapped.

type const: "nextflow_script" required

A Nextflow script. Work in progress; added mainly for annotation at the moment.

Constant: "nextflow_script"
path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

PlainFile object

A plain file. This can only be used as a supporting resource for the main script or unit tests.

path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

type const: "file"

A plain file. This can only be used as a supporting resource for the main script or unit tests.

Constant: "file"
dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

PythonScript object

An executable Python script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

type const: "python_script" required

An executable Python script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

Constant: "python_script"
path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

RScript object

An executable R script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

type const: "r_script" required

An executable R script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

Constant: "r_script"
path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

ScalaScript object

An executable Scala script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

type const: "scala_script" required

An executable Scala script. When defined in resources, only the first entry will be executed when running the built component or when running viash run. When defined in test_resources, all entries will be executed during viash test.

Constant: "scala_script"
path string

The path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive with text.

text string

The content of the resulting file specified as a string. Mutually exclusive with path.

is_executable boolean

Whether the resulting resource file should be made executable.

dest string

Resulting filename of the resource. From within a script, the file can be accessed at meta["resources_dir"] + "/" + dest. If unspecified, dest will be set to the basename of the path parameter.

NextflowDirectives object

Directives are optional settings that affect the execution of the process.

beforeScript string

The beforeScript directive allows you to execute a custom (Bash) snippet before the main process script is run. This may be useful to initialise the underlying cluster environment or for other custom initialisation.

See beforeScript.

module string | string[]
queue string | string[]
label string | string[]
container object | string
publishDir string | object | string | object[]
maxForks string | integer
maxErrors string | integer
cpus integer | string
accelerator Record<string, string>

The accelerator directive allows you to specify the hardware accelerator requirement for the task execution e.g. GPU processor.

Viash implements this directive as a map with accepted keywords: type, limit, request, and runtime.

See accelerator.

time string

The time directive allows you to define how long a process is allowed to run.

See time.

afterScript string

The afterScript directive allows you to execute a custom (Bash) snippet immediately after the main process has run. This may be useful to clean up your staging area.

See afterScript.

executor string

The executor defines the underlying system where processes are executed. By default a process uses the executor defined globally in the nextflow.config file.

The executor directive allows you to configure what executor has to be used by the process, overriding the default configuration. The following values can be used:

NameExecutor
awsbatchThe process is executed using the AWS Batch service.
azurebatchThe process is executed using the Azure Batch service.
condorThe process is executed using the HTCondor job scheduler.
google-lifesciencesThe process is executed using the Google Genomics Pipelines service.
igniteThe process is executed using the Apache Ignite cluster.
k8sThe process is executed using the Kubernetes cluster.
localThe process is executed in the computer where Nextflow is launched.
lsfThe process is executed using the Platform LSF job scheduler.
moabThe process is executed using the Moab job scheduler.
nqsiiThe process is executed using the NQSII job scheduler.
ogeAlias for the sge executor.
pbsThe process is executed using the PBS/Torque job scheduler.
pbsproThe process is executed using the PBS Pro job scheduler.
sgeThe process is executed using the Sun Grid Engine / Open Grid Engine.
slurmThe process is executed using the SLURM job scheduler.
tesThe process is executed using the GA4GH TES service.
ugeAlias for the sge executor.

See executor.

containerOptions string | string[]
disk string

The disk directive allows you to define how much local disk storage the process is allowed to use.

See disk.

tag string

The tag directive allows you to associate each process execution with a custom label, so that it will be easier to identify them in the log file or in the trace execution report.

For ease of use, the default tag is set to "$id", which allows tracking the progression of the channel events through the workflow more easily.

See tag.

conda string | string[]
machineType string

The machineType can be used to specify a predefined Google Compute Platform machine type when running using the Google Life Sciences executor.

See machineType.

stageInMode string

The stageInMode directive defines how input files are staged-in to the process work directory. The following values are allowed:

ValueDescription
copyInput files are staged in the process work directory by creating a copy.
linkInput files are staged in the process work directory by creating an (hard) link for each of them.
symlinkInput files are staged in the process work directory by creating a symbolic link with an absolute path for each of them (default).
rellinkInput files are staged in the process work directory by creating a symbolic link with a relative path for each of them.

See stageInMode.

cache boolean | string
pod object | object[]
penv string

The penv directive allows you to define the parallel environment to be used when submitting a parallel task to the SGE resource manager.

See penv.

scratch boolean | string
storeDir string

The storeDir directive allows you to define a directory that is used as a permanent cache for your process results.

See storeDir.

maxRetries string | integer
echo boolean | string
errorStrategy string

The errorStrategy directive allows you to define how an error condition is managed by the process. By default when an error status is returned by the executed script, the process stops immediately. This in turn forces the entire pipeline to terminate.

Table of available error strategies:

NameExecutor
terminateTerminates the execution as soon as an error condition is reported. Pending jobs are killed (default)
finishInitiates an orderly pipeline shutdown when an error condition is raised, waiting the completion of any submitted job.
ignoreIgnores processes execution errors.
retryRe-submit for execution a process returning an error condition.

See errorStrategy.

memory string

The memory directive allows you to define how much memory the process is allowed to use.

See memory.

stageOutMode string

The stageOutMode directive defines how output files are staged-out from the scratch directory to the process work directory. The following values are allowed:

ValueDescription
copyOutput files are copied from the scratch directory to the work directory.
moveOutput files are moved from the scratch directory to the work directory.
rsyncOutput files are copied from the scratch directory to the work directory by using the rsync utility.

See stageOutMode.

NextflowAuto object

Automated processing flags which can be toggled on or off.

simplifyInput boolean

If true, an input tuple only containing only a single File (e.g. ["foo", file("in.h5ad")]) is automatically transformed to a map (i.e. ["foo", [ input: file("in.h5ad") ] ]).

Default: true.

simplifyOutput boolean

If true, an output tuple containing a map with a File (e.g. ["foo", [ output: file("out.h5ad") ] ]) is automatically transformed to a map (i.e. ["foo", file("out.h5ad")]).

Default: false.

publish boolean | string
transcript boolean

If true, the module's transcripts from work/ are automatically published to params.transcriptDir. If not defined, params.publishDir + "/_transcripts" will be used. Will throw an error if neither are defined.

Default: false.

NextflowConfig object

Allows tweaking how the Nextflow Config file is generated.

labels Record<string, string>

A series of default labels to specify memory and cpu constraints.

The default memory labels are defined as "mem1gb", "mem2gb", "mem4gb", ... upto "mem512tb" and follows powers of 2. The default cpu labels are defined as "cpu1", "cpu2", "cpu5", "cpu10", ... upto "cpu1000" and follows a semi logarithmic scale (1, 2, 5 per decade).

Conceptually it is possible for a Viash Config to overwrite the full labels parameter, however likely it is more efficient to add additional labels in the Viash Package with a config mod.

script string | string[]
Dependency object

Specifies a Viash component (script or executable) that should be made available for the code defined in the component. The dependency components are collected and copied to the output folder during the Viash build step.

name string required

The full name of the dependency component. This should include the namespace.

repository string | Repository
alias string

An alternative name for the dependency component. This can include a namespace if so needed.

Repository LocalRepository | GitRepository | GithubRepository | ViashhubRepository
LocalRepository object

Defines a locally present and available repository. This can be used to define components from the same code base as the current component. Alternatively, this can be used to refer to a code repository present on the local hard-drive instead of fetchable remotely, for example during development.

type const: "local" required

Defines a locally present and available repository. This can be used to define components from the same code base as the current component. Alternatively, this can be used to refer to a code repository present on the local hard-drive instead of fetchable remotely, for example during development.

Constant: "local"
path string

Defines a subfolder of the repository to use as base to look for the dependency components.

tag string

Defines which version of the dependency component to use. Typically this can be a specific tag, branch or commit hash.

GitRepository object

A Git repository where remote dependency components can be found.

uri string required

The URI of the Git repository.

type const: "git" required

A Git repository where remote dependency components can be found.

Constant: "git"
path string

Defines a subfolder of the repository to use as base to look for the dependency components.

tag string

Defines which version of the dependency component to use. Typically this can be a specific tag, branch or commit hash.

GithubRepository object

A GitHub repository where remote dependency components can be found.

repo string required

The name of the GitHub repository.

type const: "github" required

A GitHub repository where remote dependency components can be found.

Constant: "github"
path string

Defines a subfolder of the repository to use as base to look for the dependency components.

tag string

Defines which version of the dependency component to use. Typically this can be a specific tag, branch or commit hash.

ViashhubRepository object

A Viash-Hub repository where remote dependency components can be found.

repo string required

The name of the Viash-Hub repository.

type const: "viashhub" required

A Viash-Hub repository where remote dependency components can be found.

Constant: "viashhub"
path string

Defines a subfolder of the repository to use as base to look for the dependency components.

tag string

Defines which version of the dependency component to use. Typically this can be a specific tag, branch or commit hash.

RepositoryWithName LocalRepositoryWithName | GitRepositoryWithName | GithubRepositoryWithName | ViashhubRepositoryWithName
LocalRepositoryWithName object

Defines a locally present and available repository. This can be used to define components from the same code base as the current component. Alternatively, this can be used to refer to a code repository present on the local hard-drive instead of fetchable remotely, for example during development.

name string required

The identifier used to refer to this repository from dependencies.

type const: "local" required

Defines a locally present and available repository. This can be used to define components from the same code base as the current component. Alternatively, this can be used to refer to a code repository present on the local hard-drive instead of fetchable remotely, for example during development.

Constant: "local"
path string

Defines a subfolder of the repository to use as base to look for the dependency components.

tag string

Defines which version of the dependency component to use. Typically this can be a specific tag, branch or commit hash.

GitRepositoryWithName object

A Git repository where remote dependency components can be found.

name string required

The identifier used to refer to this repository from dependencies.

uri string required

The URI of the Git repository.

type const: "git" required

A Git repository where remote dependency components can be found.

Constant: "git"
path string

Defines a subfolder of the repository to use as base to look for the dependency components.

tag string

Defines which version of the dependency component to use. Typically this can be a specific tag, branch or commit hash.

GithubRepositoryWithName object

A GitHub repository where remote dependency components can be found.

name string required

The identifier used to refer to this repository from dependencies.

repo string required

The name of the GitHub repository.

type const: "github" required

A GitHub repository where remote dependency components can be found.

Constant: "github"
path string

Defines a subfolder of the repository to use as base to look for the dependency components.

tag string

Defines which version of the dependency component to use. Typically this can be a specific tag, branch or commit hash.

ViashhubRepositoryWithName object

A Viash-Hub repository where remote dependency components can be found.

name string required

The identifier used to refer to this repository from dependencies.

repo string required

The name of the Viash-Hub repository.

type const: "viashhub" required

A Viash-Hub repository where remote dependency components can be found.

Constant: "viashhub"
path string

Defines a subfolder of the repository to use as base to look for the dependency components.

tag string

Defines which version of the dependency component to use. Typically this can be a specific tag, branch or commit hash.

DockerSetupStrategy enum

The Docker setup strategy to use when building a container.

Direction enum

Makes this argument an input or an output, as in does the file/folder needs to be read or written. input by default.

Status enum

Allows setting a component to active, deprecated or disabled.

DockerResolveVolume enum

Enables or disables automatic volume mapping. Enabled when set to Automatic or disabled when set to Manual. Default: Automatic

DoubleStrings enum
DoubleWithInf number | DoubleStrings