schema: gsuite.model/v1-draft
name: prediction_contrasts
traits:
- trait1
- trait2
inputs:
  observations:
    type: table
    file: ../frozen-inputs/rhe/contrast-design/phenotypes.csv
    format: csv
    id: record_id
    columns:
      individual: animal
      cohort: cohort
      age: age
    responses:
      trait1: trait1
      trait2: trait2
  pedigree:
    type: pedigree
    file: ../frozen-inputs/gsim/large-pedigree-2trait/pedigree.csv
    columns:
      individual: animal
      parent1: sire
      parent2: dam
relationships:
  A:
    type: pedigree
    input: pedigree
covariances:
  from_fit: results/vc/run.json
model:
  data: observations
  fixed: factor(cohort) + age
  random:
    genetic:
      group: individual
      relationship: A
      covariance: genetic
  residual: residual
analysis:
  task: solve
execution:
  solver: sparse_direct
  sparse_backend: pardiso
  threads: 4
output:
  directory: results/blup
  predictions:
    genetic_values:
      effects:
      - genetic
      levels: all
  uncertainty:
    method: exact
    maximum_solves: 2
    covariance: full
    contrasts:
      offspring_difference:
      - prediction: genetic_values
        level: A000003
        trait: trait1
        weight: 1.0
      - prediction: genetic_values
        level: A000004
        trait: trait1
        weight: -1.0
      second_trait:
      - prediction: genetic_values
        level: A000003
        trait: trait2
        weight: 1.0
evaluation:
  predictions: genetic_values
  truth:
    file: ../frozen-inputs/gsim/large-pedigree-2trait/true_breeding_values.csv
    columns:
      individual: animal
      trait: trait
      value: true_breeding_value
  subset: all
  individual: individual
