Minimum genetic distance between two individuals

Share:

Description

Returns the minimum distance (number of meioses) between the specified individuals through one specified ancestor.

Usage

1
gen.findDistance(gen, individuals, ancestor)

Arguments

gen

An object of class GLgen obtained with gen.genealogy, gen.lineages or gen.branching. Required.

individuals

A vector of individual id numbers between which to calculate the distance. Required.

ancestor

A common ancestor to the specified individuals. Required.

Value

returns a numeric value

See Also

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

Examples

1
2
3
4
5
6
7
8
9
data(geneaJi) 
genJi<-gen.genealogy(geneaJi) 
gen.findDistance(genJi, individuals=c(1,29), ancestor=17)
gen.findDistance(genJi, individuals=c(1,29), ancestor=26)

data(genea140) 
gen140<-gen.genealogy(genea140) 
gen.findDistance(gen140, individuals=c(409033,408728), ancestor=38714)
gen.findDistance(gen140, individuals=c(408728,408828), ancestor=95080)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.