predict_snpgeno: Predict SNP genotypes

View source: R/predict_snpgeno.R

predict_snpgenoR Documentation

Predict SNP genotypes

Description

Predict SNP genotypes in a multiparent population from inferred genotypes plus founder strains' SNP alleles.

Usage

predict_snpgeno(cross, geno, cores = 1)

Arguments

cross

Object of class "cross2". For details, see the R/qtl2 developer guide.

geno

Imputed genotypes, as a list of matrices, as from maxmarg().

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

A list of matrices with inferred SNP genotypes, coded 1/2/3.

See Also

maxmarg(), viterbi(), calc_errorlod()

Examples

## Not run: 
# load example data and calculate genotype probabilities
file <- paste0("https://raw.githubusercontent.com/rqtl/",
               "qtl2data/main/DOex/DOex.zip")
DOex <- read_cross2(file)
probs <- calc_genoprob(DOex, error_prob=0.002)

# inferred genotypes
m <- maxmarg(probs, minprob=0.5)

# inferred SNP genotypes
inferg <- predict_snpgeno(DOex, m)

## End(Not run)


rqtl/qtl2 documentation built on March 20, 2024, 6:35 p.m.