Description Usage Arguments Value Examples
Consensus network is built from taking the average ranks of the edges in multiple network predictions.
1 | average.consensus(adjmatrix.list, directed = F)
|
adjmatrix.list |
a list of inferred network matrices with same row and column ordering. |
directed |
logical. If TRUE, the network is considered as directed. If FALSE, the upper triangular part of the symmetric matrix is used to calculate the rank matrix |
average.consensus
returns a network with rank average edge ranks. The weights are rescaled to 0-1 and hihger values indicate higher ranks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ##create two random networks
library(RLowPC)
set.seed(4)
net1<-abs(matrix(rnorm(16),4,4))
net1<-pmax(net1,t(net1))
diag(net1)<-0
set.seed(5)
net2<-abs(matrix(rnorm(16),4,4))
net2<-pmax(net2,t(net2))
diag(net2)<-0
dimnames(net1)<-dimnames(net2)<-list(letters[1:4],letters[1:4])
net.list<-list(net1=net1,net2=net2)
inf.consensus<-average.consensus(adjmatrix.list = net.list,directed = F)
adj2rankadj(net1)
adj2rankadj(net2)
inf.consensus
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.