convert2gen | R Documentation |
Convert data generated by sim.ped
to a matrix of
genotypes.
convert2gen(xodat, map)
xodat |
Allele information with continuous crossover locations, as
generated by |
map |
A vector of marker locations, in cM. |
The marker locations (map
) must be sorted and should span a
length that is less then what was used to generated xodat
.
If there are just two possible alleles (1 and 2) in xodat
, the
genotypes are coded as 1
, 2
, and 3
, for genotypes
11, 12 and 22. Otherwise, they are converted to binary codes. For
example, with possible alleles 1, 2, and 3, an individual with
genotype a,b will be given the value 2^(a-1) + 2^(b-1)
.
The output is a matrix with length(xodat)
rows and
length(map)
columns. Genotype codes are described in Details.
Karl W Broman, broman@wisc.edu
sim.ped
, genAILped
ailped <- genAILped(ngen=2, npairs=2, sibship.size=2)
aildat <- sim.ped(ailped, 100)
map <- seq(0, 100, by=10)
names(map) <- paste("M", 1:length(map), sep="")
ailgen <- convert2gen(aildat, map)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.