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

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

[复制链接]
发表于 2012-2-25 21:29:02 | 显示全部楼层 |阅读模式
simulateGenotypeMatrix(GWASTools)
simulateGenotypeMatrix()所属R语言包:GWASTools

                                         Simulate Genotype Matrix & Load into NetCDF File
                                         模拟基因型矩阵netCDF文件及负载

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

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

This function creates a netCDF file with dimensions 'snp' and 'sample' and variables 'sampleID', 'genotype', 'position' and 'chromosome'.  These variables hold simulated data as described below.   Mainly, this function is intended to be used in examples involving genotype matrices.
这个函数创建一个netCDF文件尺寸“SNP”和“样本”和变量sampleID“,”基因型“,”地位“和”染色体“。这些变量的数据模拟,如下所述。主要是,这个功能是拟在涉及基因型矩阵的例子。


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


simulateGenotypeMatrix(n.snps=10, n.chromosomes=10,
                       n.samples=1000, ncdf.filename,
                       silent=TRUE)



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

参数:n.snps
An integer corresponding to the number of SNPs per chromosome, the default value is 10.  For this function, the number of SNPs is assumed to be the same for every chromosome.  
一个整数,对应的SNPs每个染色体数目,默认值是10。此功能的SNPs数量被认为是为每一个染色体的相同。


参数:n.chromosomes
An integer value describing the total number of chromosomes with default value 10.  
一个整型值描述默认值10对染色体的总数。


参数:n.samples
An integer representing the number of samples for our data.  The default value is 1000 samples.  
一个整数,表示我们的数据样本的数量。默认值是1000个样本。


参数:ncdf.filename
A string that will be used as the name of the netCDF file.  This is to be used later when opening and retrieving data generated from this function.  
一个netCDF文件的名称将作为使用字符串。这是后来开放和检索从这个函数生成的数据时要使用。


参数:silent
Logical value.  If FALSE, the function returns a table of genotype counts generated.  The default is TRUE; no data will be returned in this case.   
逻辑值。如果FALSE,该函数返回一个表生成的基因型计数。默认的是TRUE;没有数据将在这种情况下返回。


Details

详情----------Details----------

The resulting netCDF file will have the following characteristics:
由此产生的netCDF文件将具有以下特点:

Dimensions:
尺寸:

'snp': n.snps*n.chromosomes length
“SNP”:n.snps * n.chromosomes长度

'sample': n.samples length
“样本”:n.samples长度

Variables:
变量:

'sampleID': sample dimension, values 1-n.samples
“sampleID”:样品尺寸,值1-n.samples

'position': snp dimension, values [1,2,...,n.chromosomes] n.snps times
“位置”:SNP维度,价值观[1,2,...,n.chromosomes] n.snps倍

'chromosome': snp dimension, values [1,1,...]n.snps times, [2,2,...]n.snps times, ..., [n.chromosomes,n.chromosomes,...]n.snps times
“染色体”:SNP尺寸,值[1,1,...] n.snps次,[2,2,...] n.snps倍,...,[n.chromosomes,n.chromosomes,。 ..] n.snps倍的

'genotype': 2-dimensional snp x sample, values 0, 1, 2 chosen from allele frequencies that were generated from a uniform distribution on (0,1).   The missing rate is 0.05 (constant across all SNPs) and is denoted by -1.
“基因型”:2维SNP x样品,值0,1,2,选择从等位基因频率(0,1)均匀分布产生。丢失率是0.05(在所有的SNPs常数),和记-1。


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

This function returns a table of genotype calls if the silent variable is set to FALSE, where 0 indicates an AA genotype, 1 is AB, 2 is BB and -1 corresponds to a missing genotype call.
这个函数返回一个基因型调用表如果沉默的变量设置为FALSE,其中0表示AA基因型,1是AB,2是BB和-1对应缺失基因型调用。

A netCDF file is created from this function and written to disk.  This file (and data) can be accessed later by using the command open.ncdf(ncdf.filename).
一个netCDF文件是由这个函数创建并写入磁盘。后来通过使用命令open.ncdf(ncdf.filename)可以访问此文件(和数据)。


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


Caitlin McHugh



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

ncdf, missingGenotypeBySnpSex, missingGenotypeByScanChrom, simulateIntensityMatrix
ncdf,missingGenotypeBySnpSex,missingGenotypeByScanChrom,simulateIntensityMatrix


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


filenm <- tempfile()

simulateGenotypeMatrix(ncdf.filename=filenm )

file <- NcdfGenotypeReader(filenm)
file #notice the dimensions and variables listed[注意上市的尺寸和变量]

genot <- getGenotype(file)
table(genot) #can see the number of missing calls[可以看到错过来电]

chrom <- getChromosome(file)
unique(chrom) #there are indeed 10 chromosomes, as specified in the function call[确实有10条染色体,在函数调用中指定]

close(file)
unlink(filenm)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-6 07:00 , Processed in 0.020621 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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