nextflow
nextflow copied to clipboard
New introspection `workflow.seqeraPlatform` scope for data from Seqera Platform
It'd be nice to have a new workflow introspection scope called workflow.seqeraPlatform
to access metadata from Seqera Platform, when available.
For example:
workflow.seqeraPlatform.user.username
workflow.seqeraPlatform.user.name
workflow.seqeraPlatform.user.email
workflow.seqeraPlatform.user.roles
workflow.seqeraPlatform.workspace.id
workflow.seqeraPlatform.workspace.name
workflow.seqeraPlatform.computeEnvironment.id
workflow.seqeraPlatform.computeEnvironment.name
workflow.seqeraPlatform.pipeline.name
workflow.seqeraPlatform.pipeline.repository
workflow.seqeraPlatform.pipeline.revision
workflow.seqeraPlatform.run.id
..etc. Can think of many more, or compare to the Seqera Platform API for standard fields.
If available, these could be used to set variables within the workflow config. There are many examples, a simple one would be the work directory:
workDir = {"/path/to/a/work/directory/${workflow.seqeraPlatform.user.username}/${workflow.seqeraPlatform.pipeline.name}/${workflow.runName}"}
Another one would be for notification emails (maybe more relevant in case of custom notification emails, like nf-core, but still useful as a simple example):
notification.to = workflow.seqeraPlatform.user.email