getProbs: Extract Probabilities for markers

View source: R/getProbs.R

getProbsR Documentation

Extract Probabilities for markers

Description

Extract IBD probabilities for one or more markers from an object of class IBDprob.

Usage

getProbs(IBDprob, markers, sumProbs = FALSE)

Arguments

IBDprob

An object of class IBDprob.

markers

A character vector of markers that should be extracted.

sumProbs

Should the probabilities by summed per parent. If TRUE the probability for e.g. parent A in a cross with parent B will be calculated as pA + 0.5 * pAB. If FALSE both pA and pAB will be output without further calculations.

Value

A data.frame with IBD probabilities for the extracted markers in the column and genotypes in the rows.

Examples

## Compute IBD probabilities for Steptoe Morex.
SxMIBD <- calcIBD(popType = "DH",
                  markerFile = system.file("extdata/SxM", "SxM_geno.txt",
                                        package = "statgenIBD"),
                  mapFile = system.file("extdata/SxM", "SxM_map.txt",
                                        package = "statgenIBD"))

## Get probabilities for a single marker.
probOne <- getProbs(IBDprob = SxMIBD,
                    markers = "plc")
head(probOne)

## Get probabilities for a multiple markers.
probMult <- getProbs(IBDprob = SxMIBD,
                     markers = c("plc", "tuba1"))
head(probMult)


statgenIBD documentation built on May 29, 2024, 1:32 a.m.