Commit 271b7f0b authored by Ahmed Hemedan's avatar Ahmed Hemedan 🎨
Browse files

IFN1_sensitivity_against mutations

parent bd173e4f
##################################################
## Script purpose: sensitivity analysis of IFN1 model
## Date: 12/02/2021
## Author: Ahmed Hemedan (ahmed.hemedan@uni.lu)
#################################################
### Installation of required packages
install.packages("devtools")
install.packages("rJava")
devtools::install_github("csclab/RMut", INSTALL_opts="--no-multiarch")
library(rJava) #Initializes the Java Virtual Machine (JVM). This function must be called before any RMut functions can be used
library(reshape2)
library(RMut) #Library to calculate centralities and attractor cycles and loops' identification
initJVM("32G") #This function initializes the JVM with a parameter of the maximum Java heap size maxHeapSize
setOpencl("gpu") #Enables OpenCL computation ON GBU device.
showOpencl() #Get OpenCL information and prints them to the console screen
### load network in sif format
IFN1 <- loadNetwork("IFN1.sif")
### generate all possible groups each containing a single node in the IFN1 network
IFN1 <- generateGroups(IFN1, "all")
### generate 1000 random initial-states each containing 95 Boolean nodes
set <- generateStates(IFN1,1000)
### Wrapper function to calculate sensitivity
call_sensitivity <- function(network, set, param) {
result <- calSensitivity(network, set, param)
write.csv(result$Group_1,paste0(param,".csv"))
df <- read.csv(paste0(param,".csv"))
df <- subset(df, select = -c(X))
df <- melt(df, id.vars="GroupID")
}
call_sensitivity(IFN1, set,"overexpression")
call_sensitivity(IFN1, set,"knockout")
### Attractor cycles identification
## generate a set of only conjunction rules
generateRule(IFN1)
## find attractors
transNet <- findAttractors(IFN1, set)
output(transNet)
### search feedback/feed-forward loops
fbl <- findFBLs(IFN1)
output(fbl)
ffl <- findFFLs(IFN1)
output(ffl)
### calculate node-/edge-based centralities
IFN1 <- calCentrality(IFN1)
output(IFN1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment