Learn R Programming

GENLIB (version 1.0.4)

gen.find.Min.Distance.MRCA: Finds the minimum distances between pairs of individuals given a set of ancestors.

Description

Returns the shortest distances (number of meioses) between pairs of probands given the matrix of MRCAs output by the gen.findMRCA function.

Usage

gen.find.Min.Distance.MRCA(genMatrix, individuals="ALL", ancestors="ALL")

Arguments

genMatrix

Matrix of most recent common ancestors, MRCAs, obtained with gen.findMRCA. Required.

individuals

Vector of proband id numbers to include. All are included by default.

ancestors

Vector of MRCA id numbers to include. All are included by default.

Value

returns a matrix

See Also

gen.genealogy gen.founder gen.findMRCA gen.findDistance gen.findFounders

Examples

Run this code
# NOT RUN {
data(geneaJi) 
genJi<-gen.genealogy(geneaJi) 
matMRCA<-gen.findMRCA(genJi, individuals=c(1,29), NbProcess = 1)
gen.find.Min.Distance.MRCA(matMRCA)

# }
# NOT RUN {
Increasing NbProcess will decrease execution time
data(genea140) 
gen140<-gen.genealogy(genea140) 
matMRCA<-gen.findMRCA(gen140, individuals=c(409033,408728,408828), NbProcess = 1)
gen.find.Min.Distance.MRCA(matMRCA, individuals=c(409033,408728))
# }

Run the code above in your browser using DataLab