Viash 0.5.3

New meta data list for scripts, VIASH_TEMP environment variable for Nextflow, fixed output formatting with separate outputs

New Release
Author

Viash Team

Published

September 2, 2021

What’s new?

This release provides more information to scripts with the new meta list. This list contains two values for now:

  • meta["resources_dir"]: Path to the directory containing the resources
  • meta["functionality_name"]: Name of the component

A new environment variable is now available for export when working with the Nextflow platform: VIASH_TEMP.

Resources directory

All resources defined in the config file are copied over to a temporary location right before a Viash component is executed. This location is can now be easily accessed in your scripts, allowing you to modify and copy the files as needed.
Here are some examples in different scripting languages on how to access the meta data, it works similarly to the par list:

Bash:

echo $meta_resources_dir 

Python:

print(meta["resources_dir"])

R:

cat(meta$resources_dir)

Functionality name

The name of the component can now be accessed in the same way as the resources directory. This allows you to print the name of the component out to a console window for example. Here’s how to access this data in different scripting languages:

Bash:

echo $meta_functionality_name

Python:

print(meta["functionality_name"])

R:

cat(meta$functionality_name)

Full changelog

NEW FEATURES

  • Similar to par, each script now also has a meta list. meta contains meta information about the component or the execution thereof. It currently has the following fields:
    • meta["resources_dir"]: Path to the directory containing the resources
    • meta["functionality_name"]: Name of the component
  • NextflowPlatform: Export VIASH_TEMP environment variable.

BUG FIXES

  • NextflowPlatform: Fix output formatting when separate_multiple_outputs is false.