Dynamic declaration of array size and accessing array job variables within script #5849
-
Hi all,
Running this script with
This currently doesn't work as nextflow tells me there is no defined variable called I have 2 questions:
In regards to 1. I looked through the following thread #1477 (comment), where there seems to be references to Thank you all |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
You just need to escape the dollar sign in the script block: As for dynamic array size, it is not allowed on a per-task basis because that wouldn't make any sense. But you could still set it using a param: array params.array_size The closure is needed only when you want to use task inputs. |
Beta Was this translation helpful? Give feedback.
You just need to escape the dollar sign in the script block:
\${SGE_TASK_ID}
. Otherwise Nextflow will treat it as a Nextflow variable (that's how string interpolation works in Nextflow).As for dynamic array size, it is not allowed on a per-task basis because that wouldn't make any sense. But you could still set it using a param:
array params.array_size
The closure is needed only when you want to use task inputs.