Learn R Programming

GeneticSubsetter (version 0.8)

MTK: MTK calculator

Description

This function calculates the Mean of Transformed Kinships (MTK) of a set of genotypes.

Usage

MTK(genos, subset, mat = NULL, power = 10)

Arguments

genos
A matrix of genotypes, where each column is one individual, each row is one marker, and marker values are 1, 0, or -1, or NA, where 0 represents a heterozygous marker, and NA represents missing data. Note that this coding is different from the earlier MtkCalc, which cannot handle heterozygous markers. All data in this matrix must be numeric.
subset
A vector of genotype names for which to calculate MTK.
mat
A kinship matrix, if one has already been computed for the population.
power
The transformation that should be made to the kinship matrix, if the MTK criterion is used. If power=1, the kinship matrix is not transformed, if power=2, the kinship matrix is squared, etc. When the power is higher, this function preferentially eliminates genotypes that are closely related to other genotypes in the population.

Value

The MTK of the specified subset.

Examples

Run this code
data(genotypes)
MTK(genotypes,subset=colnames(genotypes[1:5]))

Run the code above in your browser using DataLab