LDsire: Calculation of paternal LD matrix

Description Usage Arguments Details Value Examples

View source: R/functions.R

Description

Matrix containing linkage disequilibrium between marker pairs on paternal gametes is set up from sire haplotypes and genetic-map information for each half-sib family.

Usage

1
LDsire(inMat, pos_chr, family, map_fun = "haldane")

Arguments

inMat

[MATRIX] Haplotype matrix for sires for all chromosomes.

pos_chr

[LIST] The marker positions in Morgan on chromosomes.

family

[VECTOR] Which family (sire) should be processed? Vector with consecutive entries of the form 1:2, 3:4, 5:6 and so on, linking to haplotypes (rows in inMat) of the corresponding sire

map_fun

["haldane" or "kosambi"] The mapping function applied.

Details

The function generates a block diagonal sparse matrix based on Matrix::bdiag. Use as.matrix() to obtain a regular one.

Value

Ds

Ds

(p x p) matrix of paternal LD

Examples

1
2
 data(testdata)
 LDfam2 <- LDsire(H.sire, pos.chr, family = 3:4)

hscovar documentation built on April 13, 2021, 9:06 a.m.

Related to LDsire in hscovar...