trio.prepare(trio.dat, freq=NULL, blocks=NULL, logic=TRUE, ...)
trio.check
.simuBkMap
contained in this package. If provided, the following argument
blocks
will be ignored.
The object must have three columns in the following order: block
identifiers (key
), haplotypes (hap
), and haplotype
frequencies (freq
). The block identifiers must be unique for
each block. For each block, the haplotypes must be encoded as a
string of the integers 1 and 2, where 1 refers to the major allele
and 2 refers to the minor allele. The respective haplotype
frequencies will be normalized to sum one.
freq
and blocks
are NULL
, complete linkage
equilibrium is assumed (i.e., no correlation between the
genotypes).TRUE
), or if the imputed
data should be returned in genotype format, using one variable per
SNP (FALSE
).haplo.em
.logic = TRUE
.logic = FALSE
.famid
), the individual id (pid
),
the genotype (snp
), the row numbers (r
), and the column numbers (c
). This element
will be NULL
if there are no missing data. trio.prepare
, which operates on an
output object of trio.check
, accepts the block length
information as an argument. If this argument is not specified, a
uniform block length of 1 (i.e., no LD structure) is assumed. If the
haplotype frequencies are not specified, they are estimated from the
parents' genotypes using the function haplo.em
. The
function then returns a list that contains the genotype information in
binary format, suitable as input for trio logic regression. Since
trio logic regression requires complete data, the function trio.prepare
also performs an imputation of the missing genotypes. The imputation
is based on the estimated or supplied haplotype information.
trio.check
, haplo.em
data(trio.data)
trio.tmp <- trio.check(dat=trio.ped1)
trio.bin <- trio.prepare(trio.dat=trio.tmp, blocks=c(1,4,2,3))
trio.bin$bin[1:8,]
Run the code above in your browser using DataLab