找回密码
 注册
查看: 449|回复: 0

R语言 GeneticsPed包 hwp()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 19:07:17 | 显示全部楼层 |阅读模式
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:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-23 12:14 , Processed in 0.022025 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表