Skip to contents

Special handling for Python-based tools that use Python code templates instead of shell commands.

Usage

sn_render_python_template(
  python_template,
  params,
  inputs = list(),
  outputs = list(),
  command_config = list(),
  show_messages = TRUE
)

Arguments

python_template

Character. Python code template.

params

List. Parameters for template rendering.

inputs

List. Input definitions.

outputs

List. Output definitions.

command_config

List. Command configuration.

show_messages

Logical. Whether to show template rendering messages.

Value

Character. Rendered Python code.

See also

Other template system: sn_render_template(), sn_test_template()

Examples

if (FALSE) { # \dontrun{
python_code <- 'import scanpy as sc\nadata = sc.read_h5ad("{{ input_h5ad }}")'
params <- list(input_h5ad = "data.h5ad")
rendered <- sn_render_python_template(python_code, params, inputs, outputs, cmd_config)
} # }