Learn R Programming

Demerelate (version 0.8-1)

emp.calc: Function to calculate pairwise relatedness within populations based on allele sharing.

Description

Allele sharing and relatedness estimators can be calculated for one population as a mean over several loci.

Usage

emp.calc(tab.pop.pop, value="rxy", ref.pop="NA")

Arguments

tab.pop.pop
Object with information for one population and loci. Object needs to be formatted according to inputformat
value
Either "rxy","Bxy","Mxy" are available to calculate mean relatedness among loci using allele.sharing
ref.pop
Reference population needs to be specified for rxy calculations

Value

  • empirical.listObject containing matrix of mean individual pairwise relatedness.

Details

The function calculates pairwise relatedness for all individuals in the dataframe. The output is a matrix of similarities by relatedness values in the population.

References

Blouin, M.S. et al. (1996) Use of microsatellite loci to classify individuals by relatedness. Molecular Ecology, 5, 393-401. Li C.C. and Horvitz D.G. (1953) Some methods of estimating the inbreeding coefficient. American Journal of Human Genetics 5, 107-17. Oliehoek, P. A. et al. (2006) Estimating relatedness between individuals in general populations with a focus on their use in conservation programs. Genetics, 173, 483-496. Queller, D.C. and Goodnight, K.F. (1989) Estimating relatedness using genetic markers. Evolution, 43, 258-275.

See Also

allele.sharing queller

Examples

Run this code
## demerelpop needs to be an object of class data.frame formatted
     ## according to inputformat. For each pairwise comparison in
     ## in the data.frame empirical estimates of relatedness are
     ## calculated omitting statistics.
     ## Bxy, rxy and Mxy are possible to chose as estimator.

      data(demerelpop)
      
      # As example Mxy is calculated for one population of demerelpop
      
      demerelpop.sp <- split(demerelpop,demerelpop[,2])

      empirical.result <- emp.calc(demerelpop.sp[[1]], value="Mxy", 
                                   ref.pop="NA")

Run the code above in your browser using DataLab