You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
Given a Task with parallel TaskAttempts, it can be useful to know the index of each task attempt. For example, I may want to take a list of input files and assign each one a different unique integer ID (as with fastq files and corresponding read groups for alignment and BQSR).
I propose adding "index" and "size" keywords to the jinja template dictionary. Users can query any dimension, e.g. for 2-dimensional array [[1,2,3],[4,5,6]], size(1) would return the innermost length of 3, and size(2) would return a length of 2. When operating on element "4", index(1) would return 1 (1-based index), and index(2) would return 2. For any higher value, both size(n) and index(n) should return 1.
Because jinja templates are rendered when Tasks are created, different index values will not alter the fingerprint of Tasks unless the index is referenced. e.g. if I run an identical Task twice, once with index 1 and once with index 2, Loom will still treat those steps as identical unless the user includes the "index" function in the command string. In that case, the differing values of the rendered command would result in different fingerprints.
The text was updated successfully, but these errors were encountered:
Given a Task with parallel TaskAttempts, it can be useful to know the index of each task attempt. For example, I may want to take a list of input files and assign each one a different unique integer ID (as with fastq files and corresponding read groups for alignment and BQSR).
I propose adding "index" and "size" keywords to the jinja template dictionary. Users can query any dimension, e.g. for 2-dimensional array [[1,2,3],[4,5,6]], size(1) would return the innermost length of 3, and size(2) would return a length of 2. When operating on element "4", index(1) would return 1 (1-based index), and index(2) would return 2. For any higher value, both size(n) and index(n) should return 1.
Because jinja templates are rendered when Tasks are created, different index values will not alter the fingerprint of Tasks unless the index is referenced. e.g. if I run an identical Task twice, once with index 1 and once with index 2, Loom will still treat those steps as identical unless the user includes the "index" function in the command string. In that case, the differing values of the rendered command would result in different fingerprints.
The text was updated successfully, but these errors were encountered: