Learn R Programming

GENLIB (version 1.0.2)

gen.findMRCA: Finding most recent common ancestors, MRCAs

Description

Returns MRCAs of pairs of specified individuals and the distance (number of meioses) between individuals through the MRCAs.

Usage

gen.findMRCA(gen, individuals, NbProcess=detectCores()-1)

Arguments

Value

returns a matrix

See Also

gen.genealogy gen.founder gen.findFounders gen.findDistance gen.find.Min.Distance.MRCA

Examples

Run this code
data(geneaJi)
genJi<-gen.genealogy(geneaJi)
gen.findMRCA(genJi, individuals=c(1,29), NbProcess = 1)

\dontrun{For a more complex example:}
 data(genea140) 
 gen140<-gen.genealogy(genea140) 
 all_commonFounders<-gen.findFounders(gen140, individuals=c(409033,408728), NbProcess = 1)
 \dontrun{127 founders common to #409033 and #408728}
 length(all_commonFounders)
 \dontrun{22 most recent common ancestors for #409033 and #408728}
 MRCA_2ind<-gen.findMRCA(gen140, individuals=c(409033,408728), NbProcess = 1)

Run the code above in your browser using DataLab