Allow defining a tag based on the state going through the channel.
Feature description
Right now, the trace.txt uses the tag which is simply set to $id to figure out which process is linked to which component. In OpenProblems, we use it to link the output of the Nextflow trace (containing resource usage throughout the run) to the different datasets going through the pipeline.
It would be useful if we could construct the tag based on information in the state, and if the tag was machine interpretable.
However, this is currently not possible because the tag can only be defined using information available inside the underlying nextflow process; that is:
Allows linking the trace.txt more easily to whatever it needs to be linked to.
Alternatives considered
As a workaround, we could add a --tag argument in components which we could then use to set the tag to tag: "${args.tag ?: id}". See openproblems-bio/openproblems-v2#446.
Possible solution
No response
Confirmation
[X] I have searched the existing issues to make sure this is not a duplicate request.
[X] I have provided clear and concise information about the feature.
Feature summary
Allow defining a
tag
based on the state going through the channel.Feature description
Right now, the
trace.txt
uses thetag
which is simply set to$id
to figure out which process is linked to which component. In OpenProblems, we use it to link the output of the Nextflow trace (containing resource usage throughout the run) to the different datasets going through the pipeline.It would be useful if we could construct the tag based on information in the state, and if the tag was machine interpretable.
Example:
{"dataset_id": ..., "normalization_id": ..., ...}
.However, this is currently not possible because the tag can only be defined using information available inside the underlying nextflow process; that is:
For a component with input files
--input_mod1
and--input_mod2
, this would look something like this:Fundamentally, it would probably be a good idea to implement this at a Viash level, so we can do something like:
Why is this feature beneficial?
Allows linking the trace.txt more easily to whatever it needs to be linked to.
Alternatives considered
As a workaround, we could add a
--tag
argument in components which we could then use to set the tag totag: "${args.tag ?: id}"
. See openproblems-bio/openproblems-v2#446.Possible solution
No response
Confirmation