View source: R/find_ibd_segments.R
find_ibd_segments | R Documentation |
Find IBD segments (regions with a lot of shared SNP genotypes) for a set of strains
find_ibd_segments(geno, map, min_lod = 15, error_prob = 0.001, cores = 1)
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 |
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?)
A data frame whose rows are IBD segments and whose columns are:
Strain 1
Strain 2
Chromosome
Left marker
Right marker
Left position
Right position
Left marker index
Right marker index
Interval length
Number of markers
Number of mismatches
LOD score
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.