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

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

[复制链接]
发表于 2012-9-30 11:09:54 | 显示全部楼层 |阅读模式
snp(SNPassoc)
snp()所属R语言包:SNPassoc

                                        SNP object
                                         SNP对象

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

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

snp creates an snp object
snp创建一个SNP对象

is returns TRUE if x is of class 'snp'
is返回TRUE如果x类“单核苷酸多态性”

as attempts to coerce its argument into an object of class 'snp'
as试图强迫它的参数的对象类的SNP

reorder change the reference genotype
reorder改变参考基因型

summary gives a summary for an object of class 'snp' including genotype and allele frequencies and an exact thest of Hardy-Weinberg  equilibrium
summary进行了总结为一个对象类的SNP的基因型和等位基因频率与Hardy-Weinberg平衡的一个的确切thest的

plot    gives a summary for an object of class 'snp' including genotype and allele frequencies and an exact thest of Hardy-Weinberg  equilibrium in a plot. Barplot or pie are allowed
plot给出了一个概要对象类的SNP的基因型和等位基因频率与Hardy-Weinberg平衡的图一个的确切thest的。允许Barplot或饼图

[.snp   is a copy of [.factor modified to preserve all attributes
[.snp[副本。因子基因修饰的保留所有属性


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



  snp(x, sep = "/", name.genotypes, reorder="common",
    remove.spaces = TRUE, allow.partial.missing = FALSE)

  is.snp(x)

  as.snp(x, ...)

  ## S3 method for class 'snp'
additive(o)




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

参数:x
either an object of class 'snp' or an object to be converted to class 'snp'
要么是对象类“单核苷酸多态性”或要转换的对象类的SNP“


参数:sep
character separator used to divide alleles when x is a vector of strings where  each string holds both alleles. The default is "/". See below for details.
字符分隔符用来划分等位基因x是一个向量的字符串,每个字符串拥有两个等位基因。默认值是“/”。有关详细信息,请参见下文。


参数:name.genotypes
the codes for the genotypes. This argument may be useful when genotypes  are coded using three different codes (e.g., 0,1,2 or hom1, het, hom2)
基因型的代码。这种说法可能是有用的,当基因型编码使用三种不同的代码(例如,0,1,2或hom1,HET,HOM2)


参数:reorder
how should genotypes within an individual be reordered. Possible values are 'common' or 'minor'. The default is  reorder="common". In that case, alleles are sorted within each individual by common homozygous.
在一个人的基因型应该如何重新排序。可能的值是共同或小。默认的reorder="common"。在这种情况下,在每个单独的等位基因排序以共同的纯合子。


参数:remove.spaces
logical indicating whether spaces and tabs will be removed from the genotypes before processing
逻辑表示是否将被删除空格和制表符前处理的基因型


参数:allow.partial.missing
logical indicating whether one allele is permitted to be missing.  When set to 'FALSE' both alleles are set to 'NA' when either is missing.
逻辑一个等位基因是否允许丢失。当设置为“false”时,要么是缺少两个等位基因被设置为“NA”。


参数:o
an object of class 'snp' to be coded as a linear covariate: 0,1,2
一个对象类“SNP”要被编码为一个线性的协变量:0,1,2


参数:...
optional arguments
可选参数


Details

详细信息----------Details----------

SNP objects hold information on which gene or marker alleles were observed for different individuals.  For each individual, two alleles are recorded.
SNP对象保存基因或标记基因,观察不同的个人信息。对于每个单独的,两个等位基因被记录下来。

The snp class considers the stored alleles to be unordered , i.e., "C/T" is equivalent to "T/C". It assumes that the order of the alleles is not important.
,“C / T等位基因的SNP类认为存储是无序的,即”相当于“T / C”。它假定的等位基因的顺序并不重要。

When snp is called, x is a character vector, and it is assumed that each element encodes both alleles. In this case, if sep is a character string, x is assumed to be coded as "Allele1<sep>Allele2".  If sep is a numeric value, it is assumed that character locations 1:sep contain allele 1 and that remaining locations contain allele 2.
当snp被称为,x是一个字符向量,并假定每个元素编码两个等位基因。在这种情况下,如果sep是一个字符串,x假定要被编码为“Allele1 2 Allele2”。如果sep是一个数值,它是假定字符的位置1:sep含有等位基因1和,其余位置包含等位基因2。

additive.snp recodes the SNPs for being analyzed as a linear covariate (codes 0,1,2)
additive.snp重新编码的单核苷酸多态性分析的线性协(代码0,1,2)


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

The snp class extends "factor" where the levels is a character vector of possible  genotype values stored coded by paste( allele1, "", allele2, sep="/")
单核苷酸多态性类“因子”延伸的水平是可能的基因型字符向量中存储的值编码的paste( allele1, "", allele2, sep="/")


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

JR Gonzalez, L Armengol, X Sole, E Guino, JM Mercader, X Estivill, V Moreno. SNPassoc: an R package to perform whole genome association studies. Bioinformatics, 2007;23(5):654-5.

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

association  
association


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


# some examples of snp data in different formats[SNP数据以不同的格式的一些例子]

dat1  <- c("21", "21", "11", "22", "21",
                    "22", "22", "11", "11", NA)
ans1  <- snp(dat1,sep="")
ans1

dat2 <- c("A/A","A/G","G/G","A/G","G/G",
                    "A/A","A/A","G/G",NA)
ans2  <- snp(dat2,sep="/")
ans2

dat3 <- c("C-C","C-T","C-C","T-T","C-C",
                    "C-C","C-C","C-C","T-T",NA)
ans3 <- snp(dat3,sep="-")
ans3


dat4 <- c("het","het","het","hom1","hom2",
                    "het","het","hom1","hom1",NA)
ans4 <- snp(dat4,name.genotypes=c("hom1","het","hom2"))
ans4


# summary [总结]
summary(ans3)

# plots[图]

plot(ans3)
plot(ans3,type=pie)
plot(ans3,type=pie,label="SNP 10045")


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-8 10:29 , Processed in 0.022645 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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