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

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

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

                                         Create a SNP genotype dataset from a matrix
                                         创建一个SNP基因型数据集从一个矩阵

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

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

To create a GDS file of genotypes from a matrix.
要创建一个矩阵的基因型GDS文件。


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


snpgdsCreateGeno(gds.fn, genmat, sample.id = NULL, snp.id = NULL, snp.rs.id = NULL,
        snp.chromosome = NULL, snp.position = NULL, snp.allele=NULL, snpfirstorder = TRUE,
        compress.annotation = "ZIP.max", compress.geno = "", other.vars = NULL)



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

参数:gds.fn
the file name of gds
的文件名,全球分销系统


参数:genmat
a matrix of genotypes
基因型的矩阵


参数:sample.id
the sample ids, which should be unique
样品ID,这应该是唯一的


参数:snp.id
the SNP ids, which should be unique
SNP ID,这应该是唯一的


参数:snp.rs.id
the rs ids for SNPs, which can be not unique
单核苷酸多态性的RS标识,它可以不是唯一的


参数:snp.chromosome
the chromosome indices
染色体指数


参数:snp.position
the SNP positions in basepair
中碱基对组成的SNP位


参数:snp.allele
the reference/non-reference alleles
参考/非参考等位基因


参数:snpfirstorder
if TRUE, genotypes are stored in the individual-major mode, (i.e, list all SNPs for the first individual, and then list all SNPs for the second individual, etc)
如果为TRUE,个别主要的模式,(即,列表全部的SNPs的第一个体中,和然后列出所有的单核苷酸多态性的第二单个等被存储在基因型)


参数:compress.annotation
the compression method for the variables except genotype
的压缩方法的变量除了genotype


参数:compress.geno
the compression method for the variable genotype
的压缩方法的变量genotype


参数:other.vars
a list object storing other variables
存储其他变量的一个列表对象


Details

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

There are possible values stored in the variable genmat: 0, 1, 2 and other values. “0” indicates two B alleles, “1” indicates one A allele and one B allele, “2” indicates two A alleles, and other values indicate a missing genotype.
有可能的值存储在变量genmat:0,1,2和其他值。 “0”表示两个B等位基因,“1”表示一个等位基因A和一个B等位基因,A等位基因,“2”表示,和其他的值表示缺少的基因型。

If snpfirstorder is TRUE, then genmat is “# of SNPs X # of samples”; if snpfirstorder is FALSE, then genmat is “# of samples X # of SNPs”.
如果snpfirstorder是TRUE,那么genmat是“#单核苷酸多态性X#样品”,如果snpfirstorder是FALSE,那么genmat “#样品的单核苷酸多态性”X#。

The typical variables specified in other.vars are “sample.annot” and “snp.annot”, which are data.frame objects.
典型的变量指定在other.vars是“sample.annot”和“snp.annot”,这是数据框对象。


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

None.
无。


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


Xiuwen Zheng <a href="mailto:zhengx@u.washington.edu">zhengx@u.washington.edu</a>



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

snpgdsCreateGenoSet, snpgdsCombineGeno
snpgdsCreateGenoSet,snpgdsCombineGeno


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


# load data[加载数据]
data(hapmap.geno)

# create a gds file[创建一个GDS文件]
with(hapmap.geno, snpgdsCreateGeno("test.gds", genmat=genotype,
        sample.id=sample.id, snp.id=snp.id, snp.chromosome=snp.chromosome,
        snp.position=snp.position, snp.allele=snp.allele, snpfirstorder=TRUE))

# open the gds file[打开GDS文件]
genofile <- openfn.gds("test.gds")

RV <- snpgdsPCA(genofile)
plot(RV$eigenvect[,2], RV$eigenvect[,1], xlab="PC 2", ylab="PC 1")

# close the genotype file[关闭基因型文件]
closefn.gds(genofile)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-7 21:34 , Processed in 0.038280 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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