# ---------------------------------------------------------------------------
# Example grid YAML for tfs-setup-sim-grid
#
# Usage:
#   tfs-setup-sim-grid simulate_grid.yaml --out_prefix my_sim_grid
#
# This creates one subdirectory per combination, writes a tfs_sim_config.yaml
# in each (base config + overrides), and renders run.sh with the template
# variables.  Run all simulations with:
#   for d in my_sim_grid/run_*/; do cd "$d" && bash run.sh && cd -; done
# ---------------------------------------------------------------------------

# Base simulate config.  Each run inherits all settings from this file; the
# 'simulate' blocks below override specific top-level keys.
base_config: simulate_config.yaml    # in the same examples/simulate/ directory

# Directory name for each run.  Variables from both 'simulate' and 'template'
# blocks are available.  The |basename filter strips directory paths from
# file-valued variables.
run_name: "{{ theta_component }}__noise{{ tube_noise_sigma }}__seed{{ random_seed }}"

# Jinja2 template file (relative to this YAML) rendered into each subdir.
output_file: run.sh    # in the same examples/simulate/ directory


# ---------------------------------------------------------------------------
# simulate blocks
#
# Variables here override top-level keys in the base config.  They are NOT
# injected into the Jinja2 template.  Paths are resolved relative to this
# YAML and re-expressed relative to each subdirectory in the written config.
#
# Multi-key variants always move together and are never split by the Cartesian
# product — use this to keep parameters that are only meaningful in combination.
# ---------------------------------------------------------------------------

simulate:

  # --- Fixed settings (single-variant = always selected) -------------------

  - name: reads
    variants:
      - total_num_reads: 25_000_000

  # --- Theta component (thermodynamic model) --------------------------------
  #
  # Any key in model_registry["theta"] except "_simple" is valid.
  # Uncomment additional variants to compare thermodynamic models.

  - name: thermodynamic_model
    variants:
      - theta_component: thermo.O2_C12_K5_U0_a.PK
      # - theta_component: hill_geno

  # --- Noise level ---------------------------------------------------------

  - name: noise
    variants:
      - tube_noise_sigma: 0.001
      - tube_noise_sigma: 0.005

  # --- Random seed ---------------------------------------------------------
  #
  # Varying the seed with the same other settings tests reproducibility.

  - name: seed
    variants:
      - random_seed: 0
      - random_seed: 42


# ---------------------------------------------------------------------------
# template blocks
#
# Variables here are injected into the Jinja2 template only.  They are NOT
# written to tfs_sim_config.yaml.
# ---------------------------------------------------------------------------

template:

  # Number of independent replicates passed to tfs-simulate as a CLI flag.
  - name: num_replicates
    variants:
      - num_replicates: 3
