Writes a Pop-class to PLINK PED and MAP files. The arguments
for this function were chosen for consistency with
RRBLUP2
. The base pair coordinate will the locus
position as stored in AlphaSimR and not an actual base pair
position. This is because AlphaSimR doesn't track base pair
positions, only relative positions for the loci used in the
simulation.
writePlink(
pop,
baseName,
traits = 1,
use = "pheno",
snpChip = 1,
useQtl = FALSE,
simParam = NULL,
...
)
an object of Pop-class
basename for PED and MAP files.
an integer indicating the trait to write, a trait name, or a function of the traits returning a single value.
what to use for PLINK's phenotype field. Either phenotypes "pheno", genetic values "gv", estimated breeding values "ebv", breeding values "bv", or random values "rand".
an integer indicating which SNP chip genotype to use
should QTL genotypes be used instead of a SNP chip. If TRUE, snpChip specifies which trait's QTL to use, and thus these QTL may not match the QTL underlying the phenotype supplied in traits.
an object of SimParam
additional arguments if using a function for traits