Uses the jinjar package to render command templates with user-provided parameters. Supports Jinja2 syntax for conditional logic and variable substitution.
Arguments
- template
Character. Template string from tool configuration (shell or python field).
- params
List. Named list of parameters to substitute in template.
- inputs
List. Input definitions from tool configuration.
- outputs
List. Output definitions from tool configuration.
- command_config
List. Complete command configuration from tool YAML.
- show_messages
Logical. Whether to show template rendering messages.
See also
Other template system:
sn_render_python_template()
,
sn_test_template()
Examples
if (FALSE) { # \dontrun{
template <- "samtools view -@ {{ threads }} {{ input }} -o {{ output }}"
params <- list(threads = 4, input = "test.bam", output = "filtered.bam")
rendered <- sn_render_template(template, params, inputs, outputs, cmd_config)
} # }