View source: R/rdm_IBD_v8_TF.R
rdm_IBD | R Documentation |
rdm_IBD
: Reads genotype data for individuals in a population together with the geographic
coordinates of the individuals, models overall IBD trend for the population, and then calculates IBD residuals for each pair of individuals.
rdm_IBD(Gen_raw, Geo_raw, Dist_method = 1, IBD_method = 1)
Gen_raw |
A string specifying the path to a file of genotype data in GENEPOP format, with alleles specified using three digits. The GENEPOP file must have the extension .gen. |
Geo_raw |
A string specifying the path to a text file showing the name (1st column) and geographical x and y coordinates (2nd and 3rd columns) of each individual (each row). The first row needs to specify the column headings, and all entries need to be tab-delimited. |
Dist_method |
An integer from 1 to 6 specifying the method used to calculate genetic distance among individuals.
Integers 1 to 6 correspond to the methods incorporated into the following six functions from the
|
IBD_method |
An integer specifying the method used to calculate the IBD residual for each pair of individuals.
A value of 1 means that the residuals are calculated by fitting a straight line to all pairs of genetic and
geographic distances, and measuring the vertical distance from each pair to the fitted line. The fitted straight line
represents the combinations of genetic and geographic distances that are expected from IBD. A value of 2 means
that a non-linear curve of the form y = a + b*(1-exp(-exp(c)*x)) is fitted instead of a straight
line, where a, b and c are the fitted parameters. The default value is 1. The function
|
An object of class dist
, containing a matrix showing the IBD residuals for pairs of individuals.
rdm_IBD("files/genotypes.gen", "files/coordinates.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.