pull_genoprobpos {qtl2}R Documentation

Pull genotype probabilities for a particular position

Description

Pull out the genotype probabilities for a particular position (by name)

Usage

pull_genoprobpos(genoprobs, map = NULL, chr = NULL, pos = NULL, marker = NULL)

Arguments

genoprobs

Genotype probabilities as calculated by calc_genoprob().

map

A map object: a list (corresponding to chromosomes) of vectors of marker positions. Can also be a snpinfo object (data frame with columns chr and pos; marker names taken from column snp or if that doesn't exist from the row names)

chr

A chromosome ID

pos

A numeric position

marker

A single character string with the name of the position to pull out.

Details

Provide either a marker/pseudomarker name (with the argument marker) or all of map, chr, and pos.

Value

A matrix of genotype probabilities for the specified position.

See Also

find_marker(), fit1(), pull_genoprobint()

Examples

iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))

gmap <- insert_pseudomarkers(iron$gmap, step=1)
pr <- calc_genoprob(iron, gmap, error_prob=0.002)

pmar <- find_marker(gmap, 8, 40)
pr_8_40 <- pull_genoprobpos(pr, pmar)

pr_8_40_alt <- pull_genoprobpos(pr, gmap, 8, 40)


[Package qtl2 version 0.36 Index]