Description Usage Arguments Details Value Author(s) References Examples
View source: R/codomToPropShared.R
Given a matrix with two adjacent columns for each locus (e.g. LOCUS1a, LOCUS1b, LOCUS2a, LOCUS2b, ...)
containing codominant alelles, where individual genotypes are in rows, find the proportion of shared alleles
(Bowcock et al., 1994) among individuals using functions in the adegenet
package.
This is a convenience function that wraps adegenet
routines.
Note that any type of genetic distance matrix can be used in MEMGENE, and the proportion of shared alleles metric is not a requirement.
1 | codomToPropShared(alleles, missingData = c(-98,-99))
|
alleles |
A matrix with two adjacent columns for each locus containing codominant alleles |
missingData |
A vector of any length giving the values in the alleles matrix representing missing data ( |
First prepares the alleles matrix into a format that can be converted using functions in the adegenet
package to the genind
format. propShared
is then run on this object.
Returns a genetic distance matrix using the proportion of shared alleles metric (Bowcock et al., 1994)
Pedro Peres-Neto (peres-neto.pedro@uqam.ca)
Paul Galpern (pgalpern@ucalgary.ca)
Bowcock AM, Ruizlinares A, Tomfohrde J, et al. 1994 High resolution of human evolutionary trees with polymorphic microsatellites. Nature, 368, 455-457.
1 2 3 | radialData <- read.csv(system.file("extdata/radial.csv", package="memgene"))
radialGen <- radialData[, -c(1,2)]
radialDM <- codomToPropShared(radialGen)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.