View source: R/convert2geno_allchr.R
convert2geno_allchr | R Documentation |
Wrap up of convert2geno to adequate multiple chromosomes.
convert2geno_allchr(
xodat,
map,
id = NULL,
founder_geno = NULL,
return.matrix = TRUE,
shift_map = FALSE
)
xodat |
The sort of detailed genotype/crossover data generated
by |
map |
marker locations, a list with elements for each chromosome |
id |
ids for which individuals genotypes is desired |
founder_geno |
Optional list of matrices (one per chromosome)
of size |
return.matrix |
If FALSE, the result is a list of length
|
shift_map |
If TRUE, shift genetic map to start at 0 |
If founder_geno
is provided or there are just two
founders, the result is a numeric matrix of genotypes, individuals
x markers, with genotypes 1/2/3 codes for 11/12/22 genotypes. If
there are more than two founders and founder_geno
are
letters, the result is a character matrix, too.
If founder_geno
is not provided and there are more than two
founders, the result is a 3-dimensional array, individuals x
markers x alleles, with the third dimensional corresponding to the
maternal and paternal allele.
convert2geno()
library(qtl)
# marker map
map <- sim.map(len=rep(100, 19), n.mar=10, include.x=FALSE)
# simulate AIL pedigree
tab <- sim_ail_pedigree(12, 30)
# simulate data from that pedigree
dat <- sim_from_pedigree_allchr(tab, map)
names(map) <- paste0("marker", seq(along=map))
# convert data to marker genotypes
id <- which(tab[, "gen"]==12)
geno <- convert2geno_allchr(dat, map, id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.