relate.calc: Coordinates internally reference and empirical datasets and...

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

View source: R/relate.calc.R

Description

Internal function of Demerelate to combine different populations of randomized offspring and empirical populations to calculate thresholds and statistics for later use as reference for each empirical population.

Usage

1
2
3
     relate.calc(tab.pop, pairs, file.output, value, 
                 directory.name, pm)
     

Arguments

tab.pop

Dataframe following format of inputformat used as reference for randomizations.

pairs

Number of pairwise comparison for each randomization.

file.output

logical. Should a cluster dendogram, histograms and .txt files be sent as standard output in your working directory. In some cases (inflating NA values) it may be necessary that this value has to be set as FALSE due to problems in calculating clusters on pairwise NA values.

value

String defining method to calculate allele sharing or similarity estimates. Can be set as "Bxy", "Sxy", "Mxy", "Li", "lxy", "rxy", "loiselle", "wang.fin", "wang", "ritland", "morans.fin" or "morans".

directory.name

Name of the directory results send to.

pm

R object or external file to be read internally. Custom reference populations will be loaded for the analysis. The object should be a list of allele frequencies. For each locus a vector with allele frequencies p and allele names as vector names needs to be combined to a list. The last list object is a vector of sample sizes for each locus.

Details

The function internally calls any procedure of randomization and offspring generation. Finally, it coordinates the preparation of multinomial logistic regression for threshold calculation.

Value

relate.return[[1]]

Object - matrix of mean pairwise relatedness of all loci of each comparison in tab.pop.

relate.return[[2]]

Object - matrix of mean pairwise relatedness of each randomized comparison of full siblings.

Random.Fullsib.relatedness.overall.txt

file - matrix of mean pairwise relatedness of each randomized comparison of full siblings.

relate.return[[3]]

Object - matrix of mean pairwise relatedness of each randomized comparison of half siblings.

Random.Halfsib.relatedness.overall.txt

file - matrix of mean pairwise relatedness of each randomized comparison of half siblings.

relate.return[[4]]

Object - matrix of mean pairwise relatedness of each randomized comparison of non relatives.

Random.NonRelated.relatedness.overall.txt

file - matrix of mean pairwise relatedness of each randomized comparison of non relatives.

relate.return[[5]]

Object - calculated thresholds for relatedness from reference populations.

Author(s)

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

References

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.

See Also

Emp.calc offspring glm.prep

Examples

1
2
3
     ## internal function not intended for usage without Demerelate
     
     

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