sim_rel: Simulate relatedness values

Description Usage Arguments Details References

Description

This function takes as input a GENIND object, and simulates reps dyads related according to the specifications in the the k_vector. It outputs a data.frame with relatedness values for each simulated dyad for each of the indices described in the estimate_rel function. A vector of allele frequencies can be optionally supplied. If none is supplied, allele frequencies are estimated from the data.

Usage

1
sim_rel(data, reps, k_vector = c(1, 0, 0), allele_frq = NULL)

Arguments

data

An object of class GENIND containing genotypes for a single population.

reps

The number of dyads to simulate.

k_vector

A vector of three numbers that must add to 1.0 that gives the expected proportion of loci that are under one of the three possible IBD modes for non-inbred populations (see Details).

allele_frq

A vector of size n alleles (total number of alleles across all loci), containing the frequency of each allele in the population. Should be ordered as in the tab slot of the GENIND object. This parameter is optional (see Details).

Details

The goal of this function is to take population allele frequency data and calculate relatedness values calculated from simulated pairs of individuals (dyads) that have any given relatedness level (assuming an outbred population). The distribution of relatedness values can then be used to help classify observed pairs of sampled individuals into relatedness categories (e.g., Blouin et al. 1996).

References

Blouin M, Parsons M, Lacaille V, Lotz S (1996) Use of microsatellite loci to classify individuals by relatedness. Molecular Ecology, 5, 393-401.

Wang JL (2011) Unbiased relatedness estimation in structured populations. Genetics, 187, 887-901.


andersgs/irelr documentation built on May 12, 2019, 2:41 a.m.