n <- 3 # number of genes
K <- 4 # number of experiments
T_ <- 4 # number of time points
# generate random observation matrix
obs <- array(rnorm(n*K*T_), c(n,K,T_))
baseline <- c(0.75, 0, 0)
delta <- rep(0.75, n)
# perturbation vector, entry is 0 if gene is inactivated and 1 otherwise
b <- c(0,1,1, # perturbation exp1: gene 1 perturbed, gene 2,3 unperturbed
1,0,1, # perturbation exp2: gene 2 perturbed, gene 1,3 unperturbed
1,1,0, # perturbation exp3....
1,1,1)
delta_type <- "perGene"
lambda <- 1/10
annot <- getEdgeAnnot(n)
#infer the network
res <- doILP(obs, delta, lambda, b, n, K, T_, annot, delta_type, prior=NULL, sourceNode=NULL,
sinkNode=NULL, all.int=FALSE, all.pos=FALSE, flag_time_series=TRUE)
# make the adjacency matrix
adja <- getBaseline(res, n)
Run the code above in your browser using DataLab