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

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

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

                                        Hardy-Weinberg Equilibrium testing
                                         Hardy-Weinberg平衡测试

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

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

This function performs exact Hardy-Weinberg Equilibrium testing (using Fisher's Test) over a selection of SNPs.   It also performs genotype counts, calculates allele frequencies, and calculates inbreeding coefficients.
这个函数执行选择的SNPs精确Hardy-Weinberg平衡测试(使用费舍尔测试)。它还执行基因型计数,计算等位基因频率,计算近交系数。


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


gwasExactHW(genoData,                
            scan.chromosome.filter = NULL,
            scan.exclude = NULL,
            geno.counts = TRUE,
            chromosome.set = NULL,
            block.size = 5000,
            verbose = TRUE,
            outfile = NULL)



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

参数:genoData
GenotypeData object, should contain sex and phenotypes in scan annotation
GenotypeData对象,应包含在扫描注释性和表型


参数:scan.chromosome.filter
a logical matrix that can be used to exclude some chromosomes, some scans, or some specific scan-chromosome pairs. Entries should be TRUE if that scan-chromosome pair should be included in the analysis, FALSE if not. The number of rows must be equal to the number of scans in genoData, and the number of columns must be equal to the largest integer chromosome value in genoData. The column number must match the chromosome number. e.g. A scan.chromosome.filter matrix used for an analyis when genoData has SNPs with chromosome=(1-24, 26, 27) (i.e. no Y (25) chromosome SNPs) must have 27 columns (all FALSE in the 25th column). But a scan.chromosome.filter matrix used for an analysis genoData has SNPs chromosome=(1-26) (i.e no Unmapped (27) chromosome SNPs) must have only 26 columns.
逻辑矩阵,可以用来排除一些染色体,一些扫描,或某些特定的扫描对染色体。参赛作品必须是TRUE如果扫描染色体配对应包含在分析中,FALSE如果不是。行数必须等于扫描genoData的数量,列数必须等于最大的genoData整数染色体价值。列数必须匹配的染色体数目。例如一个scan.chromosome.filter矩阵1 analyis使用时genoData有个SNPs与染色体=(1-24,26,27)(即没有Y(25)染色体单核苷酸多态性)必须有27列(所有的<X >在第25列)。但是,scan.chromosome.filter矩阵分析“FALSE有个SNPs染色体=(1-26)(即没有未映射(27)染色体单核苷酸多态性)必须有只有26列。


参数:scan.exclude
an integer vector containing the IDs of entire scans to be excluded.
整数向量,包含整个扫描的ID被排除在外。


参数:geno.counts
if TRUE (default), genotype counts are returned in the output data.frame.
如果TRUE(默认),基因型计数输出数据框返回的。


参数:chromosome.set
integer vector with chromosome(s) to be analyzed.  Use 23, 24, 25, 26, 27 for X, XY, Y, M, Unmapped respectively.
整数向量与染色体(S)进行分析。使用的X,XY,Y,M 23,24,25,26,27分别为未映射。


参数:block.size
Number of SNPs to be read from genoData at once.
genoData一次读取数个SNPs。


参数:verbose
if TRUE (default), will print status updates while the function runs.  e.g. it will print "chr 1 block 1 of 10" etc. in the R console after each block of SNPs is done being analyzed.
如果TRUE(默认),将打印函数运行时的状态更新。例如它将打印等“CHR 1 10块1”在R控制台后完成正在分析每块单核苷酸多态性。


参数:outfile
a character string to append in front of ".chr.i_k.RData" for naming the output data-frame;  where i is the first chromosome, and k is the last chromosome used in that call to the function.  "chr.i_k." will be omitted if chromosome.set=NULL.
一个字符串“chr.i_k.RData。”前命名输出数据框追加,在那里我是第一号染色体和K是,函数调用中使用的最后一个染色体。 “chr.i_k。”将被忽略,如果chromosome.set=NULL。


Details

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

HWE calculations are performed with the HWExact function in the GWASExactHW package.
HWExact包中的功能GWASExactHW HWE计算。

For the X chromosome, only female samples will be used in all calculations (since males are excluded from HWE testing on this chromosome).  Hence if chromosome.set includes 23, the scan annotation of genoData should provide the sex of the sample ("M" or "F") i.e. there should be a column named "sex" with "F" for females and "M" for males.
唯一的女性样品的X染色体,将使用在所有的计算(因为男性HWE测试排除这种染色体上)。因此如果chromosome.set包括23个,扫描genoData注释应提供样品的性别(的“M”或“F”)即应该有命名的“F”为女性的“性别”一栏, “M”的男性。

Y, M, and U (25, 26, and 27) chromsome SNPs are not used in HWE analysis, so all returned values for these SNPs will be NA.
Y,M和U(25,26,和27条)染色体单核苷酸多态性在HWE分析,使所有这些SNPs返回值将是NA。


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

If outfile=NULL (default), all results are returned as a single data.frame.  If outfile is specified, no data is returned but the function saves a data-frame with the naming convention as described by the argument outfile.
如果outfile=NULL(默认),所有的结果是作为一个单一的数据框返回。如果outfile指定,返回任何数据,但该功能节省了命名约定的数据框参数outfile。

The first three columns of the data-frame are:
前三列的数据框是:


参数:snpID
snpID (from the snp annotation) of the SNP
单核苷酸多态性(SNP注解)的snpID


参数:chromosome
chromosome (from the snp annotation) of the SNP. The integers 23, 24, 25, 26, 27 are used for X, XY, Y, M, Unmapped respectively.   
染色体(从SNP标注)的SNP。用于整数23,24,25,26,27的X,XY,为Y,M,分别为未映射。


参数:position
position (from the snp annotation) of the SNP
SNP的位置(从SNP注释)

If geno.counts = TRUE:
如果geno.counts = TRUE:


参数:nAA
number of AA genotypes in samples
数样品中AA基因型


参数:nAB
number of AB genotypes in samples
AB基因型在样本数


参数:nBB
number of BB genotypes in samples  
BB基因型样本数


参数:MAF
minor allele frequency.
次要等位基因频率。


参数:minor.allele
the minor allele. Takes values "A" or "B".
次要等位基因。以值的“A”或“B”。


参数:f
the inbreeding coefficient.
近亲繁殖系数。


参数:p.value
exact Hardy-Weinberg Equilibrium (using Fisher's Test) p-value.  p.value will be NA for monomorphic SNPs (MAF == 0).
精确Hardy-Weinberg平衡(费舍尔测试使用)p值。 p.value会NA单形单核苷酸多态性(MAF == 0)。

Warnings:
警告:

If outfile is not NULL, another file will be saved with the name "outfile.chr.i_k.warnings.RData" that contains any warnings generated by the function.
如果outfile是不是NULL,另一个文件将被保存的名称为“outfile.chr.i_k.warnings.RData”,它包含的功能产生任何警告。


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


Ian Painter, Matt Conomos



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

HWExact
HWExact


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


# The following example would perform exact Hardy-Weinberg equilibrium testing on all chromosomes in this data set.  It would also return genotype counts, minor allele frequencies, and inbreeding coefficients.[下面的例子将执行精确Hardy-Weinberg平衡这组数据中的所有染色体平衡测试。它也将返回基因型数,次要等位基因频率和近亲繁殖系数。]

library(GWASdata)
data(affy_scan_annot)
scanAnnot <- ScanAnnotationDataFrame(affy_scan_annot)

# run only on YRI subjects[只能运行在YRI人群科目]
scan.exclude <- scanAnnot$scanID[scanAnnot$race != "YRI"]

# create data object[创建数据对象]
ncfile <- system.file("extdata", "affy_geno.nc", package="GWASdata")
nc <- NcdfGenotypeReader(ncfile)
genoData <-  GenotypeData(nc, scanAnnot=scanAnnot)

hwe <- gwasExactHW(genoData, scan.exclude=scan.exclude)

close(genoData)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-6 12:49 , Processed in 0.024141 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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