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

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

[复制链接]
发表于 2012-9-29 23:05:13 | 显示全部楼层 |阅读模式
snp2bin(scrime)
snp2bin()所属R语言包:scrime

                                        Transformation of SNPs to Binary Variables
                                         为二进制变量变换的单核苷酸多态性

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Transforms SNPs to binary variables.
变换的SNPs二元变量。


用法----------Usage----------


snp2bin(mat, domrec = TRUE, refAA = FALSE, snp.in.col = TRUE,
   monomorph = 0)



参数----------Arguments----------

参数:mat
a matrix or data frame in which the genotypes of all SNPs are coded either by 0, 1 and 2, or by 1, 2 and 3, or by "AA", "AB" and "BB". Missing values are allowed. In the latter coding not only NA, but also "NN" is allowed for specifying missing values. Using the former two codings it is assumed that the smallest value codes the homozygous reference genotype, the second value the heterozygous genotype, and the largest value the homozygous variant genotype. For the third coding, see refAA.
矩阵或数据框中的所有SNP的基因型进行编码0,1和2,或1,2和3或"AA","AB"和"BB"。遗漏值是允许的。后者编码不仅NA,但也"NN"允许指定缺失值。使用前两个编码中假定的最小的值代码纯合子的基因型,杂合子的基因型的第二值,和最大的值的纯合子的基因型。对于第三个编码,请参阅refAA。


参数:domrec
should each SNP be coded by two dummy variables from which one codes for a recessive, and the other for a dominant effect? If TRUE, then the first binary variable is set to 1 if the SNP is of the heterozygous or the homozygous variant genotype, and the second dummy variable is set to 1 if the SNP is of the homozygous variant genotype. If FALSE, three dummy variables are used and each of the three genotypes of a SNP is coded by one of these binary variables.
每个SNP应该编码的两个伪变量,从其中的代码一个隐性,和其他的显性效应?如果TRUE,然后的第一二进制变量被设置为1,如果是杂合子或纯合子的基因型的SNP,和第二伪变量被设置为1,如果是纯合子的基因型的SNP。如果FALSE,三个虚拟变量用于每个被编码的三种基因型的SNP由这些二进制变量之一。


参数:refAA
codes "AA" always for the homozygous reference gentoype? Only considered if the SNPs are coded by "AA", "AB" and "BB". If FALSE, it is evaluated SNPwise whether "AA" or "BB" occurs more often, and the more frequently occuring value is assumed to be the homozygous reference genotype.
代码"AA"总是为的纯合子参考gentoype?如果只考虑单核苷酸多态性进行编码"AA","AB"和"BB"。如果FALSE,它被评为SNPwise是否"AA"或"BB"发生更频繁,更频繁地发生的价值被假定为纯合子的基因型是。


参数:snp.in.col
does each column of mat correspond to a SNP (and each row to an observation)? If FALSE, it is assumed that each row represents a SNP, and each column an observation.
不mat的每一列对应于一个单核苷酸多态性(和每一行的观察)?如果FALSE,它假定每一行代表一个SNP,每列的观察。


参数:monomorph
a non-negative number. If a dummy variable contains monomorph or less values that differ from the more frequent value of this variable, then the variable is removed from the data set.
一个非负的数。如果一个虚拟变量包含monomorph或更小更频繁的这个变量的值不同的值,则该变量被删除的数据集。


值----------Value----------

A matrix containing the binary dummy variables.
包含的二元虚拟变量的矩阵。


(作者)----------Author(s)----------


Holger Schwender, <a href="mailto:holger.schwender@udo.edu">holger.schwender@udo.edu</a>



参见----------See Also----------

recodeSNPs, recodeAffySNP
recodeSNPs,recodeAffySNP


实例----------Examples----------


# Generate an example data set consisting of 10 rows (observations)[生成的示例数据集由10行(观察)]
# and 5 columns (SNPs).[5列(单核苷酸多态性)。]

mat <- matrix(sample(3, 50, TRUE), 10)
colnames(mat) <- paste("SNP", 1:5, sep = "")

# Transform each SNP into two dummy variables, one that codes for[变换到两个虚拟变量,每个SNP代码]
# a recessive effect and one that codes for a dominant effect.[一个的隐性效应和主导作用的一个代码。]

snp2bin(mat)

# Transform each SNP into three dummy variables, where each of[变换每个SNP分为三个虚拟变量,其中每个]
# these variables codes for one of the three genotypes.[这些变量的代码的一个三种基因型。]

snp2bin(mat, domrec = FALSE)


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 00:28 , Processed in 0.023667 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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