guess_phase | R Documentation |
Turn imputed genotypes into phased genotypes along chromosomes by attempting to pick the phase that leads to the fewest recombination events.
guess_phase(cross, geno, deterministic = FALSE, cores = 1)
cross |
Object of class |
geno |
Imputed genotypes, as a list of matrices, as from |
deterministic |
If TRUE, preferentially put smaller allele first when there's uncertainty. If FALSE, the order of alleles is random in such cases. |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
We randomly assign the pair of alleles at the first locus to two haplotypes, and then work left to right, assigning alleles to haplotypes one locus at a time seeking the fewest recombination events. The results are subject to arbitrary and random choices. For example, to the right of a homozygous region, either orientation is equally reasonable.
If input cross is phase-known (e.g., recombinant inbred lines),
the output will be the input geno
. Otherwise, the output
will be a list of three-dimensional arrays of imputed
genotypes, individual x position x haplotype (1/2).
maxmarg()
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
gmap <- insert_pseudomarkers(iron$gmap, step=1)
probs <- calc_genoprob(iron, gmap, error_prob=0.002)
imp_geno <- maxmarg(probs)
ph_geno <- guess_phase(iron, imp_geno)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.