Background

In an ecosystem, different species/populations interact with each other to form complicated networks through various types of interactions such as predation, competition and mutualism. On the basis of ecological interactions, ecological networks can be grouped as antagonistic, competitive and mutualistic networks [1]. Traditionally, food webs have been intensively studied in ecological research because they are critical to study the complexity and stability of ecological communities [2, 3]. Recent studies showed that food webs possessed typical properties of network topology (e.g. degree distribution, small world effect) [1, 4, 5]. Within the last decade, mutualistic networks have also been intensively studied [6]. But, it appears that no studies have been performed to examine competitive networks. This is most likely because the network structure is not available based on competitive interactions. Unlike food webs and plant-animal mutualistic networks where the structure is already known, quantifying competitive interactions among different species/populations within a given habitat is difficult so that the network structure for competitive interactions is unknown. This is also true for network studies in microbial ecology. Because of their vast diversity, as-yet uncultivated status [7] and of the lack of appropriate theoretical frameworks and experimental data, very few community-scale network studies have been performed in microbial ecology.

Various network approaches have been developed and widely applied in genomic biology [8]. To reveal the interactions among biological molecules including genes and proteins, differential equation-based network methods [912], Bayesian network methods [13, 14], and relevance/co-expression network methods [1520], have been used to infer cellular networks based on gene expression data. Among them, the correlation-based relevance network method is most commonly used largely due to its simple calculation procedure and noise tolerance [21]. However, most studies involving relevance network analysis use arbitrary thresholds, and thus the constructed networks are subjective rather than objective [8]. This problem has been solved by our recent development of a random matrix theory (RMT)-based approach, which is able to automatically identify a threshold for cellular network construction from microarray data [2224]. Our results showed that the developed novel RMT-based approach can automatically identify cellular networks based on microarray data. Our results also indicated that this approach is a reliable, sensitive and robust tool for identifying transcriptional networks for analyzing high-throughput genomics data for modular network identification and gene function prediction [22, 23].

High-throughput technologies such as microarrays and high throughout sequencing have generated massive amounts of data on microbial community diversity and dynamics across various spatial and temporal scales [25, 26]. These data offer an unprecedented opportunity to examine interactions among different microbial populations [7]. Recently, a novel conceptual framework, termed molecular ecological networks (MENs), has been proposed and applied to characterize microbial communities in response to elevated CO2[27, 28]. Here, we provide detailed mathematical and bioinformatic foundation of this novel approach, and further applications to characterize microbial community network interactions in response to long-term experimental warming. Additionally, we provide an online tool, named the Molecular Ecological Network Analyses Pipeline (MENAP), which is freely accessible to the scientific community.

Results

Overview of MENA

An ecological network is a representation of various biological interactions (e.g., predation, competition, mutualism) in an ecosystem, in which species (nodes) are connected by pairwise interactions (links) [1, 2932]. As previously described, we refer such molecule-based ecological networks in microbial communities as molecular ecological networks (MENs) [27, 28], in which different nodes (molecular markers, e.g., OTUs, functional genes, intergenic regions) are linked by edges (i.e., interactions). The MENs derived from functional gene markers are referred as functional molecular ecological networks (fMENs) [27] and those based on phylogenetic gene markers as phylogenetic molecular ecological networks (pMENs) [28].

The whole process of MENA can be divided into two phases and each phase is comprised of several major steps (Figure 1). The first phase is network construction, which includes four major steps: data collection, data transformation/standardization, pair-wise similarity matrix calculation, and the adjacent matrix determination by RMT-based approach. Among them, the last step is the key to RMT-based network construction (Figure 2), which has been well established in biological systems [22, 23]. Once the adjacency matrix is defined, an undirected network graph can be drawn. The second phase of MENA is network analyses, which is composed of network topology characterization (Table 12), module detection, module-based eigengene analysis and identification of modular roles. These methods are important for revealing the networks’ overall and modular organizations and identifying key populations at OTU level. In addition, eigengene network analysis can be performed to reveal higher order organization of MENs, and the associations of network properties to environmental characteristics can be established. Finally, the network differences can be compared under different conditions to analyze how environments affect network structure and interactions.

Figure 1
figure 1

Overview of the Random Matrix Theory (RMT)-based molecular ecological network analysis. Two major parts are included, network construction and network analyses. In each of them, several key steps are outlined.

Figure 2
figure 2

Process of random matrix theory-based approach for automatically detecting threshold to construct molecular ecological networks.

Table 1 The network topological indexes used in this study
Table 2 Common characters of complex networks

Molecular network under experimental warming

Here we used 16 S rRNA gene-based pyrosequencing data from a long-term experimental warming site [48] to construct pMENs and demonstrate the whole process of MENA. The experimental site was established in grassland with two atmospheric temperature treatments, ambient (unwarming) and +2 °C warming. Six replicate plots were set up for each treatment. The environmental DNA of microbial community was extracted from the soil samples of those 12 plots and 2 or 3 unique tags with 16 S rRNA gene conserved primers were used to amplify the V4-V5 hypervariable regions of the 16 S rRNA genes. Altogether, there were 14 replicate datasets for each treatment of warming or unwarming. After preprocessing all raw sequences, the numbers of sequences for all 28 samples ranged from 1,033 to 5,498. After defining OTUs within 0.03 sequence difference, an OTU distribution table with 1,417 distinct OTUs across 28 samples was obtained. Since the numbers of sequences of all samples were diverse, the abundance data were transformed into relative abundance by dividing the sum of each sample as described previously [48]. The relative abundance table was split into two datasets: warming and unwarming. For each of the datasets, only the OTUs appeared in 7 or more replicates were used for correlation calculations, resulting in 228 and 197 OTUs for warming and unwarming datasets, respectively. After threshold scanning through RMT-based approach, the phylogenetic molecular ecological networks (pMENs) under warming and unwarming conditions were constructed with an identical similarity threshold 0.76 (Table 3). The final warming and unwarming pMENs included 177 and 152 nodes which had at least one edge, and 279 and 263 total edges, respectively.

