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

R语言 snpStats包 SnpMatrix-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-26 14:48:45 | 显示全部楼层 |阅读模式
SnpMatrix-class(snpStats)
SnpMatrix-class()所属R语言包:snpStats

                                        Class "SnpMatrix"
                                         类“SnpMatrix”

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

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

This class defines objects holding large arrays of single nucleotide polymorphism (SNP) genotypes generated using array
这个类定义了对象,举办大型阵列的单核苷酸多态性(SNP)的基因型使用数组生成


类的对象----------Objects from the Class----------

Objects can be created by calls of the form new("SnpMatrix", x) where x is a matrix with storage mode "raw". Chips (usually corresponding to samples or subjects) define rows of the matrix while polymorphisms (loci) define columns. Rows and columns will usually have names which can be used to link the data to further data concerning samples and SNPs
可以通过检测的形式创建对象new("SnpMatrix", x)其中x是一个矩阵存储模式"raw"。芯片(通常对应于样品或科目)定义矩阵的行,而多态性(基因座)定义列。通常有行和列名,可以用来连接数据有关样品和SNPs的进一步数据


插槽----------Slots----------




.Data: Object of class "matrix" and storage mode raw   Internally, missing data are coded 0 and SNP genotypes are coded 1, 2 or 3. Imputed values may not be known exactly. Such uncertain calls are grouped by probability and represented by codes
.Data:Object类的"matrix"和存储模式raw内部,丢失的数据编码0和编码SNP的基因型1,2或3。估算值可能不知道究竟。这种不确定的呼叫分组概率和代码代表


延伸----------Extends----------

Class "matrix", from data part. Class "structure", by class "matrix". Class "array", by class "matrix". Class "vector", by class "matrix", with explicit coerce. Class "vector", by class "matrix", with explicit coerce.
类"matrix",从数据的一部分。类"structure"类"matrix"。类"array"类"matrix"。 "vector"类,类“矩阵”,明确要挟。 "vector"类,类“矩阵”,明确要挟。


方法----------Methods----------




[] signature(x = "SnpMatrix", i = "ANY", j = "ANY",         drop = "missing"): subset
[]signature(x = "SnpMatrix", i = "ANY", j = "ANY",         drop = "missing"):子集




cbind2 signature(x = "SnpMatrix", y = "SnpMatrix"): S4 generic function to provide cbind() for two or more matrices together by column. Row names must match and column names must not coincide. If the matrices are of the derived class XSnpMatrix-class, the diploid slot values must also
cbind2signature(x = "SnpMatrix", y = "SnpMatrix"):中S4中的通用功能提供两个或两个以上的矩阵cbind()列在一起。行名称必须匹配列名必须一致。如果派生类矩阵XSnpMatrix-class,diploid槽值也必须




coerce signature(from = "SnpMatrix", to = "numeric"): map to numeric values 0, 1, 2 or, for uncertain assignments, to
映射到数值要挟signature(from = "SnpMatrix", to = "numeric"):0,1,2,不确定的任务,




coerce signature(from = "SnpMatrix", to =
要挟的<code>签名(=“SnpMatrix”,以=




coerce signature(from = "matrix", to = "SnpMatrix"):
强制signature(from = "matrix", to = "SnpMatrix"):




coerce signature(from = "SnpMatrix", to =         "XSnpMatrix"): maps a SnpMatrix to an XSnpMatrix. Ploidy is inferred from the genotype data since haploid genotypes should always be coded as homozygous.   After inferring ploidy, heterozygous calls for haploid genotypes
强制signature(from = "SnpMatrix", to =         "XSnpMatrix"):映射到XSnpMatrix SnpMatrix,。套数是从基因型数据推断,因为单倍体基因型应始终编码为纯合子。推断倍体,单倍体基因型的杂合检测后




is.na signature(x = "SnpMatrix"): returns a logical
is.nasignature(x = "SnpMatrix"):返回一个逻辑




rbind2 signature(x = "SnpMatrix", y = "snp.matrix"): S4 generic function to provide rbind() for two or more matrices by row. Column names must match and duplicated row
rbind2signature(x = "SnpMatrix", y = "snp.matrix"):中S4中通用的功能,提供两个或两个以上的矩阵行rbind()。列名必须匹配和重复的行




show signature(object = "SnpMatrix"): shows the size
显示signature(object = "SnpMatrix"):显示大小




summary signature(object = "SnpMatrix"): returns summaries of the data frames returned by
摘要signature(object = "SnpMatrix"):返回数据框返回摘要




is.na signature(x = "SnpMatrix"): returns a logical
is.nasignature(x = "SnpMatrix"):返回一个逻辑




switch.alleles signature(x = "SnpMatrix", snps         ="ANY"): Recode specified columns of of the matrix to reflect
switch.allelessignature(x = "SnpMatrix", snps         ="ANY"):重新编码指定列的矩阵,以反映


注意----------Note----------

This class requires at least version 2.3 of R
这个类至少需要2.3版本的R


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


David Clayton <a href="mailto:david.clayton@cimr.cam.ac.uk">david.clayton@cimr.cam.ac.uk</a>



参考文献----------References----------

<h3>See Also</h3>  <code>XSnpMatrix-class</code>

举例----------Examples----------


data(testdata)
summary(Autosomes)

# Just making it up - 3-10 will be made into NA during conversion[只是 -  3-10将在转换成Na]
snps.class<-new("SnpMatrix", matrix(1:10))
snps.class
if(!isS4(snps.class)) stop("constructor is not working")

pretend.X <- as(Autosomes, 'XSnpMatrix')
if(!isS4(pretend.X)) stop("coersion to derived class is not S4")
if(class(pretend.X) != 'XSnpMatrix') stop("coersion to derived class is not working")

pretend.A <- as(Xchromosome, 'SnpMatrix')
if(!isS4(pretend.A)) stop("coersion to base class is not S4")
if(class(pretend.A) != 'SnpMatrix') stop("coersion to base class is not working")

# display the first 10 snps of the first 10 samples[显示的第10个样品的前10个SNPs]
print(as(Autosomes[1:10,1:10], 'character'))

# convert the empty strings (no-calls) explicitly to "NC" before[“数控”之前明确转换为空字符串(不要求)]
# writing to an (anonymous and temporary) csv file[写入csv文件(匿名和临时)]
csvfile <- tempfile()
write.csv(file=csvfile, gsub ('^$', 'NC',
                              as(Autosomes[1:10,1:10], 'character')
                             ), quote=FALSE)
unlink(csvfile)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 15:13 , Processed in 0.032611 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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