Learn R Programming

Demerelate (version 0.8-1)

allele.sharing: Calculates allele sharing rates or similarity estimators for two populations

Description

Internal function of Demerelate to calculate different allele sharing indices or estimators for any pair of population. Following indices can be calculated: $B_{xy}$ (number of alleles shared) as described in Li and Horvitz 1953. $M_{xy}$ (genotype sharing) as described in Blouin et al. 1996. The estimator $r_{xy}$ based on Queller and Goodnight 1989 adapted to pairwise comparisons as described in Oliehoek et al. 2006.

Usage

allele.sharing(pop1, pop2, allele.column, onlypairs = FALSE,
                    value = NA, ref.pop)

Arguments

pop1
Specific dataframe of type inputformat. Population one used for calculations. Individuals passed to rows of resulting matrix. Inputformat needs to be standard three digits mode for Demerelate.
pop2
Specific dataframe of type inputformat. Population two used for calculations. Individuals passed to columns of resulting matrix. Inputformat needs to be standard three digits mode for Demerelate.
allele.column
Numeric value which needs to be an odd number. It equals the number of the first column in the dataframe containing allele information. Order of loci in both populations needs to be exactly equal.
onlypairs
If set as TRUE allele sharing is only calculated for diagonal comparisons in the resulting pairwise relatedness matrix. If set as FALSE lower triangle is calculated from the pairwise relatedness matrix.
value
Character defining method to calculate allele sharing or similarity estimates. Can be set as "rxy", "Bxy" or "Mxy".
ref.pop
Reference population used for relatedness calculations.

Value

  • Function returns the object tab.all as matrix of rows passed from population one and columns from population two.

Details

The function uses column one of each population dataframe to build a matrix with column names from samples of pop2 and row names from samples of pop1. Similarity indices can be calculated for each pair. Indices are calculated using allelic information of one locus which first column must be indicated by allele.column. allele.column+1 will be used automatically as second allele information.

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

inputformat Demerelate emp.calc queller

Examples

Run this code
## internal function not intended for direct use

Run the code above in your browser using DataLab