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 resourcesmeta["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_namePython:
print(meta["functionality_name"])R:
cat(meta$functionality_name)Full changelog
NEW FEATURES
- Similar to
par, each script now also has ametalist.metacontains meta information about the component or the execution thereof. It currently has the following fields:meta["resources_dir"]: Path to the directory containing the resourcesmeta["functionality_name"]: Name of the component
NextflowPlatform: ExportVIASH_TEMPenvironment variable.
BUG FIXES
NextflowPlatform: Fix output formatting whenseparate_multiple_outputsisfalse.