knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
DiffCorr [1-2] is a package for identifying pattern changes between 2 experimental conditions in correlation networks (e.g., gene co-expression networks), which builds on a commonly used association measure, such as Pearson's correlation coefficient. This document demonstrates typical correlation network analysis using transcriptome and metabolome data.
install.packages("DiffCorr")
install.packages("devtools") install.packages(c("igraph", "fdrtool")) if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install(c("pcaMethods", "multtest")) library(devtools) install_github("afukushima/DiffCorr")
Molecular interactions can be modeled as networks by measuring associations between molecules in omics data. Gene co-expression analysis, commonly based on transcriptome datasets from microarray experiments and RNA-seq, uses metrics like Pearson’s correlation coefficient to quantify these relationships.
When gene correlations surpass a threshold, they form co-expression or correlation networks. These analyses, often using a "guide-gene" approach [3], offer insights into regulatory mechanisms and have been used to identify genes involved in plant secondary metabolisms.
In addition to identifying differentially expressed genes (DEGs) between samples, changes in correlation patterns, or "differential correlations," provide insights into molecular interactions [4]. Differential network analysis, which compares networks (e.g., normal vs. diseased), has been applied to both plant and animal studies and has been useful in metabolomics for understanding complex metabolic processes.
This document demonstrate typical correlation network analysis using transcriptome and metabolome data. It also showcases the utility of the DiffCorr [1-2] package by identifying biologically relevant, differentially correlated molecules in transcriptome co-expression and metabolite-to-metabolite correlation networks.
library(DiffCorr)
This section was created from Additional File 3 included in the original DiffCorr package. As an example, we use Golub's data (https://coxpress.sourceforge.net/golub.txt). The dataset consist of gene expression profiles from 38 tumor samples including 2 different leukemia subtypes: 27 acute lymphoblastic leukemia (ALL) and 11 acute myeloid leukemia (AML) samples (Golub et al., 1999). The microarray platform used, Affymetrix GeneChip HuGeneFL (known as HU6800), contains 6800 probe-sets. To demonstrate the usefulness of DiffCorr package, we describe and discuss the results from analysis of the transcriptomic dataset.
data(golub.df) dim(golub.df)
hc.mol1 <- cluster.molecule(golub.df[, 1:27], "pearson", "average") ## ALL (27 samples) hc.mol2 <- cluster.molecule(golub.df[, 28:38], "pearson", "average") ## AML (11 samples)
g1 <- cutree(hc.mol1, h = 0.4) g2 <- cutree(hc.mol2, h = 0.4) ## res1 <- get.eigen.molecule(data = golub.df, groups = g1) res2 <- get.eigen.molecule(data = golub.df, groups = g2)
gg1 <- get.eigen.molecule.graph(res1) plot(gg1, layout = layout.fruchterman.reingold(gg1)) gg2 <- get.eigen.molecule.graph(res2) plot(gg2, layout = layout.fruchterman.reingold(gg2))
You can save the results.
write.modules(g1, res1, outfile = "module1_list.txt") write.modules(g2, res2, outfile = "module2_list.txt")
You can examine the relationship between modules.
for (i in 1:length(res1$eigen.molecules)) { for (j in 1: length(res2$eigen.molecules)) { r <- cor(res1$eigen.molecules[[i]],res2$eigen.molecules[[j]], method = "spearman") if (abs(r) > 0.8) { print(paste("(i, j): ", i, " ", j, sep = "")) print(r) } } } cor(res1$eigen.molecules[[2]], res2$eigen.molecules[[8]], method = "spearman") plot(res1$eigen.molecules[[2]], res2$eigen.molecules[[8]]) plot(res1$eigen.molecules[[21]], res2$eigen.molecules[[24]])
look at groups 21 and 24
plotDiffCorrGroup(golub.df, g1, g2, 21, 24, 1:27, 28:38, scale.center = TRUE, scale.scale = TRUE, ylim=c(-5,5))
comp.2.cc.fdr(output.file = "res.txt", golub.df[, 1:27], golub.df[, 28:38], threshold = 0.05, save = TRUE)
Kusano et al. [5] studied flavonoid-deficient Arabidopsis thaliana (Arabidopsis) mutants and wild-type plants using gas chromatography-mass spectrometry (GC-MS) for metabolite profiling [5-6]. The mutant, transparent testa 4 (tt4), lacks chalcone synthase (CHS), a key enzyme in the flavonoid biosynthesis pathway, and is unable to produce flavonoids, which protect plants from UV-B radiation.
AraMetLeaves
datasetAraMetLeaves
includes metabolite profiles of 37 aerial part samples, consisting of 17 Columbia-0 wild-type (Col-0) and 20 tt4 plants, covering a wide range of primary metabolites. The dataset AraMetLeaves
is available in the DiffCorr package.
data(AraMetLeaves) dim(AraMetLeaves)
The AraMetLeaves
dataset contains 59 metabolites (rows) and 50 observations (columns). For comparison with data from aerial parts [5-6], we selected 59 commonly detected metabolites across both datasets using MetMask (https://metmask.sourceforge.net). It is important to note that another genotype, mto1, is also present in the data matrix. For further information, refer to the help page of AraMetLeaves
.
colnames(AraMetLeaves) ?AraMetLeaves
Differential correlation between tt4 and Col-0 can be performed as follows:
comp.2.cc.fdr(output.file = "Met_DiffCorr_res.txt", log10(AraMetLeaves[, 1:17]), ## Col-0 (17 samples) log10(AraMetLeaves[, 18:37]), ## tt4 (20 samples) method = "pearson", threshold = 1.0, save = TRUE)
As indicated in the ASCII result file "Met_DiffCorr_res.txt," the DiffCorr package identified significant differential correlations between sinapate and aromatic metabolites in tt4 and wild-type plants. Consistent with previous findings [2], aromatic metabolites in the shikimate pathway—specifically sinapate, phenylalanine, and tyrosine exhibited significant correlations in tt4 but not in wild-type plants (Table 1). This suggests a connection to the role of sinapoyl-malate in protecting the flavonoid-deficient tt4 mutant against UV-B irradiation [5]. Our results demonstrate that Arabidopsis compensates for the deficiency in either flavonoid or sinapoyl-malate production by over-accumulating alternative protective compounds [7]. These findings suggest that DiffCorr is applicable not only to transcriptomic data but also to other post-genomic data types, including metabolomic data.
Table 1. A typical result of pairwise differential correlations from the DiffCorr package. The full list can be found in [1].
|molecule X|molecule Y|r1|p1|r2|p2|p (difference)|(r1-r2)|lfdr (in cond. 1)|lfdr (in cond. 2)|lfdr (difference)| |----|----|----|----|----|----|----|----|----|----|----| |Malate|Threonine|0.77|0.00034|0.94|1.5E-09|0.057|-0.17|0.0049|3.2E-08|0.76| |Malate|Phenylalanine|0.45|0.070|0.89|1.2E-07|0.0086|-0.44|0.20|2.2E-06|0.64|
The R package DiffCorr provides a straightforward and efficient framework for detecting differential correlations between two conditions in omics data, utilizing Fisher's z-test. It is a useful tool for inferring potential relationships and identifying biomarker candidates. Based on the concept of "differential network biology," DiffCorr [1, 5] is applicable not only to metabolomic data but also to transcriptome, proteome, and integrated omics datasets.
Fukushima, Gene (2013) https://doi.org/10.1016/j.gene.2012.11.028
Fukushima and Nishida “Using the DiffCorr Package to Analyze and Visualize Differential Correlations in Biological Networks” - Book chapter in “Challenges of Computational Network Analysis with R”. Editors: Matthias Dehmer, Yongtang Shi, and Frank Emmert-Streib. WILEY.
Saito et al. Trends Plant Sci (2008) https://doi.org/10.1016/j.tplants.2007.10.006
de la Fuente, Trends Genet (2010) https://doi.org/10.1016/j.tig.2010.05.001
Kusano et al. BMC Syst Biol (2007) https://doi.org/10.1186/1752-0509-1-53
Fukushima et al. BMC Syst Biol (2011) https://doi.org/10.1186/1752-0509-5-1
Kusano et al. Plant J (2011) https://doi.org/10.1111/j.1365-313x.2011.04599.x
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.