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

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

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

                                        Simulate Intensity Matrix & Load into NetCDF File
                                         模拟netCDF文件及负荷强度矩阵

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

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

This function creates a netCDF file with dimensions 'snp' and 'sample' and variables 'sampleID', 'position', 'chromosome', 'quality', 'X', and 'Y'.  These variables hold simulated data as explained below.  Mainly, this function is intended to be used in examples involving matrices holding quantitative data.
这个函数创建一个netCDF文件尺寸“SNP”和“样本”和变量sampleID“,”位置“,”染色体“,”质量“,”X“和”Y“。这些变量的数据模拟,解释如下。主要是,此功能的目的是要在涉及控股定量数据的矩阵的例子。


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


simulateIntensityMatrix(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 list of heterozygosity and missing values.  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倍

'quality': 2-dimensional snp x sample, values between 0 and 1 chosen randomly from a uniform distribution.  There is one quality value per snp, so this value is constant across all samples.
“质量”:2维SNP x从均匀分布的随机选择的样本,0和1之间的值。是每一个的SNP质量值,所以这个值是在所有样本不变。

'X': 2-dimensional snp x sample, value of X intensity taken from a normal distribution.  The mean of the distribution for each SNP is based upon the sample genotype.  Mean is 0,2 if sample is homozygous, 1 if heterozygous.
“X”:2维SNP x样品,X的强度值从正态分布。平均每个SNP的分布是根据样本的基因型。意思是0,2,如果样品是纯合子,如果杂合子。

'Y': 2-dimensional snp x sample, value of Y intensity also chosen from a normal distribution, where the mean is chosen according to the mean of X so that sum of means = 2.
“Y”:2维样本SNP x,Y的强度值也从正态分布,平均选择根据X平均值的选择,因此,总和是指= 2。


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

This function returns a list if the silent variable is set to FALSE, which includes:
这个函数返回一个列表,如果沉默的变量设置为FALSE,其中包括:


参数:het
Heterozygosity table
合度表


参数:nmiss
Number of missing values
遗漏值的数量

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, meanIntensityByScanChrom, simulateGenotypeMatrix
ncdf,meanIntensityByScanChrom,simulateGenotypeMatrix


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


filenm <- tempfile()

simulateIntensityMatrix(ncdf.filename=filenm, silent=FALSE )

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

xint <- getX(file)
yint <- getY(file)
print("Number missing is: "); sum(is.na(xint))

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:09 , Processed in 0.021274 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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