cor.matrix(rsgcc)
cor.matrix()所属R语言包:rsgcc
correlation calculation for a set of genes
为一组基因的相关性计算
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function provides five correlation methods (GCC, PCC, SCC, KCC and BiWt) to calculates the correlations between a set of genes.
此功能提供了5个相关方法(GCC,PCC,SCC,KCC和BiWt)计算一组基因之间的相关性。
用法----------Usage----------
cpus = 1,
cormethod = c("GCC", "PCC", "SCC", "KCC", "BiWt"),
style = c("all.pairs", "pairs.between", "adjacent.pairs", "one.pair"),
var1.id = NA,
var2.id = NA,
pernum = 0,
sigmethod = c("two.sided", "one.sided"),
output = c("matrix", "paired"))
参数----------Arguments----------
参数:GEMatrix
a data matrix containing the gene expression data of a set of genes. Each row of the GEMatrix corresponds to a gene, and each column corresponds to the expression level in a sample.
含有该基因的一组基因的表达数据的一个数据矩阵。的GEMatrix的每一行对应于一个基因,并且每一列对应于样品中的表达水平。
参数:cpus
the number of cpus used for correlation calcluation.
用于相关calcluation使用的CPU的数量。
参数:cormethod
a character string that specifies a correlation method to be used for correlation calculation.
一个字符的字符串,它指定用于相关计算的相关方法。
参数:style
a character string that indicates the all or partial genes to be used for correlation calculation.
一个字符串,表示要用于相关计算的全部或部分基因。
参数:var1.id
a numeric vector specifying the row numbers of genes.
指定的行数的基因的一个数值向量。
参数:var2.id
a numeric vector specifying the row numbers of genes. Suppose the var1.id and var2.id are respectively c(1,2) and c(3,6), then the the correlation of gene pairs (G1,G3) and (G2,G6) will be calcuated. For styles of "pairs.between" and "one.pair", this parameter MUST be pre-defined. For the other styles, this parameter can be automatically defined by the program itself.
指定的行数的基因的一个数值向量。假设var1.id和var2.id分别为C(1,2)和c(3,6),那么相关的基因对(G1,G3)和(G2,G6)将calcuated。对于风格的“pairs.between”和“one.pair,这个参数必须预先定义。对于其他样式,这个参数可以被自动定义程序本身。
参数:pernum
the number of permutation test used for calcluating statistical significance level (i.e., p-value) of correlations.
数量的排列的测试,用于calcluating的相关性的统计显着性水平(即,p-值)。
参数:sigmethod
a character string ("two-sided" or "one-sided") that specifies the method used to compute p-value for permutation test.
字符串(“双面”或“一边倒”),指定用于置换检验p值计算的方法。
参数:output
a character string ("matrix" or "paired") that represents the output format of correlations. Specifiying the "matrix" will output two matrix for correlations and p-values, respectively. Specifiying the "paired" will output only one matrix, in which each row provides the information of gene pair, the correlation and p-value.
字符串(“基质”或“配对”)的相关性表示的输出格式。 Specifiying的“矩阵”的相关性和p值,分别输出两个矩阵。 Specifiying“配对”,将仅输出一个矩阵,其中每行提供的基因对的信息,相关性和p值。
Details
详细信息----------Details----------
Given a data matrix (e.g., microarray and RNA-Seq gene expression matrix), calculating correlation with GCC and other correlation methods for partial(or all) individuals (e.g., genes). The statistical significance (i.e., p-value) of each correlation is derived from the permutation test. Parallel computing options are also provided for speeding up the correlation calculation.
给定一个数据矩阵(例如,微阵列和RNA-Seq的基因表达矩阵),计算相关的部分(或全部)个人(例如,基因)与海湾合作委员会及其他相关方法。每个相关性的统计学意义(即,p-值)导出从置换试验。并行计算解决方案还提供了为加快相关计算。
值----------Value----------
A list with the following components:
以下组件列表:
参数:corMatrix
correlation of gene pairs shown in matrix form. This data matrix is generated only when the output format "matrix" is specified.
相关的基因对所示的矩阵形式。此矩阵数据的生成,只有当输出格式为“基质”被指定。
参数:pvalueMatrix
p-value of correlations shown in matrix form. This data matrix is generated only when the output format "matrix" is specified.
矩阵形式中所示的相关性的p-值。此矩阵数据的生成,只有当输出格式为“基质”被指定。
参数:corpvalueMatrix
correlation and p-values listed in one form. This data matrix is generated only when the output format "paired" is indicated.
相关性和p-值中列出的一种形式。只有当输出格式“配对”表示此数据矩阵生成。
注意----------Note----------
(1) The rsgcc provides the RNA-Seq profiled expression level of 100 genes as a sample data to implement cor.matrix, cor.pari and other functions in the package. After running the command: data(rsgcc), the expression data of these genes will be loaded to the GEMatrix "rnaseq". The user can also load the GEMatrix from the gene expression file, which should be in a textual format of a gene expression matrix. An example of the gene expression file(e.g., "/home/rsgcc/geneExpFile.txt") is shown as follow:
(1)rsgcc提供了RNA-Seq的异形作为样本数据,实现cor.matrix,cor.pari和其他功能包中的100个基因的表达水平。后,运行以下命令:数据(rsgcc),这些基因的表达数据将被加载到GEMatrix的“rnaseq”。用户也可以从基因表达文件加载GEMatrix,这应该是基因表达的矩阵中的文本格式。一个例子文件(例如,/的家庭/ rsgcc / geneExpFile.txt“)的基因表达如下图所示:
sample1 sample2 sample3 sample4
范例1范例样品3 sample4
gene1 45 65 77 75
gene1 45 65 77 75
gene2 75 78 83 39
gene2 75 78 83 39
gene3 2 11 10 6
gene3 2 11 10 6
Then the GEMatrix can be obtained by load this gene expression file with the command: x <- as.matrix(read.table("/home/rsgcc/geneExpFile.txt"))
然后GEMatrix可以得到负载,该基因的表达文件的命令:X < - as.matrix(read.table(“/家庭/ rsgcc的机构/ geneExpFile.txt”))
(1) var1.id and var2.id should be defined with the numeric vector format for "pairs.between", or "one.pair" styles.
(1)var1.id var2.id应与数字矢量格式为“pairs.between”,或“one.pair”风格定义。
(2) To perform BiWt, the R package "biwt" should be installed in advance.
(2),要执行BiWt,在R的包“biwt”应提前安装在。
(3) To perform the parallel compution, the "snowfall" package in R should be installed in advance.
(3)执行并行使计算,“降雪”包应事先安装在R。
(作者)----------Author(s)----------
Chuang Ma, Xiangfeng Wang
参见----------See Also----------
cor.pair, onegcc, cor.test.
cor.pair,onegcc,cor.test。
实例----------Examples----------
## Not run: [#不运行:]
data(rsgcc) #load the sample data in rsgcc package[加载rsgcc包中的示例数据]
x <- rnaseq[1:4,] #construct a GEMatrix with the RNA-Seq data of the first four genes[构造一个与第一四个基因的RNA-Seq数据GEMatrix]
#run on one CPU for all the possible gene pairs in the GEMatrix "x".[运行在一个CPU上的所有可能的基因对在GEMatrix的“x”。]
#do not cacluate the p-value of computated correlations.[不cacluate的computated相关性的p-值。]
cor.matrix(x, cpus = 1,
cormethod = "GCC", style = "all.pairs",
pernum = 0, sigmethod = "two.sided",
output = "matrix")
#run on two CPUs, snowfall package should be properly installed.[在两个CPU上运行,降雪量应正确安装包。]
#cacluate the p-value of correlations with the 2000 permutation tests.[cacluate的p-值与2000年的排列测试的相关性。]
#output the results in "paired" format.[“配对”的格式中的结果输出。]
cor.matrix(x, cpus = 2,
cormethod = "GCC", style = "all.pairs",
pernum = 2000, sigmethod = "two.sided",
output = "paired")
#calcuate correlation on the pairs between the 1st, 2nd and 3rd genes in the GEMatrix "x".[calcuate对“X”GEMatrix第1,第2和第3的基因之间的相关性。]
cor.matrix(x, cpus = 1,
cormethod = "GCC", style = "pairs.between",
var1.id = c(1:3), var2.id = c(1:3),
pernum = 2000, sigmethod = "two.sided",
output = "matrix")
#calcuate correlation on the adjacent genes ((G1,G2), (G2,G3), (G3,G4),...) in the GEMatrix "x".[上相邻的基因((G1,G2),(G2,G3),(G3,G4),...)中的“x”GEMatrix calcuate相关。]
cor.matrix(x, cpus = 1,
cormethod = "GCC", style = "adjacent.pairs",
pernum = 2000, sigmethod = "two.sided",
output = "matrix")
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|