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

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

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

                                         Create a SNP genotype dataset from a GDS file
                                         从GDS文件中创建一个SNP基因型数据集

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

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

To create a GDS file of genotypes from a specified GDS file.
要创建一个GDS文件从指定的GDS文件的基因型。


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


snpgdsCreateGenoSet(src.fn, dest.fn, sample.id=NULL, snp.id=NULL,
        snpfirstorder=NULL, compress.annotation="ZIP.max", compress.geno="", verbose=TRUE)



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

参数:src.fn
the file name of a specified GDS file
指定的GDS的文件的文件名


参数:dest.fn
the file name of output GDS file
输出的GDS文件的文件名


参数:sample.id
a vector of sample id specifying selected samples; if NULL, all samples are used
一个向量的样品ID指定选取的样本,如果为NULL,所有样本都


参数:snp.id
a vector of snp id specifying selected SNPs; if NULL, all SNPs are used
一个向量指定选定的单核苷酸多态性SNP ID,如果为NULL,所有的SNP


参数: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


参数:verbose
if TRUE, show information
如果为TRUE,显示信息


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

None.
无。


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


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



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

snpgdsCreateGeno, snpgdsCombineGeno
snpgdsCreateGeno,snpgdsCombineGeno


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


# open an example dataset (HapMap)[打开示例数据集(人类基因组单体型图)]
(genofile <- openfn.gds(snpgdsExampleFileName()))
# +         [   ][+ []]
# |--+ sample.id        [ dFStr8 279 ZIP(23.10%) ][|  -  + sample.id dFStr8 279 ZIP(23.10%)]]
# |--+ snp.id        [ dInt32 45440 ZIP(34.60%) ][|  -  + snp.id dInt32 45440的ZIP(34.60%)]]
# |--+ snp.rs.id        [ dFStr8 45440 ZIP(41.05%) ][|  -  + snp.rs.id [dFStr8 45440的ZIP(41.05%)]]
# |--+ snp.position        [ dInt32 45440 ZIP(94.25%) ][|  -  + snp.position [dInt32 45440的ZIP(94.25%)]]
# |--+ snp.chromosome        [ dInt32 45440 ZIP(0.14%) ][|  -  + snp.chromosome的dInt32 45440 ZIP(0.14%)]]
# |--+ snp.allele        [ dFStr8 45440 ZIP(13.36%) ][|  -  + snp.allele [dFStr8 45440的ZIP(13.36%)]]
# |--+ genotype        [ dBit2 45440x279 ][|  -  +基因型[dBit2 45440x279]]
# |--+ sample.annot        [   ] *[|  -  + sample.annot [] *]
# |  |--+ sex        [ dFStr8 279 ZIP(28.32%) ] *[| |  -  +性别[dFStr8 279 ZIP(28.32%)] *]
# |  |--+ pop.group        [ dFStr8 279 ZIP(7.89%) ] *[|  -  + pop.group的[dFStr8 279 ZIP(7.89%)] *]

snpset <- unlist(snpgdsLDpruning(genofile))
length(snpset)
# 43518[43518]

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

snpgdsCreateGenoSet(snpgdsExampleFileName(), "test.gds", snp.id=snpset)

####################################################[################################################## #]
# check[查]

(gfile <- openfn.gds("test.gds"))
# +         [   ][+ []]
# |--+ sample.id        [ dFStr8 279 ZIP(23.10%) ][|  -  + sample.id dFStr8 279 ZIP(23.10%)]]
# |--+ snp.id        [ dInt32 43518 ZIP(34.61%) ][|  -  + snp.id dInt32 43518的ZIP(34.61%)]]
# |--+ snp.rs.id        [ dFStr8 43518 ZIP(41.09%) ][|  -  + snp.rs.id [dFStr8 43518的ZIP(41.09%)]]
# |--+ snp.position        [ dInt32 43518 ZIP(94.16%) ][|  -  + snp.position [dInt32 43518的ZIP(94.16%)]]
# |--+ snp.chromosome        [ dInt32 43518 ZIP(0.14%) ][|  -  + snp.chromosome的dInt32 43518 ZIP(0.14%)]]
# |--+ snp.allele        [ dFStr8 43518 ZIP(13.37%) ][|  -  + snp.allele [dFStr8 43518的ZIP(13.37%)]]
# |--+ genotype        [ dBit2 43518x279 ] *[|  -  +基因型[dBit2 43518x279]]

closefn.gds(gfile)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-8 13:25 , Processed in 0.041581 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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