Table 3 Topological properties of the empirical molecular ecological networks (MENs) of additional miobial communities and their associated random MENs a

The robustness of MENs to noise

In order to examine the robustness of MEN approach to noise, different levels (1 to 100 % of original standard deviation) of Gaussian noise were added to the warming dataset. Once various levels of noise were added, new correlation matrices based on these noise-added datasets were calculated. The same similarity threshold used for the original datasets was used for defining adjacency matrices in the new datasets. When less than 40 % noise was added, roughly 90 % of the original OTUs were still detected in the perturbed networks (Figure 3). With 100 % Gaussian noise, more than 85 % nodes from original network were still preserved and accounted for 75 % nodes of perturbed network. These results indicate that the RMT-based MEN construction approach is robust to noise.

Figure 3
figure 3

The robustness to noise of RMT-based MEN construction. Ineasing levels of Gaussian noise were added to the pyrosequencing datasets under experimental warming. The mean of noise was zero and standard deviation (σnoise) was set to 5, 10, 20, 30 to 100 % of the average of relative abundance of whole dataset. The thresholds (S t ) of all permutated datasets were set to 0.76 that was consistent with original dataset.

The overall MENs topology

Scale-free, small-world, modularity and hierarchy are common network properties in many complex systems (Table 2) [8, 53, 54]. The overall topology indices (Table 3) revealed that all curves of network connectivity distribution were fitted well with the power-law model (R2 values from 0.74 to 0.92), indicative of scale-free networks. Also, the average path lengths (GD) were 3.09 to 5.08, which were close to logarithms of the total number of network nodes and comparable to those in other networks displaying small-world behavior, suggesting that the MENs in these microbial communities had the typical property of small world. For modularity, all modularity values (M) were from 0.44 to 0.86, which were significantly higher than the M values from their corresponding randomized networks, Therefore, all constructed MENs appeared to be modular. Finally, the hierarchy property was examined by the scaling of clustering coefficient. R2 values of the linear relationship between logarithms of clustering coefficients and the logarithms of connectivity ranged from 0.10 to 0.73, indicating the hierarchical behavior was quite variable. MENs from certain habitats may have highly hierarchical structures like sediment samples from Lake DePue (0.73), but others may not (Table 3). Overall, our constructed MENs from different habitats clearly exhibit scale free, small world and modularity properties, but hierarchy property is displayed on certain networks.

Modular structure

Modularity is a very important concept in ecology. It could originate from specificity of interactions (e.g. predation, pollination), habitat heterogeneity, resource partition, ecological niche overlap, natural selection, convergent evolution, and phylogenetic relatedness, and it could be important for system stability and resilience [55]. In MENs, a module in the network is a group of OTUs that are highly connected among themselves, but had much fewer connections with OTUs outside the group. Random matrix theory-based approach is able to delineate separate modules, but some modules could still be very big.

We used several methods, including short random walks [56], leading eigenvector of the community matrix [57], simulated annealing approach [58, 59] and the greedy modularity optimization [57], to define modules and submodules within a large module. From the evaluation of warming and unwarming pMENs, short random walks generated 27 and 31 modules with M values 0.61 and 0.56, respectively; the leading eigenvector of the matrix generated 22 and 28 modules with M values 0.61 and 0.54, respectively; the greedy modularity optimization had 18 and 20 modules with M values 0.67 and 0.61, respectively; the simulated annealing approach had average 18 and 19 modules with average M values 0.67 and 0.61, respectively. From these results, the greedy modularity optimization and simulated annealing approach had higher M values than two other approaches, indicating they are more effective in separating the complex networks into submodules. Notably, since the simulated annealing approach was stochastic [59], the submodules of pMENs generated by this approach were slightly different with different runs. Therefore, the greedy modularity optimization approach was preferred to identify the submodular structure of MENs. The modular pMEN of warming pyrosequencing dataset was shown in Figure 4A. A total of 10 joint submodules with ≥8 nodes were isolated from a single large module and all the other isolated modules were relatively small (2 to 4 nodes). The size of modules or submodules varied with 2 to 24 nodes.

Figure 4
figure 4

The submodules of the warming pMEN. (A) The network graph with submodule structure by the fast greedy modularity optimization method. Each node signifies an OTU, which could correspond to a miobial population. Colors of the nodes indicate different major phyla. A blue edge indicates a positive interaction between two individual nodes, while a red edge indicates a negative interaction. (B) The correlations and heatmap to show module eigengenes of warming pMEN. The upper part is the hierarchical clustering based on the Pearson correlations among module eigengenes and the below heatmap shows the coefficient values (r). Red color means higher correlation whereas green color signified lower correlation. (C) ZP-plot showing distribution of OTUs based on their module-based topological roles. Each dot represents an OTU in the dataset of warming (red), or unwarming (green). The topological role of each OTU was determined according to the scatter plot of within-module connectivity (z) and among-module connectivity (P) [55, 60].

Eigengene network analysis and the modular topological roles

