snpgdsLDMat(SNPRelate)
snpgdsLDMat()所属R语言包:SNPRelate
Linkage Disequilibrium (LD) analysis
连锁不平衡(LD)分析
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Return a LD matrix for SNP pairs.
返回LD基体SNP对。
用法----------Usage----------
snpgdsLDMat(gdsobj, sample.id = NULL, snp.id = NULL,
method = c("composite", "r", "dprime", "corr"), num.thread = 1, verbose = TRUE)
参数----------Arguments----------
参数:gdsobj
the gdsclass object in the gdsfmt package
gdsclass对象在gdsfmt包
参数:sample.id
a vector of sample id specifying selected samples; if NULL, all samples are used
一个向量的样品ID指定选取的样本,如果为NULL,所有样本都
参数:snp.id
a vector of snp id specifying selected SNPs; if NULL, all SNPs are used
一个向量指定选定的单核苷酸多态性SNP ID,如果为NULL,所有的SNP
参数:method
"composite", "r", "dprime", "corr", see details
“复合”,“R”,“dprime”,“校正”,查看详情
参数:num.thread
the number of CPU cores used
CPU核心的数量
参数:verbose
if TRUE, show information
如果为TRUE,显示信息
Details
详细信息----------Details----------
Four methods can be used to calculate linkage disequilibrium values: "composite" for LD composite measure, "r" for r square, "dprime" for D', and "corr" for correlation coefficient. The method "corr" is equivalent to "composite", when SNP genotypes are coded as: 0 – BB, 1 – AB, 2 – AA.
有四种方法可以用来计算连锁不平衡值:“复合”LD综合衡量,R平方为“R”,“Ddprime”,和“校正”的相关系数。 “校正”的方法是相当于“复合”,SNP基因型时,被编码为:0 - AB,BB,1 - 2 - AA。
值----------Value----------
Return a list:
返回一个列表:
参数:sample.id
the sample ids used in the analysis
在分析中使用的样品的id
参数:snp.id
the SNP ids used in the analysis
在分析中使用的SNP ID的
参数:LD
a matrix of LD values
LD值的矩阵
(作者)----------Author(s)----------
Xiuwen Zheng <a href="mailto:zhengx@u.washington.edu">zhengx@u.washington.edu</a>
参考文献----------References----------
in Feldman MW (ed): Mathematical Evolutionary Theory. Princeton, NJ: Princeton University Press, 1989.
参见----------See Also----------
snpgdsLDpair, snpgdsLDpruning
snpgdsLDpair,snpgdsLDpruning
实例----------Examples----------
# open an example dataset (HapMap)[打开示例数据集(人类基因组单体型图)]
genofile <- openfn.gds(snpgdsExampleFileName())
snpset <- read.gdsn(index.gdsn(genofile, "snp.id"))[1:200]
L1 <- snpgdsLDMat(genofile, snp.id=snpset, method="composite")
L2 <- snpgdsLDMat(genofile, snp.id=snpset, method="r")
L3 <- snpgdsLDMat(genofile, snp.id=snpset, method="dprime")
L4 <- snpgdsLDMat(genofile, snp.id=snpset, method="corr")
# plot[图]
image(abs(L1$LD))
# close the genotype file[关闭基因型文件]
closefn.gds(genofile)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|