snpgdsIBDSelection(SNPRelate)
snpgdsIBDSelection()所属R语言包:SNPRelate
Get a table of IBD coefficients
IBD系数表
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Return a data frame with IBD coefficients.
返回数据框IBD系数。
用法----------Usage----------
snpgdsIBDSelection(ibdobj, kinship.cutoff=-1, samp.sel=NULL)
参数----------Arguments----------
参数:ibdobj
an object of snpgdsIBDClass returned by snpgdsIBDMLE or snpgdsIBDMoM
snpgdsIBDClass的对象snpgdsIBDMLE或snpgdsIBDMoM返回
参数:kinship.cutoff
select the individual pairs with kinship coefficients >= kinship.cutoff
选择个人对亲属关系系数> = kinship.cutoff
参数:samp.sel
a logical vector or integer vector to specify selection of samples
逻辑向量或整数向量指定选择的样本
值----------Value----------
Return a data.frame:
返回一个数据框:
参数:sample1
the id of the first sample
第一个样品的id
参数:sample2
the id of the second sample
第二个样本的id
参数:k0
the probability of sharing ZERO alleles
下分享ZERO等位基因的概率
参数:k1
the probability of sharing ONE alleles
共用一个等位基因的概率
参数:kinshipcoeff
kinship coefficient
亲属关系系数
(作者)----------Author(s)----------
Xiuwen Zheng <a href="mailto:zhengx@u.washington.edu">zhengx@u.washington.edu</a>
参见----------See Also----------
snpgdsIBDMLE, snpgdsIBDMoM
snpgdsIBDMLE,snpgdsIBDMoM
实例----------Examples----------
# open an example dataset (HapMap)[打开示例数据集(人类基因组单体型图)]
genofile <- openfn.gds(snpgdsExampleFileName())
# YRI population[YRI人口]
YRI.id <- read.gdsn(index.gdsn(genofile, "sample.id"))[
read.gdsn(index.gdsn(genofile, c("sample.annot", "pop.group")))=="YRI"]
pibd <- snpgdsIBDMoM(genofile, sample.id=YRI.id)
flag <- lower.tri(pibd$k0)
plot(NaN, xlim=c(0,1), ylim=c(0,1), xlab="k0", ylab="k1")
lines(c(0,1), c(1,0), col="red", lty=3)
points(pibd$k0[flag], pibd$k1[flag])
# close the genotype file[关闭基因型文件]
closefn.gds(genofile)
# IBD coefficient list[IBD系数列表]
dat <- snpgdsIBDSelection(pibd, 1/32)
# sample1 sample2 k0 k1 kinshipcoeff[范例1范例K0 K1 kinshipcoeff]
# 1 NA19152 NA19154 0.010796493 0.981324805 0.24927055[1 NA19152 NA19154 0.010796493 0.981324805 0.24927055]
# 2 NA19139 NA19138 0.000000000 1.000000000 0.25000000[2 NA19139 NA19138 0.000000000 1.000000000 0.25000000]
# 3 NA19139 NA19137 0.008646155 0.989673572 0.24825853[3 NA19139 NA19137 0.008646155 0.989673572 0.24825853]
# 4 NA18912 NA18914 0.006489406 0.993510594 0.24837765[4 NA18912 NA18914 0.006489406 0.993510594 0.24837765]
# 5 NA19160 NA19161 0.006033827 0.977803758 0.25253215[5 NA19160 NA19161 0.006033827 0.977803758 0.25253215]
# ......[......]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|