| Title: | Integration Network |
|---|---|
| Description: | It constructs a Consensus Network which identifies the general information of all the layers and Specific Networks for each layer with the information present only in that layer and not in all the others.The method is described in Policastro et al. (2024) "INet for network integration" <doi:10.1007/s00180-024-01536-8>. |
| Authors: | Valeria Policastro [aut, cre] (ORCID: <https://orcid.org/0000-0003-1016-460X>), Matteo Magnani [aut], Claudia Angelini [aut], Annamaria Carissimo [aut] |
| Maintainer: | Valeria Policastro <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-05-19 05:59:38 UTC |
| Source: | https://github.com/valeriapolicastro/inet-tool |
This function constructs a list of adjacency matrices with the
same row and column names for all the matrices. The output is the object
needed for consensusNet function.
adj_rename(adjL)adj_rename(adjL)
adjL |
list of adjacency matrices |
a list of adjacency matrices with the same rows and columns name.
data("tryL_data") adj_rename(tryL_data)data("tryL_data") adj_rename(tryL_data)
List of 2 adjacency matrices data type.
adjL_dataadjL_data
## 'adjL_data' A list of 2 objects:
Adjacency matrix;
Adjacency matrix.
This function computes the INet Algorithm for the construction of a **Consensus Network**.
consensusNet( adjL, threshold = 0.5, tolerance = 0.1, theta = 0.04, nitermax = 50, ncores = 2, verbose = TRUE )consensusNet( adjL, threshold = 0.5, tolerance = 0.1, theta = 0.04, nitermax = 50, ncores = 2, verbose = TRUE )
adjL |
list of weighted adjacency matrix with weights in [0,1]. Same name in rows and columns for all the matrices. |
threshold |
threshold for the construction of the Consensus (default 0.5). Used in the last step on the similar graphs. |
tolerance |
the tolerance of differences between similar graphs for the construction of the Consensus (default 0.1). |
theta |
importance to give to the neighbourhood part of the weight (default 0.04). |
nitermax |
maximum number of iteration before stopping the algorithm (default 50). |
ncores |
number of CPU cores to use (default is 2). We suggest to use ncores equal to the number of graphs to integrate. |
verbose |
flag for verbose output (default as TRUE). |
a list of 3 types: $graphConsensus the Consensus Network, $Comparison the Jaccard weighted distances between the graphs calculated in each iteration, $similarGraphs the similar graphs before the Thresholding
data("adjL_data") consensusNet(adjL_data)data("adjL_data") consensusNet(adjL_data)
This function constructs graphs from data with pearson correlation and proportional thresholding (the data should be with the same names (the nodes) in columns for all the matrices).
constructionGraph(data, perc = 0.95)constructionGraph(data, perc = 0.95)
data |
a list of datasets |
perc |
percentile (default 0.95 it takes the 5 percent of the highest weights) |
Threshold information (highest weight, number of edges, number of nodes, modularity with louvain method), graphs in a list for each layer and weighted adjacency matrices in a list for each layer.
data("exampleL_data") constructionGraph(exampleL_data)data("exampleL_data") constructionGraph(exampleL_data)
This function creates a density plot of the different graphs mean weights. It can be used to search the final Threshold for the Consensus Network starting from similar networks.
densityNet(graphL)densityNet(graphL)
graphL |
the list of weighted graphs in igraph format. |
the quantile of the mean density distribution, the quantile of the mean density distribution without the zeros, plot density distribution without the zeros
data("graphL_data") densityNet(graphL_data)data("graphL_data") densityNet(graphL_data)
3 data types: Gene_Expression, Methy_Expression and Mirna_Expression data from patients with Glioblastoma
exampleL_dataexampleL_data
## 'exampleL_data' A list of 3 objects:
subset of Gene expression data;
subset of Methylation data;
subset of Mirna data.
<https://portal.gdc.cancer.gov/>
List of 2 graphs of igraph class type.
graphL_datagraphL_data
## 'graphL_data' A list of 2 objects:
Graph firt layer;
Graph second layer.
This function computes the Jaccard weighted matrix distance between all the pairs of graphs.
JWmatrix(graphL)JWmatrix(graphL)
graphL |
list of graphs as igraph objects with the same nodes. |
weighted Jaccard distance matrix
data("graphL_data") JWmatrix(graphL_data)data("graphL_data") JWmatrix(graphL_data)
This function computes the Mean Weighted Jaccard Distance for Multilayer Networks.
JWmean(graphL)JWmean(graphL)
graphL |
list of different graphs in igraph format with same nodes. |
a number: the mean distance
data("graphL_data") JWmean(graphL_data)data("graphL_data") JWmean(graphL_data)
This function computes graphs and nodes measures to analyse all the layers in one shot.
measuresNet(graphL, nodes.measures = TRUE)measuresNet(graphL, nodes.measures = TRUE)
graphL |
a list of graphs as igraphs objects. |
nodes.measures |
logical, if falso it computes only graph measures, if true it computes also nodes measures (default TRUE). |
list of measure for each layer.
data("graphL_data") measuresNet(graphL_data)data("graphL_data") measuresNet(graphL_data)
The function plots the network without isolated nodes.
plotC(graph, ...)plotC(graph, ...)
graph |
a graph |
... |
other parameter |
plot
data("graphL_data") plotC(graphL_data[[1]])data("graphL_data") plotC(graphL_data[[1]])
The function plots a beginning network and the consensus in one graph with different edge colors: red edges represent edges of the consensus already present in the beginning one, while light blue edges represent new edges constructed by the consensus procedure.
plotINet( adj, graph.consensus, edge.width = 3, vertex.label.cex = 0.5, vertex.size = 10, edge.curved = 0.2, method = "NA", ... )plotINet( adj, graph.consensus, edge.width = 3, vertex.label.cex = 0.5, vertex.size = 10, edge.curved = 0.2, method = "NA", ... )
adj |
one of the beginning adjacency matrices |
graph.consensus |
consensus network, output of the
|
edge.width |
the edge width (default 3) |
vertex.label.cex |
the size of the vertex label (default 0.8) |
vertex.size |
the size of the vertex (default 10) |
edge.curved |
to make the edge curved (default 0.2) |
method |
community detection method to color the nodes one of "walktrap", "edgeBetweenness", "fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap", "optimal" and "leiden" (default no method) |
... |
other parameter |
Union graph with beginning and consensus edge. Red edges represent edges of the consensus already present in the beginning one, while light blue edges represent new edges constructed by the consensus procedure. Community detection of the beginning graph if added.
data("adjL_data") con <- consensusNet(adjL_data) plotINet(adjL_data[[1]], con$graphConsensus)data("adjL_data") con <- consensusNet(adjL_data) plotINet(adjL_data[[1]], con$graphConsensus)
This function plots all the layers in one plot(wrapper of plot.multinet).
plotL(graphL, ...)plotL(graphL, ...)
graphL |
List of graphs |
... |
other parameter |
plot of graphs
data("graphL_data") plotL(graphL_data)data("graphL_data") plotL(graphL_data)
The function creates Case Specific Networks one for each layer to give information of the peculiar layer not present in the Consensus.
specificNet(graphL, graph.consensus)specificNet(graphL, graph.consensus)
graphL |
a list of graphs as igraphs objects. |
graph.consensus |
graphConsensus output of the
|
Case Specific Networks one for each layer and percentage of specificity.
data("graphL_data") data("adjL_data") myConsensus <- consensusNet(adjL_data) specificNet(graphL_data, myConsensus$graphConsensus)data("graphL_data") data("adjL_data") myConsensus <- consensusNet(adjL_data) specificNet(graphL_data, myConsensus$graphConsensus)
The function reconstructs the Consensus Network with different
thresholding after the consensusNet function starting from
similar graphs.
thresholdNet(sim.graphL, threshold = 0.5)thresholdNet(sim.graphL, threshold = 0.5)
sim.graphL |
a list of similarGraphs output of the
|
threshold |
different threshold to compute. |
a new consensus network igraph object.
data("adjL_data") myConsensus <- consensusNet(adjL_data) thresholdNet(myConsensus$similarGraphs)data("adjL_data") myConsensus <- consensusNet(adjL_data) thresholdNet(myConsensus$similarGraphs)
Random data with different nodes name in a list of 2 adjacency matrices.
tryL_datatryL_data
## 'tryL_data' A list of 2 objects:
Adjacency matrix;
Adjacency matrix.