After modules and submodules are determined, the eigengene analysis is used to reveal higher order organizations in the network structure [6062]. In the eigengene analysis, each module is represented by its singular value decomposition (SVD) of abundance profile called module eigengene [62]. In the warming pMEN, the module eigengenes from top 10 large submodules (≥8 nodes) explained 30 - 68 % variations of relative abundance across different replicates, suggesting that these eigengenes represented the module profiles relatively well. The correlations among module eigengenes were used to define the eigengene network. Eigengene analysis is important for revealing higher order organization and identifying key populations based on network topology [62]. In warming pMEN, these correlations of 10 largest submodules were visualized as a heat-map and hierarchical clustering diagram (Figure 4B). The eigengenes within several groups of submodules showed significant correlations and clustered together as super-groups, such as #6 and #8, #2, #5 and #3, and #1, and #7 and #9, which were referred as meta-modules that exhibit a high order organization among submodules. Besides, within each module, eigengene analysis approach was able to show the representative abundance profile and identify key members as shown in our previous paper [28].

Different nodes play distinct topological roles in the network [33]. The analysis of modular topological roles is important to identify key populations or functional genes based on the nodes’ roles in their own modules. Their topological roles can be defined by two parameters, within-module connectivity (z i ) and among-module connectivity (P i ). The topological roles of nodes in warming and unwarming pMENs were illustrated in ZP-plot (Figure 4C). According to values of z i and P i , the roles of nodes were classified into four categories: peripherals, connectors, module hubs and network hubs. From ecological perspectives, peripherals might represent specialists whereas module hubs and connectors were close to generalists and network hubs as super-generalists [55]. Here, the majority of OTUs (90.9 %) under warming and unwarming conditions were peripherals with most of their links inside their own modules. A total of 26 nodes (7.9 %) were connectors and only four nodes (1.2 %) were module hubs. Those four OTUs as module hubs were derived from Planctomyces (Planctomycetes), Nocardioides (Actinobacteria) under warming condition, and Thermoleophilum (Actinobacteria) and GP4 (Acidobacteria) under unwarming condition, indicating that the hubs of pMENs were substantially different under different conditions.

The correlations between network topologies with environmental traits

The relationships between microbial network topology and environmental characteristics can be examined in both direct and indirect ways. Indirectly, as a first step, the OTU significance (GS) is calculated and defined as the square of Pearson correlation coefficient (r2) of OTU abundance profile with environmental traits. Then the correlation between GS and nodes’ topological indices (e.g., connectivity) was used to measure the relationship of network topology with traits. For instance, in warming pMEN, the GS of average soil temperature was significantly correlated with the nodes’ connectivity (r = 0.30, p = 4.7 × 10-5), indicating that the nodes with higher connectivity were inclined to have closer relationships with temperature. If multiple GS was involved, Mantel and partial Mantel tests could be implemented to calculate correlations between the connectivity and multiple GS of environmental traits to reveal the internal associations between network topology and environmental changes. In warming pMEN, the nodes’ connectivity was significantly associated with the GS of pH values, soil NO3-nitrogen and soil carbon contents when the effect of temperature was controlled (rM = 0.104, P = 0.018). Meanwhile, the GS of temperature was also significantly associated with the connectivity when aforementioned soil geochemistry factors were controlled (rM = 0.159, P = 0.003) (Table 4). Moreover, the OTUs of β-Proteobacteria and Verrucomicrobia were highly associated with the changes of soil geochemistry (rM = 0.59 and 0.926 respectively, both P = 0.013). These results suggested that the OTUs topology in warming pMEN was significantly associated with both temperature and the selected soil variables. In addition, OTUs from β-Proteobacteria and Verrucomicrobia were most sensitive to the changes of soil variables.

Table 4 The partial Mantel tests on connectivity vs. the OTU significances of soil geochemical variables and soil temperature in warming pyrosquencing molecular ecological network

The correlations between module-based eigengenes and environmental factors can be used to detect the modules’ response to environmental changes. In warming pMEN, the coefficients (r values) and significances (p values) were shown in a heatmap (Figure 5). Submodules #1 and #9 were positively correlated with the average soil temperature significantly (p < 0.01) but negatively (p < 0.01) with soil pH values and soil carbon contents, indicating that the members in these two submodules might be stimulated by temperature but inhibited by soil pH and carbon. Also, submodules #6 and #8 were positively correlated with soil pH (p < 0.01), #4 was positively correlated with NO3- concentration (p = 0.001) and soil carbon content (p = 0.013). While #3 was positively correlated with carbon content (p = 0.016), #7 was negatively correlated with soil carbon content (p = 0.025). In addition, #2 and #6 were negatively correlated with temperature (p < 0.05). All above results demonstrated that different submodules in warming pMEN responded to the environmental changes differently and the changes of temperature could have significant impacts on members of some submodules (e.g., #1, #2, #6 and #9).

Figure 5
figure 5

The correlations between module eigengenes and environmental traits in the warming pMEN. The color of each plot indicates the correlation between corresponding module eigengene and environmental trait. Red color means highly positive correlation and green color means highly negative correlation. The numbers in each plot are the correlation coefficient (r) and significance (p) in parentheses. The environmental traits include soil pH value (pH), NO3-nitrogen content (NO3N), soil carbon content (SC) and average soil temperature (avgT).

Open-access pipeline

