name: EdibleOil_Heating_Stability_v1
description: RQ2–RQ4 thermal stability and trend markers across heating stages.
when_to_use: "Assess thermal degradation markers and stability across heating stages."
expected_columns:
  oil_col: oil_type
  matrix_col: matrix
  heating_col: heating_stage
report_templates:
  intro: "This protocol quantifies stability and heating trends (RQ2–RQ4) for edible oils."
  note: "Emphasizes CV/MAD stability and heating trend significance with FDR correction."
seed: 0
steps:
  - type: preprocess
    params:
      baseline_lambda: 100000
      baseline_p: 0.01
      smooth_window: 9
      smooth_polyorder: 3
      normalization: reference
      reference_wavenumber: 2720.0
      peaks:
        - {name: I_1742, wavenumber: 1742}
        - {name: I_1652, wavenumber: 1652}
        - {name: I_1434, wavenumber: 1434}
        - {name: I_1296, wavenumber: 1296}
        - {name: I_1259, wavenumber: 1259}
        - {name: I_2720, wavenumber: 2720}
  - type: rq_analysis
    params:
      oil_col: oil_type
      matrix_col: matrix
      heating_col: heating_stage
      random_state: 0
      n_splits: 5
      normalization_modes: [reference, vector]
      minimal_panel_target_accuracy: 0.9
      adjust_p_values: true
      enable_clustering: false
      ratios:
        - {name: 1742/2720, numerator: I_1742, denominator: I_2720}
        - {name: 1652/2720, numerator: I_1652, denominator: I_2720}
        - {name: 1434/2720, numerator: I_1434, denominator: I_2720}
        - {name: 1259/2720, numerator: I_1259, denominator: I_2720}
        - {name: 1296/2720, numerator: I_1296, denominator: I_2720}
  - type: output
    params:
      output_dir: protocol_runs
