Description Usage Arguments Value Author(s) See Also Examples
Given a score matrix, this function builds the list of the edges of the associated network. The edges are ordered according to their scores. The score matrix has been computed from a network inference algorithm (e.g. DBNScoreStep1 or DBNScoreStep2, Shrinkage, Lasso, ...). An optional threshold can be specified, as well as a maximal number of edges.
1 2 | BuildEdges(score,threshold=1,nb=NULL,
targetNames=NULL,predNames=NULL,prec=3,dec=FALSE)
|
score |
matrix with r rows (=target genes) and d columns (=predictor genes) containing the scores resulting from an estimation procedure (e.g. DBNScoreStep1 or DBNScoreStep2, Shrinkage, Lasso, ...). |
threshold |
An optional real setting the maximal value for edge selection, default=1. |
nb |
An optional integer setting the maximal number of selected edges, default=NULL. |
targetNames |
An optional array (r) giving a list of names for the target genes, default=NULL. |
predNames |
An optional array (d) giving a list of names for the predictor genes, default=NULL. |
prec |
An optional integer setting the number of decimal places for score display, default=3. |
dec |
boolean, FALSE if the smallest score points out the most significant edge, default=FALSE. |
A matrix containing a list of edges ordered according to the score (First column: predictor, second column: target, third column: corresponding score). Predictors and targets are referred to through the names given by targetNames or predNames when specified.
Lebre Sophie (http://icube-bfo.unistra.fr/en/index.php/Sophie_Lebre),
Chiquet Julien (http://stat.genopole.cnrs.fr/~jchiquet).
DBNScoreStep1, DBNScoreStep2, BuildNetwork
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | library(G1DBN)
## ======================================
## SIMULATING THE NETWORK
## number of genes
p <- 10
## the network - adjacency Matrix
MyNet <- SimulNetworkAdjMatrix(p,0.05,c(-1.5,-0.5,0.5,1.5))
MyNet
## ======================================
## SIMULATING THE TIME SERIES EXPERIMENTS
## number of time points
n <- 20
## initializing the B vector
B <- runif(p,-1,1)
## initializing the variance of the noise
sigmaEps <- runif(p,0.1,0.5)
## initializing the process Xt
X0 <- B + rnorm(p,0,sigmaEps*10)
## the times series process
Xn <- SimulGeneExpressionAR1(MyNet$A,B,X0,sigmaEps,n)
## ======================================
## NETWORK INFERENCE WITH G1DBN
## STEP 1 - The first step score matrix
S1 <- DBNScoreStep1(Xn, method='ls')
## Building the edges of the network inferred after Step1
alpha1 <- 0.5
G1 <- BuildEdges(S1$S1ls,threshold=alpha1,dec=FALSE)
G1
## STEP 2- The second step score matrix
S2 <- DBNScoreStep2(S1$S1ls, Xn, method='ls', alpha1)
## Building the edges of the network inferred after Step2
alpha2 <- 0.05
G2 <- BuildEdges(S2,threshold=alpha2,dec=FALSE)
G2
## Building the edges of the simulation Graph
Gsimul <- BuildEdges(MyNet$AdjMatrix,threshold=0,dec=TRUE)
Gsimul
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.