count_xo | R Documentation |
Estimate the numbers of crossovers in each individual on each chromosome.
count_xo(geno, quiet = TRUE, cores = 1)
geno |
List of matrices of genotypes (output of |
quiet |
If FALSE, print progress messages. |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
A matrix of crossover counts, individuals x chromosomes, or
(if the input was the output of sim_geno()
) a
3d-array of crossover counts, individuals x chromosomes x
imputations.
locate_xo()
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
map <- insert_pseudomarkers(iron$gmap, step=1)
pr <- calc_genoprob(iron, map, error_prob=0.002, map_function="c-f")
g <- maxmarg(pr)
n_xo <- count_xo(g)
# imputations
imp <- sim_geno(iron, map, error_prob=0.002, map_function="c-f", n_draws=32)
n_xo_imp <- count_xo(imp)
# sums across chromosomes
tot_xo_imp <- apply(n_xo_imp, c(1,3), sum)
# mean and SD across imputations
summary_xo <- cbind(mean=rowMeans(tot_xo_imp),
sd=apply(tot_xo_imp, 1, sd))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.