Skip to main content
On the workflow edit page, you will see an Assets section to the right of the code window. Click “Add Asset” to add a new asset slot, which includes a dropdown menu for selecting one of your organization’s assets to make available for this workflow. Each selected asset is injected into the workflow environment under the /share directory. The exact path the asset will be written to is displayed at the top of the asset’s box, alongside a clipboard icon you can use to copy the path into your script. The path is typically /share/asset_<UUID>/<filename>. If the asset’s filename ends in .tar.gz, its archive contents are extracted into /share/asset_<UUID>/ instead.

Using Assets in Nextflow workflows

Assets are available in both shell/Docker and Nextflow workflows. When using an asset in a Nextflow workflow, only the primary Nextflow process (i.e., the script running your nextflow run command) has access to the /share directory and your asset. If any child processes need the asset, you will need to pass the asset’s filepath to your Nextflow script as an argument. This allows Nextflow to distribute your asset to any child processes spawned by the main script. For example:
nextflow run "${REPOSITORY_DIR}/main.nf" \
  -params-file input_params.json \
  --my_asset_arg /share/asset_<UUID>/<filename> \
  --outdir output-$OCX_ANALYSIS_UUID