recodeAffySNP(scrime)
recodeAffySNP()所属R语言包:scrime
Recoding of Affymetrix SNP Values
Affymetrix公司的SNP值记录
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Recodes the values used on Affymetrix SNP chips to code the genotypes to other values – required, e.g., by other functions of this package.
重新编码的值上使用Affymetrix公司的SNP芯片进行编码的基因型为其他值 - 需要的,比如,这个包等功能。
用法----------Usage----------
recodeAffySNP(mat, refAA = FALSE, geno = 1:3)
参数----------Arguments----------
参数:mat
a matrix or data frame consisting of the character strings "AA", "AB", "BB". Missing values can be coded by either "NN" or NA. Each row is assumed to correspond to a variable, and each column to a microarray.
矩阵或数据框组成的字符串"AA","AB","BB"。遗漏值可以被编码的是"NN"或NA。每一行被假定为对应于一个变量,和微阵列的每一列。
参数:refAA
codes "AA" always for the homozygous reference genotype? If TRUE, "AA" is always replaced by geno[1], and "BB" by geno[3]. If FALSE, it is evaluated rowwise whether "AA" or "BB" occurs more often, and the more frequently occuring value is set to geno[1].
代码"AA"总是参考基因型纯合?如果TRUE,"AA" geno[1],"BB"geno[3]经常更换。如果FALSE,它被评为rowwise是否"AA"或"BB"发生次数多了,更频繁发生的值设置为geno[1]。
参数:geno
a numeric or character vector of length 3 giving the three values that should be used to recode the genotypes. By default, geno = 1:3 which is the coding, e.g., required by rowChisqStats or pamCat.
一个数字或字符的矢量的长度为3,给出了三个值应该被用于重新编码的基因型。默认情况下,geno = 1:3这是编码,例如,rowChisqStats或pamCat。
值----------Value----------
A matrix of the same size as mat containing the recoded genotypes. (Missing values are coded by NA.)
mat包含在重新编码的基因型相同的大小的矩阵。 (遗漏值编码的NA)。
参见----------See Also----------
recodeSNPs, snp2bin
recodeSNPs,snp2bin
实例----------Examples----------
# Generate a sample data set consisting of 10 rows and 12 columns,[生成一个样本由10行和12列组成的数据集,]
# and randomly replace 5 of the values by "NN".[随机更换5的值由“NN”。]
mat <- matrix("", 10, 12)
mat[1:5,] <- sample(c("AA", "AB", "BB"), 60, TRUE,
prob = c(0.49, 0.42, 0.09))
mat[6:10,] <- sample(c("AA", "AB", "BB"), 60, TRUE,
prob = c(0.09, 0.42, 0.49))
mat[sample(120, 5)] <- "NN"
mat
# Recode the SNPs.[重新编码的单核苷酸多态性。]
recodeAffySNP(mat)
# Recode the SNPs assuming that "A" is always the major allele.[重新编码的单核苷酸多态性,“A”始终是主要的等位基因。]
recodeAffySNP(mat, refAA = TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|