Learn R Programming

Demerelate (version 0.8-1)

Loci.test: Analysis on differences in mean relatedness based on number of loci used for calculations

Description

Random samples are drawn from populations specified in tab.pop. Pairwise relatedness is calculated by either rxy, Mxy or Bxy. Pairwise relatedness is calculated for different number of loci beginning with only one up to the maximum number of loci in the dataset. Reference populations can be set for the calculations if ref.pop="NA". tab.pop is used as an estimate of overall allele frequencies. Distance between pairwise relatedness estimates are calculated using dist() with euclidean calculation. Graphically, a .pdf file is exported and the object Random.loci.differences contains each pairwise difference for usage in further statistics.

Usage

Loci.test(tab.pop, ref.pop = "NA", object = FALSE,
               value = "rxy", bt = 1000, 
               file.output = FALSE)

Arguments

tab.pop
Specific dataframe of type inputformat. All populations which should be analyzed.
ref.pop
Specific dataframe of type inputformat. Population information which should be used as a reference for either threshold or allele frequency calculation.
object
logical - is tab.pop object.
value
String defining method to calculate allele sharing or similarity estimates. Can be set as "rxy", "Bxy" or "Mxy".
bt
Number of bootstrap replicates.
file.output
logical - should a .pdf file be sent as standard output in your working directory.

Value

  • Loci.test.Sys.Date().pdfPlot of linear regression of used loci and calculated mean estimate of relatedness from each bootstrapped replicate defined by bt.
  • Random.loci.differencesList of differences in relatedness derived from bootstrap replicates. The x'th list element contains a matrix of means from replicates each over x random loci.

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. Maechler, M. and many others. (2012) Utilities from Seminar fuer Statistik ETH Zurich. R package version 1.0-20.

See Also

inputformat allele.sharing

Examples

Run this code
## Loci.test to analyse Loci distribution in example data
     ## Bxy, rxy and Mxy are possible as estimators.

     data(demerelpop)
     demerelpop.sp <- split(demerelpop,demerelpop[,2])
     
     Loci.results <- Loci.test(demerelpop.sp[[1]][,1:8], 
                     ref.pop = "NA", object = TRUE,
                     value = "rxy", bt = 10)

Run the code above in your browser using DataLab