# Declare "*" as the symbol for a missing record
missing "*"

# It can be convenient to put directory names into variables so they can be easily changed.
datadir=""

# The output file
log "log"

/*
 * Read in data from "../data/jvped" 
 * This declares that there are 9 (no more or less) fields per record. 
 * Records will be read in until the end of the file is reached.
 */
file datadir+"jvped",id,sire,dam,y,all1_1,all1_2,all2_1,all2_2,af

# Declare which variables have the pedigree information
pedigree id,sire,dam

# af (affected status) is discrete
discrete af

# Link the observed haplotypes to markers
marker locus mark1[all1_1,all1_2],mark2[all2_1,all2_2]

# We have a trait locus (actually this can be multiple trait loci)
trait locus QTL

# y is censored when individual is unaffected (af=1)
censored y where (af="1")

# Define the model
model y=QTL

# Set up the linkage group
link "chromosome 1",mark1,mark2