To facilitate the application of MENA in the scientific community, an open-access pipeline for MEN construction and analysis (MENAP) was implemented (http://ieg2.ou.edu/MENA). Although currently microarray-based intensity data and pyrosequencing data are two major types of informational sources for microbial community network analysis, a variety of other data types can be used for this pipeline as well. MENAP is implemented in Perl integrated common gateway interface (CGI) and runs on a Windows Server (Windows Server 2007). A user-friendly interface through web browser application was developed to facilitate the process of RMT-based network construction and related analyses (Figure 6). RMT-based threshold searching is performed using a Java script [22] and some network analyses are called in the programs of sna [63], igraph [64] and WGCNA [65] packages in the R project. The MENAP includes the following components: (i) user registration and login, (ii) data upload, (iii) network construction by the RMT-based method (perhaps other methods as well), (iv) network analysis, and (v) dataset and network management (Figure 6).

Figure 6
figure 6

An overview of molecular ecological network analysis pipeline (MENAP).

The network analysis component is further divided into three major parts:

  1. (a)

    Network characterization. Various network properties are calculated and evaluated, such as connectivity, betweenness, clustering coefficient, and geodesic distance. The module/submodule detection and modularity analyses is performed using fast greedy modularity optimization [66]. Eigengene network analysis is performed to understand network characteristics at higher organization levels and to identify key microbial populations or key functional genes in terms of network topology.

  2. (b)

    Network visualization. An automatic pipeline is constructed to visualize the constructed network. Moreover, the file format for software Cytoscape 2.6.0 [67] is prepared to visualize more complex and delicate network graphs. Other data associated with OTUs, such as taxonomy, relative abundance, edge information, and positive and negative correlations is imported and visualized in network figures.

  3. (c)

    Network comparison. Various randomization methods like the Maslov-Sneppen method [68] are used obtain random networks for network comparison. Various indices are evaluated for comparing the differences of networks among different communities in terms of sensitivity and robustness. In addition, OTU significances are calculated to reveal associations of the network structure to the ecological functional traits [27].

Discussion and conclusions

Most previous studies on the biodiversity of microbial communities have been focused on the number of species and the abundance of species, but not interactions among species. However, species interactions could be more important to ecosystem functioning than species richness and abundance, especially in complex ecosystems [1, 2729]. Several recent analyses show that the ecological networks of ecosystems are highly structured [1, 69, 70], thus ignoring the structure of network and the interactions among network components precludes further assessment of biodiversity and its dynamics. Several recent breakthroughs have been made to analyze species interactions of animals and plants [1, 4, 31, 55, 70, 71], but it is difficult to detect network interactions of a microbial community [7274]. Therefore, in this study, we systematically described a mathematical and bioinformatic framework of MENA based on RMT, a powerful method well established in quantitative physics [23, 75, 76]. Our results demonstrate that the RMT-based approach is powerful in discerning network interactions in microbial communities.

The network approach described is based on the transition of two universal distributions from the random matrix theory. A major advantage of RMT method is that the threshold to construct network is automatically determined. In contrast, most other methods studies use arbitrary thresholds, which are usually based on limited knowledge of biological information [8, 7274, 77]. RMT-based approach selects an optimal threshold without ambiguity, which ensures its construction of optimal networks. Another advantage of RMT-based approach is its remarkable capacity in tolerating noise, resulting in reliable, robust networks. Our results show even with 100 % Gaussian noise, more than 85 % nodes from original network are still preserved. This characteristic could be very important for dealing with the large-scale data, such as metogenomics and micrrorrays, which are generally inherent with high noise.

Nevertheless, characterizing ecological network of microbial communities poses major challenges. MENs are constructed by the adjacency matrix originated from the pair-wise correlations of relative OTU abundance across different samples. Therefore, a network interaction between two OTUs or genes describes the co-occurrence of these two OTUs or genes across different samples. The co-occurrence might be caused by species or genes performing similar or complementary functions, or shared environmental conditions that microbial species coexist in [28]. However, the former possibility can be complicated by the observations that functionally redundant genes are not necessary co-regulated, but instead co-regulated through other genes, which is coined as transitive co-regulation [78]. The latter possibility can be complicated by the distinctiveness of individuals in microbial niches observed in their behaviors and responses to environmental perturbation [79]. Therefore, caution must be taken for the interpretation of underlying mechanisms that shape microbial communities.

A long-held tenet is that the structure of ecological networks has significant influence on the dynamics [1, 80]. Most complex systems have common characteristics such as small world, scale-free, modularity and hierarchy [8, 53, 54]. Consistently, MENs were found to be scale-free, small world and modular, in addition to hierarchical property in some MENs. These network properties are important for the robustness and stability of complex systems [8, 27, 28, 81]. For example, our results showed that any two microbial species in the community can be linked by just a few other neighbor species, showing small-world property. This may imply that the energy, materials and information can be easily transported through entire systems. In microbial communities, this characteristic drives efficient communications among different members so that relevant responses can be taken rapidly to environmental changes. Meanwhile, it is intriguing to note that modularity is prevailing in MENs, while hierarchy is present only in some MENs. Research on a wide range of architectural patterns in mutualistic (pollination) and trophic (predation) networks showed that hierarchy, also called nestedness, was strong in mutualistic networks, but that modularity was strong in trophic networks [82]. Although ecological networks of microbial communities are very complicated and cannot be classified into simple mutualistic or trophic networks, it would be interesting to compare a number of ecological networks of microbial communities to catalog different architectural patterns and to explore the mechanisms underlying the stability and resilience of communities.

In addition to interactions among microbes within a community, MENs allow for analyses of interactions with their environment through correlations with abiotic environmental measurements, which might provide insights on the conditions that have significant impact on the co-occurring organisms. It is also possible to link groups of organisms with biogeochemical measurements to reveal the functional role of organism in biogeochemical processes. These kinds of data are important for generating hypotheses to help explain natural environments that microbial communities reside, which might lead to forecasting responses of microbial communities when environment changes [73].

In summary, our study provides a mathematical/bioinformatic framework for network construction based on metagenomics data such as sequencing [28] and microarray hybridization data [27]. It is useful, as demonstrated with the microbial communities under experimental warming, for dissecting interactions within a microbial community as well as with environment, thus allowing microbial ecologists to address a variety of ecological questions at the community-wide scale [83, 84]. It is also possible to extend MENA to emerging fields of microbial ecology such as high-throughput proteomics, since RMT is not stringent on data types. In addition, broad application of MENA will generate a number of ecological networks that allow for exploration of architectural patterns of microbial communities [1]. This RMT-based molecular ecological network analysis provides powerful tools to elucidate network interactions in microbial communities and their responses to environmental changes, which are fundamentally important for research in microbial ecology, systems microbiology, and global change.

Methods

Data standardization

The network construction begins with a data table with n distinct operational taxonomic units (OTUs) based on 16 S rRNA genes or functional genes observed across m replicates or samples. Typically OTUs are used to refer taxonomic classification based on ribosomal RNA genes. For convenience, in the following sections, we use OTUs to refer the classifications derived from both 16 S rRNA genes and/or functional genes. Let y ik represent the abundance or relative abundance of the i- th OTU in the k- th sample ( i { 1 , , n } , k { 1 , , m } ) and Ynxm = [y ik ] is the abundance matrix. Usually, the abundance profile of i-th OTU is standardized as below. If the mean and standard deviation of y i across all samples are y ¯ i and σ i , the standardized abundance of the i- th OTU in the k- th sample is x ik = y ik y ¯ i σ i , where x ik has mean value of 0 and variance value of 1. Xnxm is the standardized data matrix and used for subsequent correlation analysis.

Defining adjacency matrix

Molecular ecological networks can be built on the basis of the measurements of relative OTU abundance in microbial communities. In MENs, each OTU corresponds to a node. Each network corresponds to an adjacency matrix (or interaction matrix), Anxn = a ij , which encodes the connection strength between each pair of nodes [20]. In an unweighted network, the adjacency a ij =1 if nodes i and j are connected, and a ij =0 otherwise [20]. For an undirected network, the adjacency matrix is symmetric. In weighted network, the pairwise adjacency has values between 0 and 1, i.e., 0 ≤ a ij  ≤ 1. The adjacency matrix is the foundation of all subsequent steps in network analysis.

To define the adjacency matrix, the similarity of OTU abundance across all samples should be measured first. Such similarity measures the degree of concordance between the abundance profiles of OTUs across different samples. Similar to widely used gene co-expression analyses [20, 61, 85, 86], Pairwise Pearson correlation coefficients (r ij ) are used to measure the similarity between i- th and j- th OTU across different samples. Let Rnxn = r ij be the Pearson correlation matrix, then

r ij = c o r ( x i , x j ) = k = 1 m ( x ik x ¯ i ) ( x jk x ¯ j ) k = 1 m ( x ik x ¯ i ) 2 k = 1 m ( x jk x ¯ j ) 2
(1)

where x ik and x jk are the standardized abundance of the i-th and j-th OTUs in the k-th sample. x ¯ i x ¯ j are the mean values of the i-th and j-th OTUs over samples. In general, the absolute value of the correlation coefficient (r ij ) is used to define the abundance similarity between i- th and j- th OTU (s ij ), that is

s ij = r ij , w h e r e i j { 1 , , n }
(2)

Let Snxn = [sij, which is a similarity matrix of the OTU abundance. In molecular ecological network analysis, the adjacency matrix is derived from the OTU abundance similarity matrix by applying a threshold. Similar to relevant gene co-expression network analysis [20, 61, 85, 86], the nodes are connected if they have significant pairwise similarities (i.e., correlations) across different samples. Thus, using a threshold value (s tb ), OTU abundance similarity matrix, Sn×n = s ij , is converted into the adjacency matrix, Ap×p = a ij , where p ≤ n. The adjacency a ij between the i- th and j- th OTU is defined by thresholding the OTU abundance similarity [33]:

a ij = { s ij i f s ij s tb 0 i f s ij < s tb
(3)

where s tb is the threshold parameter. The resulting adjacency matrix, Ap×p, is generally smaller than the similarity matrix because the rows or columns are removed if all of their elements are less than the threshold value.

Determining the threshold by random matrix theory-based approach

The structure of relevance network strongly depends on the threshold value, s t . In some network analysis, the threshold value is chosen arbitrarily based on known biological information or set by the empirical study [8]. Thus, the resulting network is more or less subjective [19, 20, 85, 87]. However, it is difficult to select appropriate thresholds, especially for poorly studied organisms/communities. In MENA, we use the random matrix theory (RMT)-based approach, which is able to identify the threshold automatically based on the data structure itself [22, 46] to select the final threshold parameter, s t .

Basic concept of RMT

Initially proposed by Wigner and Dyson in the 1960s for studying the spectrum of complex nuclei [88], random matrix theory (RMT) is a powerful approach for identifying and modeling phase transitions associated with disorder and noise in statistical physics and materials science. It has been successfully used for studying the behavior of different complex systems, such as spectra of large atoms [89], metal insulator transitions in disorder systems, spectra of quasiperiodic systems [90], chaotic systems [91], the stock market [76], brain response [92], gene co-expression networks [22] and protein interaction networks [46]. However, its suitability for complex biological systems, especially microbial communities, remains largely unexplored.

RMT predicts two universal extreme distributions of the nearest neighbor spacing distribution (NNSD) of eigenvalues: Gaussian orthogonal ensemble (GOE) statistics, which corresponds to random properties of complex system, and Poisson distribution, which corresponds to system-specific, nonrandom properties of complex systems [89]. These two different universal laws depend on the properties of the matrix. On one hand, if consecutive eigenvalues are completely uncorrelated, the NNSD follows Poisson statistics. Considering a series of eigenvalues, the probability of an eigenvalue falling in a scale DD + s is independent of the start point D, where s can be any positive values. It means the probability of an eigenvalue falling in any scales with certain length s will be identical, no matter where the scales begin. The NNSD under such assumption follows a Poisson random process, so-called exponential distribution of Poisson process [89]. On the other hand, for correlated eigenvalues, the NNSD has Gaussian orthogonal ensemble (GOE) statistics. Given a series of correlated eigenvalues, the probability of one eigenvalue falling into a scale DD + s is proportional to s. Wigner illustrated that the NNSD under this assumption was closely to Gaussian orthogonal ensemble so-called Wigner surmise[89].

The key concept of RMT is to mainly concern with the local property between eigenvalues rather than the global property of a series of eigenvalues. Here, the local property between eigenvalues means the eigenvalue fluctuations and the global property is the average eigenvalue density. In order to reveal the fluctuations of eigenvalues, the average eigenvalue density has to be removed from system so that the average eigenspacing is constant. Also, this procedure to generate a uniform eigenvalues distribution is called unfolding. The unfolded eigenvalues will fall between 0 and 1, and its density does not depend on the overall level distribution. Consider a sequence of eigenvalues { λ 1 ,  λ 2 ,  … λ n } from adjacency matrix, and those eigenvalues have been ordered as 1 λ 2 λ n }  . In practice, we replace eigenvalues λ i with e i = N av ( λ i ) where N av is the continuous density of eigenvalues obtained by fitting and smoothing the original integrated density of eigenvalues to a cubic spline or by local density average.

After unfolding the eigenvalues, three statistical quantities can be used to extract information from a sequence of eigenvalues, namely, eignevalue spacing distribution P(d), number variance of eigenvalues ∑, and spectral rigid ▵. P(d) is the probability density function for unfolded eigenvalue spacing, d i = e i + 1 e i , which is the NNSD for eigenvalues. For the completely uncorrelated eigenvalues, P(d) follows Poisson statistic and it can be expressed by

P ( d ) = exp ( d ) .
(4)

On the other hand, for the correlated eigenvalues, P(d) closely follows Wigner-Dyson distribution of the GOE statistics and it can be expressed by

P ( d ) π d 2 exp ( π 2 d 2 ) .
(5)

We use the χ2 goodness-of-fit test to assess whether NNSD follows Wigner-Dyson distribution or Poisson distribution. We assume that the NNSD of any biological system obeys these two extreme distributions [22, 23, 27, 28], and that there is a transition point from GOE to Poisson distribution, and this transition point can be used as the threshold for defining adjacency matrix.

Algorithms of detecting the threshold value

The following major steps are used to define the threshold (s t ) based on the standardized relative abundance of OTUs across different samples (Figure 2).

  1. (a)

    Calculate the Pearson correlation matrix, Rnxn, based on the standardized relative abundance of OTUs, Xnxm with n distinct OTUs across m samples.

  2. (b)

    Obtain similarity data, Snxn, by taking the absolute value of correlation matrix Rn×n.

  3. (c)

    Set an initial threshold value, s tb (e.g., 0.3 based on our experiences).

  4. (d)

    Calculate the adjacency matrix, Apxp = [a ij ] according to s tb , where p is the number of OTUs retained in the adjacency matrix with non-zero rows or columns.

  5. (e)

    Calculate eigenvalues λ i of the adjacency matrix based on the equation ( S λ I ) v = 0 , where λ is the eigenvalue, v is the corresponding eigenvector, and I is the identity matrix. Because S is the symmetric matrix and v is a non-zero vector, we can get p number of eigenvalues to solve the equation ( S λ I ) v = 0 . To test NNSD distribution, order the eigenvalues as λ 1 λ 2 λ p .

  6. (f)

    To get unfolded eigenvalues, replace λ i with e i = N av ( λ i ) , where N av is the continuous density of eigenvalues and can be obtained by fitting the original integrated density to a cubic spline or by local average.

  7. (g)

    Calculate the nearest neighbor spacing distribution of eigenvalues, P(d), which defines the probability density of unfolded eigenvalues spacing, d i = e i + 1 e i .

  8. (h)

    Using the χ2 goodness-of-fit test to determine whether the probability density function P(d) follows the exponential distribution of Poisson statistic, exp ( d ) .H0: P(d) follows the Poisson distribution.H1: P(d) does not follows the Poisson distribution.The χ2 goodness-of-fit test has the test statistics, χ 2 = i d i E ( d i ) 2 E ( d i ) , where d i is the observed nearest neighbor spacing and E(d i ) is an expected (theoretical) nearest neighbor spacing from Poisson distribution. The resulting χ2 value is compared to the χ2 distribution. Let χ u 2 ( 0.01 ) be the critical value at a significant level of 0.01 based on χ2 distribution with u degrees of freedom.

  9. (i)

    If χ 2 χ u 2 ( 0.01 ) , the null hypothesis H0 is not rejected. Then go to step (j).If χ 2 > χ u 2 ( 0.01 ) , the null hypothesis H0 is rejected. Then, increase the threshold by 0.1, s tb  + 0.1, and repeat the steps from (e) to (h).

  10. (j)

    Find a finer scale threshold value by increasing the threshold with 0.01 within the range of [s tb -0.1, s tb ]. Then repeat the steps from (e) to (h).

  11. (k)

    If H0 is accepted, i.e., the P(d) follows Poisson distribution, the finer scale threshold identified is used as the optimal threshold for defining the adjacency matrix.

Once the final threshold value s t is determined at a finer scale, an adjacency matrix is obtained by retaining all the OTUs whose abundance similarity values are greater than the determined threshold. Currently we have only adopted the unweighted network in the following network topological analysis. Hence, the final adjacency a ij is:

a ij = { 1 i f s ij s t 0 i f s ij < s t .
(6)

where s t is the final threshold parameter. Two nodes are linked if the similarity between their abundance profiles across all samples is equal to 1.

Calculation of MEN topological indices and general features

Once MENs are determined, various network topology indices can be calculated based on the adjacency matrix (Table 1). The overall topological indices describe the overall network topology in different views and thus are useful in characterizing various MENs identified under different situations. The indices for describing individual nodes are useful in assessing their roles in the network.

Scale-free, small world, modularity and hierarchy are most common network characteristics of interest [8, 53, 93]. A scale-free network is a network whose connectivity follows a power law, at least asymptotically [94], that is, only a few nodes in the network have many connections with other nodes while most of nodes have only a few connections with other nodes. It can be expressed by P ( k ) ~ k λ , where k is connectivity and λ is a constant. A small-world network is the network in which most nodes are not neighbors of one another, but most nodes can be reached by a few paths (typically, less than 6). Small world network has a small average shortest path (GD) typically as the logarithm of the number of nodes [43]. In addition, there is no formal definition for hierarchical topology [95]. One of the most important signatures for hierarchical, modular organizations is that the scaling of clustering coefficient follows C(k) ~ kγ, in which k is connectivity and γ is a constant. By log-transformation, logC(k) ~ −γ log(k), the logarithms of clustering coefficients have a linear relationship with the logarithms of connectivity.

Module detection

Modularity is a fundamental characteristics of biological networks as well as many engineering systems [53]. In MENs, a module in the network is a group of OTUs that are highly connected within the group, but very few connections outside the group. The maximum modularity score is used to separate the graph into multiple dense sub-graphs or modules. The modularity of each network (M) is estimated using the equation [66]:

M = b = 1 N M l b L K b 2 L 2 ,
(7)

where N M is the number of modules in the network, l b is the number of links among all nodes within the bth module, L is the number of all links in the network, and K b is the sum of degrees (connectivity) of nodes which are in the bth module. M measures the extension whose nodes have more links within their own modules than expected if linkage is random. It varies with the range of [−1, 1].

Several different algorithms can be used to separate modules, including short random walks, leading eigenvector of the community matrix, simulated annealing approach, and fast greedy modularity optimization [56, 57]. The algorithm of short random walks is based on the idea that all random walks tend to stay in the densely connected parts of a graph that was corresponding to the modules [56]. After calculating a distance between two nodes or between sets of nodes by random walk algorithm, it uses a hierarchical clustering approach to present the structural similarities between all nodes. Thereafter this approach will choose the best partition automatically. The advantage of this algorithm is efficient and fast computation.

Once the network modularity value (M) was explicitly defined, theoretically the module structure can be determined by maximizing M values over all possible divisions of network. However, exhaustive maximization over all divisions is computational intractable [57]. The algorithm of leading eigenvector is one of several approximate optimization methods have been proven effectively obtained higher M values with high speed. It simplified the maximization process in terms of a modularity matrix Bnxn that can be obtained by the adjacent matrix Anxn subtracting an expected edges matrix Pnxn from a null model. Then the network can be split into two groups by finding the leading eigenvector that was corresponding to the largest positive eigenvalue of modularity matrix. This splitting process can be looped until any further divisions will not increase the M value [57]. This method shows more accurate separations than other algorithms in several well-studied social networks [57].

The algorithm of simulated annealing approach usually produces the best separation of the modules by direct maximization of M[58]. The simulated annealing is a stochastic optimization technique to find “low cost” configurations [96]. It carries out the exhaustive search on network structures to merge and split priori-modules and move individual nodes from one module to another. Although this is a time-consuming process, it is expected to obtain clear module separations with a higher M.

The algorithm of fast greedy modularity optimization is to isolate modules via directly optimizing the M score [66, 97]. It starts with treating each node as the unique member of one module, and then repeatedly combines two modules if they generate the largest increase in modularity M. This algorithm has advantages with fast speed, accurate separations and ability to handle huge networks [66, 97].

Identification of key module members

After all modules are separated, each node can be assigned a role based on its topological properties [59], and the role of node i is characterized by its within-module connectivity (z i ) and among-module connectivity (P i ) as follows

z i = k ib k ¯ b σ k b ,
(8)

and

P i = 1 c = 1 N M k ic k i 2 ,
(9)

where k ib is the number of links of node i to other nodes in its module b k ¯ b and σ k b are the average and standard deviation of within-module connectivity, respectively over all the nodes in module b, k i is the number of links of node i in the whole network, k ic is the number of links from node i to nodes in module c, and N M is the number of modules in the network.

The within-module connectivity, z i , describes how well node i is connected to other nodes in the same module, and the participation coefficient, P i , reflects what degree that node i connects to different modules. P i is also referred as the among-module connectivity [98]. If all links of node i only belong to its own module, P i  = 0. If the links of node i are distributed evenly among modules, P i  → 1. The topological roles of individual nodes can be assigned by their position in the z-parameter space. Originally, Guimera et al. [33, 59] divided the topological roles of individual nodes into seven categories. Olesen et al. [98] simplified this classification into four categories for pollination networks. In this study, we use the simplified classification as follows: (i) Peripheral nodes (z i  ≤ 2.5, P i  ≤ 0.62), which have only a few links and almost always to the nodes within their modules, (ii) Connectors (z i  ≤ 2.5, P i  > 0.62), which are highly linked to several modules, (iii) Module hubs (z i  > 2.5, P i  ≤ 0.62), which are highly connected to many nodes in their own modules, and (iv) Network hubs (z i  > 2.5, P i  > 0.62), which act as both module hubs and connectors. From ecological perspective, peripheral nodes represent specialists whereas the other three are generalists.

Eigen-gene analysis

One of the grand challenges in dealing with high throughput metagenomics data is the high dimensionality. Various statistical approaches are used to reduce dimensions and extract major features, including principal component analysis (PCA), detrended correspondence analysis (DCA), and singular value decomposition (SVD). SVD is an orthogonal linear transformation of data (e.g., microbial data) from the complexity to the comprehensibility [99]. Based on SVD analysis, the Eigengene is a linear combination of genes and eigenvalues. In the diagonalized data, each eigengene is just expressed in the corresponding eigen arrays. Langfelder and Horvath [61] proposed eigengene network analysis to summarize the gene expression data from each module as a centroid. Eigengene network analysis is powerful to reveal higher order organization among gene co-expression modules [33, 61, 62]. Here, we have adopt this method to analyze modules in MENs.

SVD analysis to define module eigen-gene

Suppose there are nb OTUs in the b-th module. Let X b = [ x i , q b ] represent the relative abundance matrix of the b-th module, where x i , q b is the relative abundance of the i-th OTU in the q-the sample ( i { 1 , , n b } , q { 1 , , m } ). In SVD analysis, Xb can be decomposed as follows:

X b = U b D b V b T ,
(10)

where both U b ( n b × m ) and V b ( m × m ) are column-orthogonal matrices, and D b ( m × m ) is a diagonal matrix of the singular values d q b . The matrices Vb and Db are denoted as V b = ( v 1 b , v 2 b , v m b ) and D b = d i a g ( | d 1 b | , | d 2 b | , , | d m b | ) .

Assuming that the singular values are arranged in decreasing order, the first column of Vb is referred as the Module Eigen-gene, Eb, for the b-th module. That is, E b v 1 b .

The relative abundance profile of the OTUs within a module is represented by the eigen-gene. In addition, the sum of variance of OTU abundances equals to the sum of the diagonal matrix in SVD. Therefore, the percentage of the variance explained by the eigen-gene is given by Φ b as

Φ b = | d 1 b | 2 j = 1 m | d j b | 2 .
(11)

Generally, the module eigen-gene can explain approximately 50 % or more of the variance of the OTU abundances in the module [61]. Since PCA and SVD are identical if each OTU relative abundance has been standardized to mean 0 and variance 1, Eb is the first principal component based on PCA analysis [61].

Module membership

Module eigen-gene provides the best summary of variation in relative abundance of OTUs within a module, but it is a centroid of a module rather than a real OTU. In practice, it is always important to understand how close it is between a given actual OTU and its eigen-gene. The correlation of the eigen-gene in module b to the i-th actual OTU across all experimental samples is defined as

M M i E b = c o r ( x i , E b )
(12)

If M M t E b is close to 1 or −1, it is evident that the i-th OTU is close to the centroid of module b.

Random network construction and network comparison

Since only a single data point is available for each network parameter, we are not able to perform standard statistical analyses to assess statistical significances. Similar to the concept of hypothesis testing, the null model is generated to assess the performance of the alternative model. Thus, the random networks are generated to compare different complex networks using the Maslov-Sneppen procedure [68]. The Maslov-Sneppen method keeps the numbers of nodes and links unchanged but rewires the positions of all links in the MENs so that the sizes of networks are the same and the random rewired networks are comparable with original ones. This method has been typically used for ecological network analyses [4]. For each network identified, a total of 100 randomly rewired networks are usually generated by the Maslov-Sneppen procedure [68] and all network indices are calculated individually for each randomized network. Then the average and standard deviation for each index of all random networks are obtained. The statistical Z-test is able to test the differences of the indices between the MEN and random networks. Meanwhile, for the comparisons between the network indices under different conditions, the Student t-test can be employed by the standard deviations derived from corresponding random networks.

Trait-based gene significance measure

In gene expression network analyses, the gene significance (GS i,h ) is the correlation between the expression profile of the i-th gene and the h-th sample trait, T h [33]. The higher GS i,h , the more biologically significant gene i is related to the sample trait h. Similarly, in this study, the trait-based OTU significance is defined as:

G S i , h = [ c o r ( x i , T h ) ] 2
(13)

where x i is the relative abundance of the i- th OTU i { 1 , , n } and T h is the h- th sample trait (e.g. soil pH, N content, total plant biomass) ( h { 1 , , g } ). Since the measurement units for different traits vary, all trait data should be standardized prior to statistical analysis. Finally, an OTU significance matrix, GSnxg, is obtained.

Relationships of microbial interaction networks with soil variables

To discern the relationships between molecular ecological networks and soil properties, Mantel tests can be performed [100]. The relationships between the MENs and environmental variables were determined as follows: First, the significances of variables are calculated with the above equation (Eq 13) and the OTU significance matrix is generated. Then the Euclidean distance matrix D GS n × n is generated by calculating the Euclidean distance between every two OTUs. The distance matrix among all OTUs’ connectivity ( D k n × n ) was calculated as well. In addition, Mantel tests are performed between the distance matrices of the connectivity ( D GS n × n ) and OTU significance ( D GS n × n ) to examine the relationships between network structure (i.e., connectivity) and soil variables. The Mantel tests were performed using the programs available in R vegan package [101].