rec_count: Recombination counter

Description Usage Arguments Value Methods (by class) Examples

View source: R/diagnostics.R

Description

Using IBD matrices, one can estimate the number of recombinations in a single chromosome. This function calculates the number of recombinations using a single IBD matrix or a list of IBD matrices of all parental homologues. Recombinations are calculated per individual and per window. A genetic map is required.

Usage

1
2
3
4
5
6
7
rec_count(ibd, map, non_inf = c(0.3, 0.7))

## S3 method for class 'matrix'
rec_count(ibd, map, non_inf = c(0.3, 0.7))

## S3 method for class 'list'
rec_count(ibd, map, non_inf = c(0.3, 0.7))

Arguments

ibd

IBD matrix or list of matrices. Must contain row.names indicating the marker name.If 'ibd' is a list, it must contain matrices for all parental homologues.

map

data.frame with at least columns "position" and "marker". It is advisable to use a single

non_inf

Interval determining what is to be considered a non informative probability. Values below non_inf[1] will be treated as 0 and above non_inf[2] will be treated as 1. Values between the two will be ignored.

Value

A list containing: * individual: recombination counts per individual. Provided per parent if 'ibd' was a list. * on_map: a data.frame with recombination counts across individuals per window. Provided per parent if 'ibd' was a list.

Methods (by class)

Examples

1
2
3
4
5
6
7
8
data("smooth_descent")
IBD <- sdescent$predIBD
map <- sdescent$oldmap

#For a single matrix
rec <- rec_count(IBD[[1]],map)
#For all homologues
rec <- rec_count(IBD,map)

Alethere/SmoothDescent documentation built on Jan. 14, 2022, 9:40 p.m.