Test Syntax
Input files
We will simulate a phenotype and prepare all input files except the array of haplotype probabilities.
<![CDATA[ animals <- rownames(model.probs) markers <- dimnames(model.probs)[[3]] n <- nrow(model.probs) marker <- "JAX00132034" ]]>
We simulate a phenotype that is driven by the CAST (“F”) allele at a random marker:
<![CDATA[ n.cast.alleles <- round(2*model.probs[, "F", marker]) set.seed(1) pheno <- data.frame(simpheno1=rnorm(n, mean=n.cast.alleles)) rownames(pheno) <- animals write.csv(pheno, file="pheno.csv", quote=F) ]]>
We write a file of covariates (just sex in this example):
<![CDATA[ covar <- data.frame(sex=substring(animals, 1, 1), stringsAsFactors=FALSE) rownames(covar) <- animals write.csv(covar, file="covar.csv", quote=F) ]]>