| gen.findMRCA {GENLIB} | R Documentation |
Returns MRCAs of pairs of specified individuals and the distance (number of meioses) between individuals through the MRCAs.
gen.findMRCA(gen, individuals, NbProcess=parallel::detectCores()-1)
gen |
An object of class GLgen obtained with gen.genealogy, gen.lineages or gen.branching. Required. |
individuals |
Vector of individual id numbers for which to find the MRCAs. Required |
NbProcess |
Number of processes to use when running this function. Default=parallel::detectCores()-1 |
returns a matrix
This function uses the parallel programming functions of foreach, snow and doSNOW for launching several processes.
gen.genealogy
gen.founder
gen.findFounders
gen.findDistance
gen.find.Min.Distance.MRCA
data(geneaJi) genJi<-gen.genealogy(geneaJi) gen.findMRCA(genJi, individuals=c(1,29), NbProcess = 1) ## Not run: For a more complex example: data(genea140) gen140<-gen.genealogy(genea140) all_commonFounders<-gen.findFounders(gen140, individuals=c(409033,408728), NbProcess = 1) ## Not run: 127 founders common to #409033 and #408728 length(all_commonFounders) ## Not run: 22 most recent common ancestors for #409033 and #408728 MRCA_2ind<-gen.findMRCA(gen140, individuals=c(409033,408728), NbProcess = 1)