n <- 5 # number of genes
K <- 7 # number of knockdowns
# perturbation vector, entry is 0 if gene is inactivated and 1 otherwise
b <- c(0,1,1,1,1, # perturbation exp1: gene 1 perturbed, gene 2-5 unperturbed
1,0,1,1,1, # perturbation exp2: gene 2 perturbed, gene 1,3,4,5 unperturbed
1,1,0,1,1, # perturbation exp3....
1,1,1,0,1,
1,1,1,1,0,
1,0,0,1,1,
1,1,1,1,1)
T_nw <- matrix(c(0,1,1,0,0,
0,0,0,-1,0,
0,0,0,1,0,
0,0,0,0,1,
0,0,0,0,0), nrow=n, ncol=n, byrow=TRUE)
act_mat <- calcActivation(T_nw, b, n, K)
# define the parameters for the observation generated from the normal distribution
active_mu <- 0.9
inactive_mu <- 0.5
active_sd <- inactive_sd <- 0.1
mu_type <- "single"
# compute the observations matrix
getObsMat(act_mat=act_mat, active_mu=active_mu, active_sd=active_sd, inactive_mu=inactive_mu, inactive_sd=inactive_sd, mu_type=mu_type)
Run the code above in your browser using DataLab