irida
irida copied to clipboard
Add ability to set pipeline parameters on a per-sample basis
Describe your idea for a new feature
Right now users can submit pipelines and override parameters for the pipelines. But they cannot set different parameters for different samples (e.g., passing the sample name or sample metadata to the Galaxy workflow). It would be nice to be able to do this.
Describe how you would access this feature?
This would be something either selected by a user in our UI, or more likely defined by developers of different pipelines.
One possible solution is that right now we have the pipeline parameters configured in an XML file which looks like:
https://github.com/phac-nml/irida/blob/f6b420e6cc0aed9f466f0bb1ed6f874757c62d08/src/main/resources/ca/corefacility/bioinformatics/irida/model/workflow/analysis/type/workflows/AssemblyAnnotation/0.6/irida_workflow.xml#L57-L59
A defaultValue can be specified, but the parameter cannot be automatically set on a per-sample bases (e.g., using the configured organism defined in the sample metadata).
We already use Thymeleaf in IRIDA as a template engine, which can process XML files. We could make this available to developers in the IRIDA workflow XML file so they could define something like:
<parameter name="prokka-3-species" defaultValue="${sample.species}">
And Thymeleaf would automatically fill in the appropriate value from the sample metadata.
There would be potential issues with this though. Mainly what to do if the value ${sample.species}
is blank, or what to do in cases where pipelines act on more than one sample (e.g., the SNVPhyl pipeline)?
Additional information
None.
Another suggestion if we do implement this is to be able to disable a parameter from being overridden by a user in the UI. For example disable_ui="True"
.