find_ibd_segments: Find IBD segments for a set of strains

Description Usage Arguments Details Value References Examples

View source: R/find_ibd_segments.R

Description

Find IBD segments (regions with a lot of shared SNP genotypes) for a set of strains

Usage

1
find_ibd_segments(geno, map, min_lod = 15, error_prob = 0.001, cores = 1)

Arguments

geno

List of matrices of founder genotypes. The matrices correspond to the genotypes on chromosomes and are arrayed as founders x markers.

map

List of vectors of marker positions

min_lod

Threshold for minimum LOD score for a segment

error_prob

Genotyping error/mutation probability

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().

Details

For each strain pair on each chromosome, we consider all marker intervals and calculate a LOD score comparing the two hypotheses: that the strains are IBD in the interval, vs. that they are not. We assume that the two strains are homozygous at all markers, and use the model from Broman and Weber (1999), which assumes linkage equilibrium between markers and uses a simple model for genotype frequencies in the presence of genotyping errors or mutations.

Note that inference of IBD segments is heavily dependent on how SNPs were chosen to be genotyped. (For example, were the SNPs ascertained based on their polymorphism between a particular strain pair?)

Value

A data frame whose rows are IBD segments and whose columns are:

References

Broman KW, Weber JL (1999) Long homozygous chromosomal segments in reference families from the Centre d’Étude du Polymorphisme Humain. Am J Hum Genet 65:1493–1500.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# load DO data from Recla et al. (2014) Mamm Genome 25:211-222.
recla <- read_cross2("https://raw.githubusercontent.com/rqtl/qtl2data/main/DO_Recla/recla.zip")

# grab founder genotypes and physical map
fg <- recla$founder_geno
pmap <- recla$pmap

# find shared segments
(segs <- find_ibd_segments(fg, pmap, min_lod=10, error_prob=0.0001))

## End(Not run)

qtl2 documentation built on Oct. 18, 2021, 1:06 a.m.