snpgdsIndInbCoef(SNPRelate)
snpgdsIndInbCoef()所属R语言包:SNPRelate
Individual Inbreeding Coefficient
个人近交系数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
To calculate an individual inbreeding coefficient using SNP genotype data
利用SNP基因型数据计算个人的近亲繁殖系数
用法----------Usage----------
snpgdsIndInbCoef(x, p, method = c("mom.weir", "mom.visscher", "mle"),
reltol=.Machine$double.eps^0.75)
参数----------Arguments----------
参数:x
SNP genotypes
SNP基因型
参数:p
allele frequencies
等位基因频率
参数:method
see details
详情请参阅
参数:reltol
relative convergence tolerance used in MLE; the algorithm stops if it is unable to reduce the value of log likelihood by a factor of $reltol * (abs(log likelihood with the initial parameters) + reltol)$ at a step.
相对收敛公差MLE算法停止,如果它是无法对数似然值减少的一个因素$ RELTOL *(ABS(对数似然的初始参数)+ RELTOL)在步骤。
Details
详细信息----------Details----------
The method can be: "mom.weir": a modified Visscher's estimator, proposed by Bruce Weir; "mom.visscher": Visscher's estimator described in Yang et al. (2010); "mle": the maximum likelihood estimation.
method可以是:“mom.weir”:修改后的比塞彻的估计,提出由布鲁斯·威尔个“mom.visscher”:比塞彻的估计杨等。 (2010年),“最大似然估计:最大似然估计。
值----------Value----------
Return estimated inbreeding coefficient.
返回估计近交系数。
(作者)----------Author(s)----------
Xiuwen Zheng <a href="mailto:zhengx@u.washington.edu">zhengx@u.washington.edu</a>
参考文献----------References----------
Martin NG, Montgomery GW, Goddard ME, Visscher PM. 2010. Common SNPs explain a large proportion of the heritability for human height. Nat Genet. 42(7):565-9. Epub 2010 Jun 20.
实例----------Examples----------
# open an example dataset (HapMap)[打开示例数据集(人类基因组单体型图)]
genofile <- openfn.gds(snpgdsExampleFileName())
chr1 <- read.gdsn(index.gdsn(genofile, "snp.id"))[
read.gdsn(index.gdsn(genofile, "snp.chromosome"))==1]
chr1idx <- match(chr1, read.gdsn(index.gdsn(genofile, "snp.id")))
AF <- snpgdsSNPRateFreq(genofile)
g <- read.gdsn(index.gdsn(genofile, "genotype"), start=c(1,1), count=c(-1,1))
snpgdsIndInbCoef(g[chr1idx], AF$AlleleFreq[chr1idx], method="mom.weir")
snpgdsIndInbCoef(g[chr1idx], AF$AlleleFreq[chr1idx], method="mom.visscher")
snpgdsIndInbCoef(g[chr1idx], AF$AlleleFreq[chr1idx], method="mle")
# close the genotype file[关闭基因型文件]
closefn.gds(genofile)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|