genoprob_to_alleleprob: Convert genotype probabilities to allele probabilities

View source: R/genoprob_to_alleleprob.R

genoprob_to_alleleprobR Documentation

Convert genotype probabilities to allele probabilities

Description

Reduce genotype probabilities (as calculated by calc_genoprob()) to allele probabilities.

Usage

genoprob_to_alleleprob(probs, quiet = TRUE, cores = 1)

Arguments

probs

Genotype probabilities, as calculated from calc_genoprob().

quiet

IF FALSE, print progress messages.

cores

Number of CPU cores to use, for parallel calculations. (If 0, use parallel::detectCores().) Alternatively, this can be links to a set of cluster sockets, as produced by parallel::makeCluster().

Value

An object of class "calc_genoprob", like the input probs, but with probabilities collapsed to alleles rather than genotypes. See calc_genoprob().

Examples

iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
gmap_w_pmar <- insert_pseudomarkers(iron, step=1)
probs <- calc_genoprob(iron, gmap_w_pmar, error_prob=0.002)
allele_probs <- genoprob_to_alleleprob(probs)

qtl2 documentation built on April 22, 2023, 1:10 a.m.