hwp(GeneticsPed)
hwp()所属R语言包:GeneticsPed
Utility functions for gpi()
实用GPI功能()
译者:生物统计家园网 机器人LoveR
描述----------Description----------
gpLong2Wide changes data.frame with genotype probabilities in long form (one genotype per row) to wide form (one individual per row) for use in gpi.
gpLong2Wide变化数据框(每行基因型)与长形式的基因型概率广泛的形式使用gpi(每行个人)。
hwp calculates genotype probabilities according to Hardy-Weinberg law for use in gpi.
hwp计算基因型的概率,根据Hardy-Weinberg平衡,在gpi使用的法律。
用法----------Usage----------
gpLong2Wide(x, id, genotype, prob, trim=TRUE)
hwp(x, trim=TRUE)
参数----------Arguments----------
参数:x
data.frame for gpLong2Wide, genotype for hwp
数据框gpLong2Wide,genotypehwp
参数:id
character, column name in x holding individual identifications
字符,x持有的个人鉴定的列名
参数:genotype
character, column name in x holding genotypes
字符,x控股基因型的列名
参数:prob
character, column name in x holding genotype probabilities
字符,x控股基因型概率的列名
参数:trim
logical, remove last column (for gpLong2Wide) or value (for hwp) of a result
逻辑,删除最后一列(gpLong2Wide)或值(hwp)结果
Details
详情----------Details----------
Hardy-Weinberg probabilities for a gene with two alleles A and B, with probabilities Pr(A) and Pr(B) are:
Hardy-Weinberg平衡与两个等位基因A和B基因的概率,概率Pr(A)和Pr(B)是:
值----------Value----------
gpLong2Wide returns a matrix with number of rows equal to number of individuals and number of columns equal to number of possible genotypes.
gpLong2Wide与个人和可能的基因型数等于列数等于行数返回一个矩阵。
hwp returns a vector with Hardy-Weinberg genotype probabilities.
hwp返回一个符合Hardy-Weinberg基因型概率的向量。
作者(S)----------Author(s)----------
Gregor Gorjanc
参见----------See Also----------
gpi, genotype, expectedGenotypes
gpi,genotype,expectedGenotypes
举例----------Examples----------
if(require(genetics)) {
gen <- genotype(c("A/A", "A/B"))
hwp(x=gen)
hwp(x=gen, trim=FALSE)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|