Demerelate (version 0.9-2)

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.

Usage

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

Arguments

pop1
Specific dataframe of type inputformat. Population one used for calculations. Inputformat needs to be standard three digits mode for Demerelate.
pop2
Specific dataframe of type inputformat. Population two used for calculations. Inputformat needs to be standard three digits mode for Demerelate.
allele.column
Numeric value - 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.
data
If set as TRUE allele sharing is only calculated for each pairwise comparison of individuals in the same position in pop1 with this position in pop2 - i.e. the diagonal of a distance matrix. If set as data.frame each pairwise comparison of column 1 with column 2 is calculated - i.e. the lower triangle of a distance matrix.
value
Character defining method to calculate allele sharing or similarity estimates. Can be set as "Bxy", "Sxy", "Mxy", "Li", "rxy", "lxy", "loiselle", "wang.fin", "wang", "ritland", "morans.fin" or "morans".
ref.pop
Reference population used for relatedness calculations.

Value

value.

Details

The function uses each population to build a dataframe with row positions for pairwise comparisons according to their position in pop1 and pop2. Similarity indices are calculated for each pair in one locus defined by the number indicated in allele.column. If allele.column is set as 1 allele information will be taken from the two columns of the first locus.

See Also

inputformat Demerelate Emp.calc Bxy Sxy Mxy Li rxy lxy loiselle wang.fin wang ritland morans.fin

Examples

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

Run the code above in your browser using DataLab