Skip to content

Dynamic declaration of array size and accessing array job variables within script #5849

Answered by bentsherman
banilmohammed asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@banilmohammed
Comment options

@bentsherman
Comment options

@banilmohammed
Comment options

@bentsherman
Comment options

@banilmohammed
Comment options

Answer selected by banilmohammed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants