Description Usage Arguments Details Value Note Author(s) References See Also Examples
compute the correlation network of entities from one or two quantified data sets, see details.
1 | computeCorrelation(x, y, xtype, ytype, internalid, coef, pval, method, returnas)
|
x |
a data frame of raw or quantified data e.g. gene expression data, metabolite intensities. Columns are samples and rows are molecular entities e.g. genes, proteins or compounds. |
y |
a data frame of raw or quantified data e.g. gene expression data, metabolite intensities. Columns are samples and rows are molecular entities e.g. genes, proteins or compounds. See details. |
xtype |
a string specifying a node type (default = NULL). If provided and the database is installed, node attributes will be automatically retrieved from the database. For database query, the value can be one of compound, protein, gene, rna, dna. |
ytype |
a string specifying a node type (default = NULL). |
internalid |
a logical value indicating whether the network nodes are neo4j ids, if TRUE (default). See |
coef |
a numeric value specifying the minimum absolute correlation coefficient to be included in the output (from 0 to 1, default is 0.7). |
pval |
a numeric value specifying the maximum p-value to be included in the output (default is 0.05). |
method |
a string specifying method for computing correlation. It can be one of pearson, kendall, spearman (default). See |
returnas |
a string specifying output type. It can be one of dataframe, list, json. Default is dataframe. |
The function wraps around corAndPvalue
function of WGCNA. Correlation coefficients, p-values and correlation directions are calculated.
The correlation coefficients are continuous values between -1 (negative correlation) and 1 (positive correlation), with numbers close to 1 or -1, meaning very closely correlated.
x and y are data frame in which columns are samples and rows are entities. If y is given, then the correlations between the x entities and y entities are computed. Otherwise the correlations between x entities are computed.
list of network information with the following components:
nodes:
id
= node id or node neo4j id
gid
= node id or node grinn id
nodename
= node id or node name
nodelabel
= node type if provided
edges:
source, target
= node id or node neo4j id
coef
= correlation coefficient
pval
= p-value
direction
= correlation direction
type
= relationship type
Return empty list if error or found nothing.
If only one data set x
is provided and the database is installed, node attributes will be automatically retrieved from the database. Otherwise node attributes will be the original input.
Kwanjeera W kwanich@ucdavis.edu
Langfelder P. and Horvath S. (2008) WGCNA: an R package for weighted correlation network analysis. BMC Bioinformatics, 9:559
Dudoit S., Yang YH., Callow MJ. and Speed TP. (2002) Statistical methods for identifying differentially expressed genes in replicated cDNA microarray experiments, STATISTICA SINICA, 12:111
Langfelder P. and Horvath S. Tutorials for the WGCNA package http://labs.genetics.ucla.edu/horvath/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/index.html
1 2 3 4 5 6 7 | # Compute a correlation network from compound data
#dt <- data.frame(id=seq(32), mtcars, row.names = NULL) #data frame of x
#result <- computeCorrelation(x = dt, xtype = "compound", coef=0.9, pval = 1e-10)
# Compute a correlation network from two data sets
#dtX <- data.frame(id=seq(16), mtcars[1:16,], row.names = NULL) #data frame of x
#dtY <- data.frame(id=seq(17,32), mtcars[17:32,], row.names = NULL) #data frame of x
#result <- computeCorrelation(x=dtX, y=dtY, coef=0.9, pval = 1e-7)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.