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

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/allele.sharing.R

Description

Internal function of Demerelate to calculate different allele sharing indices or estimators for any pair of population.

Usage

1
2
3
     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.

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.

Value

Function returns the object simil.vector as vector of similarities according to value.

Author(s)

Philipp Kraemer, <philipp.kraemer@uni-oldenburg.de>

See Also

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

Examples

1
2
3
     ## internal function not intended for direct use
     
     

Demerelate documentation built on May 2, 2019, 4:01 p.m.